or
| If Profile.UserCulture = 2 Then |
| If TypeOf e.Item Is GridHeaderItem Then |
| Dim header As GridHeaderItem = DirectCast(e.Item, GridHeaderItem) |
| header("PRN").Text = "购买申请编号" |
| header("RaisedBy").Text = "提出者" |
| header("Supplier").Text = "供应商" |
| header("DeliveryRequired").Text = "要求送货日期" |
| header("PRNotes").Text = "附注及特别说明" |
| header("ReqValue").Text = "价值" |
| header("Status").Text = "状态" |
| header("Level1").Text = "第 1 级授权" |
| header("Level2").Text = "第 2 级授权" |
| header("POSNumber").Text = "采购订单编号" |
| End If |
| End If |
| slider.Width = 365 |
| slider.SmallChange = 1 |
| slider.LargeChange = 1 |
| slider.IsSelectionRangeEnabled = True |
| slider.SelectionStart = 0 |
| slider.SelectionEnd = 360 |
| slider.OnClientSlideEnd = "sliderEndSlide" |
| function sliderEndSlide(sender, args) { |
| if (sender.get_selectionEnd() == sender.get_maximumValue()) { |
| sender.set_width(sender.get_maximumValue() + 28); |
| sender.set_maximumValue(sender.get_maximumValue() + 28); |
| sender.redraw(); |
| } |
| } |
<telerik:RadDockLayout runat="server" ID="RadDockLayout1" EnableEmbeddedSkins="false"
Skin="None" OnSaveDockLayout="RadDockLayout1_SaveDockLayout" OnLoadDockLayout="RadDockLayout1_LoadDockLayout">
<telerik:RadDockZone runat="server" ID="RadDockZone1" Orientation="vertical" Style="border: 0px;
width: 100%;">
<telerik:RadDock runat="server" ID="RadDockBio" Title="Bio Line" EnableAnimation="true"
AutoPostBack="true" CommandsAutoPostBack="true">
<ContentTemplate>
</ContentTemplate>
</telerik:RadDock>
</telerik:RadDockZone>
</telerik:RadDockLayout>
| <script type="text/javascript"> |
| //MAKE SURE THAT THE FOLLOWING SCRIPT IS PLACED AFTER THE RADWINDOWMANAGER DECLARATION |
| //Replace old radconfirm with a changed version. |
| var oldConfirm = radconfirm; |
| //TELERIK |
| //window.radconfirm = function(text, mozEvent) |
| //We will change the radconfirm function so it takes all the original radconfirm attributes |
| window.radconfirm = function(text, mozEvent, oWidth, oHeight, callerObj, oTitle) |
| { |
| var ev = mozEvent ? mozEvent : window.event; //Moz support requires passing the event argument manually |
| //Cancel the event |
| ev.cancelBubble = true; |
| ev.returnValue = false; |
| if (ev.stopPropagation) ev.stopPropagation(); |
| if (ev.preventDefault) ev.preventDefault(); |
| //Determine who is the caller |
| var callerObj = ev.srcElement ? ev.srcElement : ev.target; |
| //Call the original radconfirm and pass it all necessary parameters |
| if (callerObj) |
| { |
| //Show the confirm, then when it is closing, if returned value was true, automatically call the caller's click method again. |
| var callBackFn = function (arg) |
| { |
| if (arg) |
| { |
| callerObj["onclick"] = ""; |
| if (callerObj.click) callerObj.click(); //Works fine every time in IE, but does not work for links in Moz |
| else if (callerObj.tagName == "A") //We assume it is a link button! |
| { |
| try |
| { |
| eval(callerObj.href) |
| } |
| catch(e){} |
| } |
| } |
| } |
| //TELERIK |
| //oldConfirm(text, callBackFn, 300, 100, null, null); |
| //We will need to modify the oldconfirm as well |
| oldConfirm(text, callBackFn, oWidth, oHeight, callerObj, oTitle); |
| } |
| return false; |
| } |
| </script> |
| <%@ Page Title="" Language="C#" MasterPageFile="~/Mentor.Master" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="Mentor.Test" %> |
| <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> |
| <style type="text/css"> |
| .style4 |
| { |
| border-bottom: 1px solid #d0d7e5; |
| font-weight: bold; |
| color: #274c89; |
| background-color: #dde8fe; |
| width: 113px; |
| } |
| .style5 |
| { |
| border-bottom: 1px solid #d0d7e5; |
| font-weight: bold; |
| color: #274c89; |
| background-color: #dde8fe; |
| width: 404px; |
| } |
| .style6 |
| { |
| border-bottom: 1px solid #d0d7e5; |
| font-weight: bold; |
| color: #274c89; |
| background-color: #dde8fe; |
| width: 82px; |
| } |
| </style> |
| </asp:Content> |
| <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> |
| <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadComboBox1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadComboBox1" |
| LoadingPanelID="RadAjaxLoadingPanel1" /> |
| <telerik:AjaxUpdatedControl ControlID="RadListBox1" |
| LoadingPanelID="RadAjaxLoadingPanel1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="RadComboBox2"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadComboBox2" |
| LoadingPanelID="RadAjaxLoadingPanel1" /> |
| <telerik:AjaxUpdatedControl ControlID="RadListBox1" |
| LoadingPanelID="RadAjaxLoadingPanel1" /> |
| <telerik:AjaxUpdatedControl ControlID="RadListBox2" |
| LoadingPanelID="RadAjaxLoadingPanel1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="RadListBox1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadListBox1" |
| LoadingPanelID="RadAjaxLoadingPanel1" /> |
| <telerik:AjaxUpdatedControl ControlID="RadListBox2" |
| LoadingPanelID="RadAjaxLoadingPanel1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="RadListBox2"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadListBox1" |
| LoadingPanelID="RadAjaxLoadingPanel1" /> |
| <telerik:AjaxUpdatedControl ControlID="RadListBox2" |
| LoadingPanelID="RadAjaxLoadingPanel1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManagerProxy> |
| <asp:SqlDataSource ID="dsCategory" runat="server" |
| ConnectionString="<%$ ConnectionStrings:MentorDBConnectionString %>" |
| SelectCommand="SELECT [Category_ID], [CategoryName], [Client_ID] FROM [Categories] WHERE ([Client_ID] = @Client_ID) ORDER BY [CategoryName]"> |
| <SelectParameters> |
| <asp:Parameter DefaultValue="1" Name="Client_ID" Type="Int32" /> |
| </SelectParameters> |
| </asp:SqlDataSource> |
| <asp:SqlDataSource ID="dsRole" runat="server" |
| ConnectionString="<%$ ConnectionStrings:MentorDBConnectionString %>" |
| SelectCommand="SELECT [Role_ID], [Client_ID], [RoleName] FROM [Roles] WHERE ([Client_ID] = @Client_ID) ORDER BY [RoleName]"> |
| <SelectParameters> |
| <asp:Parameter DefaultValue="1" Name="Client_ID" Type="Int32" /> |
| </SelectParameters> |
| </asp:SqlDataSource> |
| <asp:SqlDataSource ID="dsTopics" runat="server" |
| ConnectionString="<%$ ConnectionStrings:MentorDBConnectionString %>" |
| InsertCommand="INSERT INTO [TopicAssignment] ([Topic_ID], [Role_ID], [SortOrder]) VALUES (@Topic_ID, @Role_ID, @SortOrder)" |
| SelectCommand="SELECT Topic_ID, TopicName, Category_ID, SortOrder FROM Topics WHERE (Category_ID = @Category_ID) AND (NOT EXISTS (SELECT Topic_ID, Role_ID FROM TopicAssignment WHERE (Topic_ID = Topics.Topic_ID) AND (Role_ID = @Role_ID))) ORDER BY TopicName"> |
| <SelectParameters> |
| <asp:ControlParameter ControlID="RadComboBox1" DefaultValue="1" |
| Name="Category_ID" PropertyName="SelectedValue" /> |
| <asp:ControlParameter ControlID="RadComboBox2" DefaultValue="1" Name="Role_ID" |
| PropertyName="SelectedValue" /> |
| </SelectParameters> |
| <InsertParameters> |
| <asp:Parameter Name="Topic_ID" /> |
| <asp:Parameter Name="Role_ID" /> |
| <asp:Parameter Name="SortOrder" /> |
| </InsertParameters> |
| </asp:SqlDataSource> |
| <asp:SqlDataSource ID="rsAssignedTopics" runat="server" |
| ConnectionString="<%$ ConnectionStrings:MentorDBConnectionString %>" |
| DeleteCommand="DELETE FROM [TopicAssignment] WHERE [TopicAssign_ID] = @TopicAssign_ID" |
| InsertCommand="INSERT INTO [TopicAssignment] ([Topic_ID], [Role_ID], [SortOrder]) VALUES (@Topic_ID, @Role_ID, @SortOrder)" |
| SelectCommand="SELECT [TopicAssign_ID], [Topic_ID], [Role_ID], [SortOrder] FROM [TopicAssignment] WHERE ([Role_ID] = @Role_ID) ORDER BY SortOrder" |
| UpdateCommand="UPDATE [TopicAssignment] SET [Topic_ID] = @Topic_ID, [Role_ID] = @Role_ID, [SortOrder] = @SortOrder WHERE [TopicAssign_ID] = @TopicAssign_ID"> |
| <SelectParameters> |
| <asp:ControlParameter ControlID="RadComboBox2" DefaultValue="1" Name="Role_ID" |
| PropertyName="SelectedValue" Type="Int32" /> |
| </SelectParameters> |
| <DeleteParameters> |
| <asp:Parameter Name="TopicAssign_ID" Type="Int32" /> |
| </DeleteParameters> |
| <UpdateParameters> |
| <asp:Parameter Name="Topic_ID" Type="Int32" /> |
| <asp:Parameter Name="Role_ID" Type="Int32" /> |
| <asp:Parameter Name="SortOrder" Type="Int32" /> |
| </UpdateParameters> |
| <InsertParameters> |
| <asp:Parameter Name="Topic_ID" Type="Int32" /> |
| <asp:Parameter Name="Role_ID" Type="Int32" /> |
| <asp:Parameter Name="SortOrder" Type="Int32" /> |
| </InsertParameters> |
| </asp:SqlDataSource> |
| <table width="100%" border="0" cellpadding="0" cellspacing="0" class="panelBorders"> |
| <tr> |
| <td height="24" class="headerCell"> |
| <table border="0" cellspacing="2" |
| cellpadding="2" style="width: 100%"> |
| <tr> |
| <td width="2%" align="center"> |
| <img src="images/assignpositions.png" width="16" |
| height="16" /></td> |
| <td width="100%" class="headerText"> |
| Build Curriculum</td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| <tr> |
| <td class="panelContent" valign="top"> |
| <table border="0" cellspacing="3" |
| cellpadding="3" style="width: 100%"> |
| <tr> |
| <td class="style5"> |
| Instructions go here</td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table width="100%" border="0" cellspacing="0" cellpadding="0"> |
| <tr> |
| <td><img src="images/shim.gif" width="100" |
| height="6" /></td> |
| </tr> |
| </table> |
| <table width="100%" border="0" cellspacing="0" cellpadding="0"> |
| <tr> |
| <td width="485" valign="top"> |
| <table width="100%" border="0" cellpadding="0" cellspacing="0" class="panelBorders"> |
| <tr> |
| <td height="24" class="headerCell"> |
| <table border="0" cellspacing="2" |
| cellpadding="2" style="width: 100%"> |
| <tr> |
| <td width="2%" align="center"> |
| <img src="images/assignpositions.png" width="16" |
| height="16" /></td> |
| <td width="100%" class="headerText"> |
| Available Topics</td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| <tr> |
| <td class="panelContent" valign="top"> |
| <table width="100%" border="0" cellspacing="0" cellpadding="0"> |
| <tr> |
| <td height="28" valign="middle" class="style4" align="center">Select Category:</td> |
| <td valign="middle" class="comborowBackground"> |
| <telerik:RadComboBox ID="RadComboBox1" Runat="server" AutoPostBack="True" |
| DataSourceID="dsCategory" DataTextField="CategoryName" |
| DataValueField="Category_ID" EmptyMessage="Select Category" |
| Skin="Office2007" Width="100%"> |
| </telerik:RadComboBox> |
| </td> |
| </tr> |
| </table> |
| <table width="100%" border="0" cellspacing="2" cellpadding="2"> |
| <tr> |
| <td height="23" valign="middle"> |
| <telerik:RadListBox ID="RadListBox1" runat="server" AllowTransfer="True" |
| DataKeyField="Topic_ID" DataSourceID="dsTopics" DataTextField="TopicName" |
| DataValueField="Topic_ID" Height="500px" Skin="Office2007" |
| style="top: 0px; left: 0px" TransferToID="RadListBox2" Width="100%" |
| AllowAutomaticUpdates="True" AutoPostBackOnTransfer="True" TransferMode="Copy"> |
| </telerik:RadListBox> |
| </td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </table> |
| </td> |
| <td width="6"> </td> |
| <td width="485" valign="top"> |
| <table width="100%" border="0" cellpadding="0" cellspacing="0" class="panelBorders"> |
| <tr> |
| <td height="24" class="headerCell"> |
| <table border="0" cellspacing="2" |
| cellpadding="2" style="width: 100%"> |
| <tr> |
| <td width="2%" align="center"> |
| <img src="images/assignpositions.png" width="16" |
| height="16" /></td> |
| <td width="100%" class="headerText"> |
| Topics For</td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| <tr> |
| <td class="panelContent" valign="top"> |
| <table width="100%" border="0" cellspacing="0" cellpadding="0"> |
| <tr> |
| <td height="28" valign="middle" class="style6" align="center">Select Role:</td> |
| <td height="28" valign="middle" class="comborowBackground"> |
| <telerik:RadComboBox ID="RadComboBox2" Runat="server" DataSourceID="dsRole" |
| DataTextField="RoleName" DataValueField="Role_ID" EmptyMessage="Select Role" |
| Skin="Office2007" AutoPostBack="True" Width="100%"> |
| </telerik:RadComboBox> |
| </td> |
| </tr> |
| </table> |
| <table width="100%" border="0" cellspacing="2" cellpadding="2"> |
| <tr> |
| <td height="23" valign="middle"> |
| <telerik:RadListBox ID="RadListBox2" runat="server" |
| AllowAutomaticUpdates="True" AllowDelete="True" AllowReorder="True" |
| AutoPostBackOnDelete="True" AutoPostBackOnReorder="True" |
| DataKeyField="TopicAssign_ID" DataSortField="SortOrder" |
| DataSourceID="rsAssignedTopics" DataTextField="Topic_ID" |
| DataValueField="TopicAssign_ID" Height="500px" Skin="Office2007" |
| style="top: 0px; left: 0px" TransferToID="RadListBox1" Width="100%" TransferMode="Copy"> |
| </telerik:RadListBox> |
| </td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table width="100%" border="0" cellspacing="0" cellpadding="0"> |
| <tr> |
| <td><img src="images/shim.gif" width="100" |
| height="6" /></td> |
| </tr> |
| </table> |
| </asp:Content> |
| <asp:SqlDataSource ID="DS" runat="server" |
| ConnectionString="Provider=SQLOLEDB.1;Data Source=evolve;Persist Security Info=True;User ID=sa;Initial Catalog=nvis" |
| DeleteCommand="DELETE FROM [images] WHERE [ref] = ? AND [Typ] = ?" |
| InsertCommand="INSERT INTO images (ref, Typ, ext, added, modified) VALUES (?, ?, ?, ?, ?)" |
| ProviderName="System.Data.OleDb" SelectCommand="SELECT * FROM [images]" |
| UpdateCommand="UPDATE [images] SET [img] = ?, [ext] = ?, [added] = ?, [modified] = ? WHERE [ref] = ? AND [Typ] = ?"> |
| <DeleteParameters> |
| <asp:Parameter Name="ref" Type="String" /> |
| <asp:Parameter Name="Typ" Type="String" /> |
| </DeleteParameters> |
| <UpdateParameters> |
| <asp:Parameter Name="ext" Type="String" /> |
| <asp:Parameter Name="added" Type="DateTime" /> |
| <asp:Parameter Name="modified" Type="DateTime" /> |
| <asp:Parameter Name="ref" Type="String" /> |
| <asp:Parameter Name="Typ" Type="String" /> |
| </UpdateParameters> |
| <InsertParameters> |
| <asp:Parameter Name="ref" Type="String" /> |
| <asp:Parameter Name="Typ" Type="String" /> |
| <asp:Parameter Name="ext" Type="String" /> |
| <asp:Parameter Name="added" Type="DateTime" /> |
| <asp:Parameter Name="modified" Type="DateTime" /> |
| </InsertParameters> |
| </asp:SqlDataSource> |
| <telerik:GridBinaryImageColumn DataField="img"></telerik:GridBinaryImageColumn> |
| <%@ Page Language="C#" MasterPageFile="~/CFFMFeedback.master" AutoEventWireup="true" CodeFile="ManageProfile.aspx.cs" Inherits="webadmin_ManageProfile" Title="CFFMFeedback Admin: Manage Profile" %> |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> |
| <%@ MasterType VirtualPath="~/CFFMFeedback.master" %> |
| <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> |
| <telerik:RadCodeBlock ID="codeBlock1" runat="server"> |
| <script type="text/javascript"> |
| //<![CDATA[ |
| function OnClientItemSelected(sender, args) |
| { |
| var pvwImage = $get("<%= imgAvatar.ClientID %>"); |
| var tbAvatarFileName = $get("<%= tbAvatar.ClientID %>"); |
| var imageSrc = args.get_path(); |
| var imgFileName = args.get_item().get_name(); |
| if (imageSrc.match(/\.(gif|jpg)$/gi)) |
| { |
| pvwImage.src = imageSrc; |
| pvwImage.style.display = ""; |
| tbAvatarFileName.value = imgFileName; |
| } |
| else |
| { |
| pvwImage.src = imageSrc; |
| pvwImage.style.display = "none"; |
| tbAvatarFileName.value = imgFileName; |
| } |
| } |
| //]]> |
| </script> |
| </telerik:RadCodeBlock> |
| <asp:ScriptManager ID="ScriptManager1" runat="server"> |
| </asp:ScriptManager> |
| <h2> |
| Manage Profile</h2> |
| <p>Please update the information below so it is current. This information will be displayed in any feedback responses you post.</p> |
| Name:<br /> |
| <asp:TextBox id="tbName" runat="server" MaxLength="256" Width="400px"></asp:TextBox><br /> |
| Position:<br /> |
| <asp:TextBox id="tbPosition" runat="server" MaxLength="256" Width="400px"></asp:TextBox><br /> |
| Email:<br /> |
| <asp:TextBox id="tbEmail" runat="server" MaxLength="256" Width="400px"></asp:TextBox><br /> |
| Phone:<br /> |
| <asp:TextBox id="tbPhone" runat="server" MaxLength="256" Width="400px"></asp:TextBox><br /> |
| Avatar:<br /> |
| <table><tr><td><telerik:RadFileExplorer ID="rfeAvatars" runat="server" EnableCreateNewFolder="False" |
| Height="200px" Width="300px" OnClientItemSelected="OnClientItemSelected" VisibleControls="Grid, Toolbar, AddressBox, ContextMenus"> |
| <Configuration SearchPatterns="*.*" ViewPaths="~/images/avatars" UploadPaths="~/images/avatars" DeletePaths="~/images/avatars" /> |
| </telerik:RadFileExplorer></td><td> |
| <asp:Image ID="imgAvatar" runat="server" AlternateText="Avatar" style="display:block; |
| margin: 10px; width: 100px; height: 100px; vertical-align: middle;" /><asp:TextBox ID="tbAvatar" runat="server" MaxLength="256" Width="150px" ReadOnly="true"></asp:TextBox></td></tr></table> |
| <br /> |
| <asp:Button ID="btnSaveProfile" runat="server" |
| Text="Save" OnClick="btnSaveProfile_Click" /> |
| </asp:Content> |
| using System; |
| using System.Data; |
| using System.Configuration; |
| using System.Collections; |
| using System.Web; |
| using System.Web.Security; |
| using System.Web.UI; |
| using System.Web.UI.WebControls; |
| using System.Web.UI.WebControls.WebParts; |
| using System.Web.UI.HtmlControls; |
| public partial class webadmin_ManageProfile : System.Web.UI.Page |
| { |
| protected void Page_Load(object sender, EventArgs e) |
| { |
| Master.SetMessage(""); |
| if (!IsPostBack) |
| BindProfileData(); |
| } |
| protected void BindProfileData() |
| { |
| tbName.Text = Profile.Name; |
| tbPosition.Text = Profile.Position; |
| tbEmail.Text = Profile.Email; |
| tbPhone.Text = Profile.Phone; |
| tbAvatar.Text = Profile.AvatarPicFileName; |
| imgAvatar.ImageUrl = "~/images/avatars/" + Profile.AvatarPicFileName; |
| rfeAvatars.ExplorerMode = Telerik.Web.UI.FileExplorer.FileExplorerMode.Default; |
| } |
| protected void btnSaveProfile_Click(object sender, EventArgs e) |
| { |
| Profile.Name = tbName.Text; |
| Profile.Position = tbPosition.Text; |
| Profile.Email = tbEmail.Text; |
| Profile.Phone = tbPhone.Text; |
| Profile.AvatarPicFileName = tbAvatar.Text; |
| } |
| } |