-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathUser.aspx
More file actions
145 lines (144 loc) · 7.65 KB
/
Copy pathUser.aspx
File metadata and controls
145 lines (144 loc) · 7.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<%@ Page Title="Oasis Admin Tools --- User" Language="VB" MasterPageFile="~/site.master"
AutoEventWireup="false" CodeFile="User.aspx.vb" Inherits="User" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</ajaxToolkit:ToolkitScriptManager>
<ext:ResourceManager ID="ResourceManager2" runat="server" Theme="Gray" />
<asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label>
<%
If (lblError.Text.Length > 0) Then
Response.Write("<br /><br /><br />")
End If
%>
<ext:GridPanel ID="GridPanel1" runat="server" Title="Users" Margins="0 0 5 5" Icon="UserSuit"
Region="Center" Frame="true" Height="300">
<Store>
<ext:Store ID="Store1" runat="server" OnRefreshData="Store1_Refresh">
<Reader>
<ext:JsonReader IDProperty="UserId">
<Fields>
<ext:RecordField Name="UserId" />
<ext:RecordField Name="Username" />
<ext:RecordField Name="First Name" />
<ext:RecordField Name="Last Name" />
<ext:RecordField Name="SettingUrl" />
<ext:RecordField Name="Groups" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:CommandColumn Width="100" Header="Actions">
<Commands>
<ext:GridCommand Icon="Delete" CommandName="Delete">
<ToolTip Text="Delete" />
</ext:GridCommand>
</Commands>
</ext:CommandColumn>
<ext:Column ColumnID="UserId" Header="UserId" Width="120" DataIndex="UserId" Hidden="true" />
<ext:Column DataIndex="Username" Header="Username" Width="120" />
<ext:Column DataIndex="First Name" Header="First Name" Width="120" />
<ext:Column DataIndex="Last Name" Header="Last Name" Width="120" />
<ext:Column DataIndex="SettingUrl" Header="Setting Url" Width="120" />
<ext:Column DataIndex="Groups" Header="Groups" Width="100" />
</Columns>
</ColumnModel>
<DirectEvents>
<Command OnEvent="RowDelete">
<EventMask ShowMask="true" />
<ExtraParams>
<ext:Parameter Name="UserId" Value="record.data.UserId" Mode="Raw" />
</ExtraParams>
<Confirmation BeforeConfirm="if (command!='Delete') return false;" ConfirmRequest="true"
Message="Are you sure to delete this record" Title="Attention" />
</Command>
</DirectEvents>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true">
<DirectEvents>
<RowSelect OnEvent="RowSelect" Buffer="100">
<EventMask ShowMask="true" Target="CustomTarget" CustomTarget="#{FormPanel1}" />
<ExtraParams>
<ext:Parameter Name="UserId" Value="this.getSelected().id" Mode="Raw" />
</ExtraParams>
</RowSelect>
</DirectEvents>
</ext:RowSelectionModel>
</SelectionModel>
<BottomBar>
<ext:PagingToolbar ID="PagingToolbar1" runat="server" />
</BottomBar>
<LoadMask ShowMask="true" />
</ext:GridPanel>
<ext:FormPanel ID="FormPanel1" runat="server" Region="East" Split="true" Margins="0 5 5 5"
Frame="true" Title="User Details" Icon="User" DefaultAnchor="100%">
<Items>
<ext:TextField ID="txtId" runat="server" FieldLabel="User ID" DataIndex="UserID" Disabled="true"/>
<ext:TextField ID="txtUserName" runat="server" FieldLabel="User Name" DataIndex="UserName"
AllowBlank="false" MsgTarget="Under" EnableKeyEvents="true" MaskRe="[a-zA-Z0-9]">
</ext:TextField>
<ext:TextField ID="txtPassword" runat="server" FieldLabel="Password" DataIndex="Password1"
AllowBlank="false" InputType="Password" MsgTarget="Under" />
<ext:TextField ID="txtConfirmPassword" runat="server" FieldLabel="Confirm Password"
DataIndex="Password2" AllowBlank="false" IsRemoteValidation="true" InputType="Password"
MsgTarget="Under">
<RemoteValidation OnValidation="CheckPassword" />
</ext:TextField>
<ext:TextField ID="txtFirstName" runat="server" FieldLabel="First Name" DataIndex="FirstName"
AllowBlank="false" MsgTarget="Under" />
<ext:TextField ID="txtLastName" runat="server" FieldLabel="Last Name" DataIndex="LastName"
AllowBlank="false" MsgTarget="Under" />
<ext:TextField ID="txtSettingURL" runat="server" FieldLabel="Setting URL" DataIndex="SettingURL"
AllowBlank="false" MsgTarget="Under" />
<ext:ComboBox ID="cboUserGroups" runat="server" EmptyText="Select a user group..."
Editable="false" FieldLabel="User groups" Width="300" DisplayField="Name" ValueField="Id"
ForceSelection="true" DataIndex="GroupID" AllowBlank="false" MsgTarget="Under">
<Store>
<ext:Store runat="server" ID="UserGroupStore" OnRefreshData="UserGroupStore_Refresh">
<Reader>
<ext:JsonReader IDProperty="Id">
<Fields>
<ext:RecordField Name="Id" Type="String" Mapping="Id" />
<ext:RecordField Name="Name" Type="String" Mapping="Name" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
</ext:ComboBox>
</Items>
<Buttons>
<%-- <ext:Button ID="btnSave" runat="server" Text="Save">
<DirectEvents>
<Click OnEvent="btnSave_Click" Before="return #{FormPanel1}.isValid();">
<EventMask ShowMask="true" />
</Click>
</DirectEvents>
</ext:Button>--%>
<ext:Button ID="btnInsert" runat="server" Text="Insert">
<DirectEvents>
<Click OnEvent="btnInsert_Click" Before="return #{FormPanel1}.isValid();">
<EventMask ShowMask="true" Msg="Inserting..." />
</Click>
</DirectEvents>
</ext:Button>
<ext:Button ID="btnUpdate" runat="server" Text="Update">
<DirectEvents>
<Click OnEvent="btnUpdate_Click" Before="return #{FormPanel1}.isValid();">
<EventMask ShowMask="true" Msg="Updating..." />
</Click>
</DirectEvents>
</ext:Button>
<ext:Button ID="btnResetFields" runat="server" Text="Reset Fields">
<Listeners>
<Click Handler="#{FormPanel1}.getForm().reset();" />
</Listeners>
</ext:Button>
</Buttons>
</ext:FormPanel>
</asp:Content>