-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAddusers.aspx
471 lines (440 loc) · 31.7 KB
/
Addusers.aspx
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
<%@ Page Title="" Language="C#" MasterPageFile="~/immain.Master" AutoEventWireup="true" CodeFile="Addusers.aspx.cs" Inherits="Addusers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="PageHeadPlaceHolder" runat="server">
<title>Add User</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="PageHeaderTitlePlaceHolder" runat="server">
<div class="header-title">
<h1>Management of Users
</h1>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="PageBodyPlaceHolder" runat="server">
<div class="row">
<div class="col-lg-6 col-sm-6 col-xs-12">
<asp:UpdatePanel ID="UpdatePanel"
UpdateMode="Conditional"
runat="server">
<ContentTemplate>
<div class="alert alert-success fade in" id="global_success" runat="server" visible="false">
<button class="close" title="Close the alert" data-dismiss="alert">
×
</button>
<i class="fa-fw fa fa-check"></i>
<strong>
<asp:Literal ID="global_success_msg" runat="server"></asp:Literal></strong>
</div>
<div class="alert alert-danger fade in" id="global_error" runat="server" visible="false">
<button class="close" title="Close the alert" data-dismiss="alert">
×
</button>
<i class="fa-fw fa fa-times"></i>
<strong>Error ! </strong>
<asp:Literal ID="global_error_msg" runat="server"></asp:Literal>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12">
<div class="form-group " style="float: left">
<asp:UpdatePanel ID="UpdAdd" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<ContentTemplate>
<asp:LinkButton ID="BtnNew" runat="server" OnClick="BtnNew_Click" CssClass="btn btn-blue-eu"> <i class="fa fa-plus"></i> Add New </asp:LinkButton>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="form-group" style="float: right">
<a class="btn btn-magenta" href="javascript:window.open('','_self')"><i class="fa fa-print"></i>Print List</a>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12">
<div class="widget">
<div class="widget-header ">
<span class="widget-caption this-search-widget-caption">Search</span>
</div>
<asp:UpdatePanel ID="upSearch" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="BtnSearch" EventName="Click" />
</Triggers>
<ContentTemplate>
<div class="widget-body">
<div>
<div class="row">
<div class="col-sm-7">
<div class="form-group ">
<asp:TextBox ID="txtSearch" runat="server" type="text"
class="form-control" placeholder="Type a username">
</asp:TextBox>
</div>
</div>
<div class="col-sm-4">
<asp:Button ID="BtnSearch" CssClass="btn btn-default" UseSubmitBehavior="false" runat="server" OnClick="BtnSearch_Click" Text="Search" />
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12">
<div class="well with-header with-footer">
<asp:UpdatePanel ID="upCrudGrid" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="header bordered-blueberry this-search-widget-caption">
<div style="float: left">List of Users</div>
<div style="float: right">Total : <span style="color: red"><%=l%> </span>Users </div>
</div>
<div runat="server" id="no_data">
<asp:Label ID="NoDatalbl" class="h3" runat="server"></asp:Label>
</div>
<asp:GridView
ID="EntGridView"
runat="server"
AutoGenerateColumns="False"
OnRowCommand="EntGridView_RowCommand"
AllowPaging="true"
OnRowDataBound="EntGridView_RowDataBound"
DataKeysName="ModuleID"
PageSize="10"
Style="font-size: 14px"
OnPreRender="EntGridView_PreRender"
OnPageIndexChanging="EntGridView_PageIndexChanging"
CssClass="table table-striped table-bordered table-hover ">
<AlternatingRowStyle BackColor="White" />
<Columns>
<asp:TemplateField ItemStyle-HorizontalAlign="Left"
HeaderText="Full Name">
<ItemTemplate>
<asp:HiddenField ID="UserID" Value='<%# Bind("UserID") %>' runat="server" />
<asp:Label ID="UserFullName" runat="server" Text='<%# Bind("UserFullName") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left"
HeaderText="Organization">
<ItemTemplate>
<asp:Label ID="UserOrganization" runat="server" Text='<%# Bind("UserOrganization") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left"
HeaderText="Title">
<ItemTemplate>
<asp:Label ID="UserTitle" runat="server" Text='<%# Bind("UserTitle") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left"
HeaderText="Username">
<ItemTemplate>
<asp:Label ID="Username" runat="server" Text='<%# Bind("Username") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left"
HeaderText="Email">
<ItemTemplate>
<asp:Label ID="UserMail" runat="server" Text='<%# Bind("UserMail") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left"
HeaderText="Phone">
<ItemTemplate>
<asp:Label ID="UserPhone" runat="server" Text='<%# Bind("UserPhone") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left"
HeaderText="Location">
<ItemTemplate>
<asp:Label ID="UserAddress" runat="server" Text='<%# Bind("UserAddress") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left"
HeaderText="Profile">
<ItemTemplate>
<asp:Label ID="ProfileName" runat="server" Text='<%# Bind("ProfileName") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left"
HeaderText="Note">
<ItemTemplate>
<asp:Label ID="UserNote" runat="server" Text='<%# Bind("UserNote") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left"
HeaderText="Active">
<ItemTemplate>
<asp:Label ID="UserActif" runat="server" Text='<%# Bind("UserActif") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left"
HeaderText="Last Modified By">
<ItemTemplate>
<asp:Label ID="LastModifiedPerson" runat="server" Text='<%# Bind("LastModifiedPerson") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Left"
HeaderText="Modified Date">
<ItemTemplate>
<asp:Label ID="LastModifiedDate" runat="server" Text='<%# Bind("LastModifiedDate" ,"{0:dd/MM/yyyy}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="ACTIONS" HeaderStyle-Width="11%">
<ItemTemplate>
<div class="row-command-preview" style="text-align: center">
<asp:LinkButton ID="btnEdit" runat="server" CommandArgument="<%# Container.DataItemIndex %>" CssClass="btn btn-default btn-xs purple" CommandName="view" Text="Update"><i class="fa fa-edit"></i> Update</asp:LinkButton>
<asp:LinkButton ID="btnDelete" runat="server" CommandArgument="<%# Container.DataItemIndex %>" CssClass="btn btn-default btn-xs red" CommandName="deleting" Text="Delete"><i class="fa fa-trash-o"></i> Delete</asp:LinkButton>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<PagerStyle HorizontalAlign="Center" CssClass="pagination-ys" />
<PagerSettings Position="Bottom"
Mode="Numeric"
FirstPageText="First"
LastPageText="Last"
NextPageText="Next"
PreviousPageText="Prev" />
</asp:GridView>
</ContentTemplate>
<Triggers></Triggers>
</asp:UpdatePanel>
<div id="addEdiModal" class="bootbox modal fade modal-silver in" tabindex="-1" role="dialog" style="display: none;" aria-hidden="true">
<asp:UpdatePanel ID="upEdit" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnSave" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="EntGridView" EventName="RowCommand" />
</Triggers>
<ContentTemplate>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">ContactHub</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12">
<div class="alert alert-danger fade in" id="Edit_global" runat="server" visible="false">
<button class="close" title="Close the alert" data-dismiss="alert">
×
</button>
<i class="fa-fw fa fa-check"></i>
<strong>
<asp:Literal ID="Edit_global_alert_msg" runat="server"></asp:Literal></strong>
</div>
</div>
</div>
<span class="alert-header darker">Add/Update a User</span>
<div>
<div class="row">
<div class="col-lg-6 col-sm-12 col-xs-12">
<div class="form-group">
<label for="txtUsername">Username</label>
<div class="form-group">
<asp:TextBox ID="txtUsername" runat="server" type="text"
data-bv-message="This value is not valid"
data-bv-notempty="true"
data-bv-notempty-message="Mandatory field. It should not be empty"
data-bv-regexp="true"
data-bv-regexp-regexp="[a-zA-Z0-9_\.]+"
data-bv-regexp-message="This field only accepts alphanumeric characters"
class="form-control" placeholder="">
</asp:TextBox>
</div>
</div>
</div>
<div class="col-lg-6 col-sm-12 col-xs-12">
<div class="form-group">
<label for="txtUserFullName">Full Name</label>
<div class="form-group">
<asp:TextBox ID="txtUserFullName" runat="server" type="text"
data-bv-message="This value should not be empty"
data-bv-notempty="true"
data-bv-notempty-message="Mandatory field. It should not be empty"
data-bv-regexp="true"
data-bv-regexp-regexp="[a-zA-Z0-9_\.]+"
data-bv-regexp-message="This field only accepts alphanumeric characters"
class="form-control" placeholder="">
</asp:TextBox>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-sm-12 col-xs-12">
<div class="form-group ">
<label for="txtUserOrganization">Organization</label>
<asp:TextBox ID="txtUserOrganization" runat="server" type="text"
data-bv-message="This value is not valid"
data-bv-notempty="true"
data-bv-notempty-message="This is a mandatory field. It should not be empty."
data-bv-regexp="true"
data-bv-regexp-regexp="[a-zA-Z0-9_\.]+"
data-bv-regexp-message="Only allows alphanumeric characters"
class="form-control" placeholder="">
</asp:TextBox>
</div>
</div>
<div class="col-lg-6 col-sm-12 col-xs-12">
<div class="form-group ">
<label for="txtUserTitle">Title</label>
<asp:TextBox ID="txtUserTitle" runat="server" type="text"
data-bv-message="This value is not valid"
data-bv-notempty="true"
data-bv-notempty-message="This is a mandatory field and can not be empty"
data-bv-regexp="true"
data-bv-regexp-regexp="[a-zA-Z0-9_\.]+"
data-bv-regexp-message="Only allows alphanumeric characters"
class="form-control" placeholder="">
</asp:TextBox>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-sm-12 col-xs-12">
<div class="form-group ">
<label for="txtUserMail">Email</label>
<asp:TextBox ID="txtUserMail" runat="server" type="text"
data-bv-message="This value is not valid"
data-bv-notempty="true"
data-bv-notempty-message="This is a mandatory field and can not be empty"
data-bv-regexp="true"
data-bv-regexp-regexp="[a-zA-Z0-9_\.]+"
data-bv-regexp-message="Only allows alphanumeric characters"
class="form-control" placeholder="">
</asp:TextBox>
</div>
</div>
<div class="col-lg-6 col-sm-12 col-xs-12">
<div class="form-group ">
<label for="txtUserPhone">Telephone</label>
<asp:TextBox ID="txtUserPhone" runat="server" type="text"
data-bv-message="This value is not valid"
data-bv-notempty="true"
data-bv-notempty-message="This is a mandatory field and can not be empty"
data-bv-regexp="true"
data-bv-regexp-regexp="[a-zA-Z0-9_\.]+"
data-bv-regexp-message="Only allows alphanumeric characters"
class="form-control" placeholder="">
</asp:TextBox>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12">
<div class="form-group ">
<label for="txtUserAddress">Address</label>
<asp:TextBox ID="txtUserAddress" runat="server" type="text"
data-bv-message="This value is not valid"
data-bv-notempty="true"
data-bv-notempty-message="This is a mandatory field and can not be empty"
data-bv-regexp="true"
data-bv-regexp-regexp="[a-zA-Z0-9_\.]+"
data-bv-regexp-message="Only allows alphanumeric characters"
class="form-control" placeholder="">
</asp:TextBox>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-sm-12 col-xs-12">
<div class="form-group ">
<label for="ddlProfile">Profile</label>
<div class="input-group date">
<div class="input-group-addon">
<i class="fa fa-map-marker" style="color: #3c8dbc"></i>
</div>
<asp:DropDownList runat="server" ID="ddlProfile" class="form-control select2"
data-allow-clear="true"
data-placeholder="Select a Sector of Interest"
data-bv-message="This value is not valid"
data-bv-notempty="true"
data-bv-notempty-message="This is a mandatory field and can not be empty"
data-bv-regexp="true">
</asp:DropDownList>
</div>
</div>
</div>
<div class="col-lg-6 col-sm-12 col-xs-12">
<div class="form-group ">
<label for="ddlUserActif">Active</label>
<div class="input-group date">
<div class="input-group-addon">
<i class="fa fa-map-marker" style="color: #3c8dbc"></i>
</div>
<asp:DropDownList runat="server" ID="ddlUserActif" class="form-control select2"
data-allow-clear="true"
data-placeholder="Select a Sector of Interest"
data-bv-message="This value is not valid"
data-bv-notempty="true"
data-bv-notempty-message="This is a mandatory field and can not be empty"
data-bv-regexp="true">
</asp:DropDownList>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12">
<div class="form-group ">
<label for="txtUserNote">Note</label>
<asp:TextBox ID="txtUserNote" runat="server" type="text"
data-bv-message="This value is not valid"
data-bv-notempty="true"
data-bv-notempty-message="This is a mandatory field and can not be empty"
data-bv-regexp="true"
data-bv-regexp-regexp="[a-zA-Z0-9_\.]+"
data-bv-regexp-message="Only allows alphanumeric characters"
TextMode="MultiLine" Rows="4"
class="form-control" placeholder="">
</asp:TextBox>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<asp:Button ID="BtnSave" CssClass="btn btn-orange" UseSubmitBehavior="false" runat="server" OnClick="BtnSave_Click" Text="Save" />
<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Cancel</button>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div id="deleteModal" class="bootbox modal fade modal-silver in" tabindex="-1" role="dialog" style="display: none;" aria-hidden="true">
<asp:UpdatePanel ID="upDel" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="true">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="BtnDelete" EventName="Click" />
</Triggers>
<ContentTemplate>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">ContactHub Lebanon</h4>
</div>
<div class="modal-body">
<asp:Label ID="lblDeletemessage" runat="server" Text="This data will be deleted. Please confirm"></asp:Label>
</div>
<div class="modal-footer">
<asp:Button ID="BtnDelete" UseSubmitBehavior="false" type="button" CssClass="btn btn-danger" runat="server" Text="Delete" OnClick="BtnDelete_Click" />
<button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Cancel</button>
</div>
</div>
<!-- /.modal-content -->
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="footer">
Execution time :
<asp:Literal ID="execTimeLit" runat="server"></asp:Literal>
</div>
</div>
</div>
</div>
</asp:Content>