-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEdit.ascx.cs
More file actions
862 lines (772 loc) · 47.3 KB
/
Edit.ascx.cs
File metadata and controls
862 lines (772 loc) · 47.3 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
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
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
/*
' Copyright (c) 2019 DevPCI
' All rights reserved.
'
' THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
' TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
' THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
' CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
' DEALINGS IN THE SOFTWARE.
'
*/
using System;
using DotNetNuke.Services.Exceptions;
using System.Collections;
using System.Web.UI.WebControls;
using DotNetNuke.Entities.Users;
using Telerik.Web.UI;
using System.Collections.Generic;
using System.Linq;
using DotNetNuke.UI.WebControls;
using DotNetNuke.Entities.Modules;
using DotNetNuke.Services.Localization;
using DotNetNuke.UI.Utilities;
using DotNetNuke.Web.UI.WebControls;
using DevPCI.Modules.DDT_Org_Chart;
using DotNetNuke.Common;
namespace DevPCI.Modules.DDT_Org_Chart
{
/// -----------------------------------------------------------------------------
/// <summary>
/// The EditDDT_Org_Chart class is used to manage content
/// </summary>
/// -----------------------------------------------------------------------------
public partial class Edit : DDT_Org_ChartModuleBase
{
public bool? IsRadAsyncValid
{
get
{
if (Session["IsRadAsyncValid"] == null)
{
Session["IsRadAsyncValid"] = true;
}
return Convert.ToBoolean(Session["IsRadAsyncValid"].ToString());
}
set
{
Session["IsRadAsyncValid"] = value;
}
}
#region Event Handlers
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
hlCancel.NavigateUrl = Globals.NavigateURL();
var dnnversion = Convert.ToString(DotNetNuke.Application.DotNetNukeContext.Current.Application.Version);
var mainV = dnnversion.Substring(0,dnnversion.IndexOf(".")).Trim();
LblDNNVersion.Text = mainV;
int v = Convert.ToInt32(mainV);
if(v>6)
{
phdnn7filepickercsshack.Visible = true;
}
}
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
/// -----------------------------------------------------------------------------
/// <summary>
/// Page_Load runs when the control is loaded
/// </summary>
/// -----------------------------------------------------------------------------
private void Page_Load(object sender, System.EventArgs e)
{
try
{
//DotNetNuke.Framework.jQuery.RequestRegistration();
//Implement your edit logic for your module
lblPortalID.Text = PortalId.ToString();
lblModuleID.Text = ModuleId.ToString();
PhMessageNotif3.Visible = false;
//bool IsHost = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
//lblIsSuperUser.Text = Convert.ToString( UserController.Instance.GetCurrentUserInfo().IsSuperUser);
if (Settings["Skin"] != null)
{
RG_Items_Simple.Skin = Convert.ToString(Settings["Skin"]);
RG_Teams.Skin = Convert.ToString(Settings["Skin"]);
RG_Items_WithGroup.Skin = Convert.ToString(Settings["Skin"]);
}
else
{
RG_Items_Simple.Skin = "Default";
RG_Teams.Skin = "Default";
RG_Items_WithGroup.Skin = "Default";
}
CheckBoxIsSuperUser.Checked = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
if (Settings["Mode"] != null)
{
LblMode.Text = Convert.ToString(Settings["Mode"]);
}
else { LblMode.Text = "Simple"; }
if (LblMode.Text == "Simple") // Mode Simple Without Team
{
PHSimple.Visible = true;
PHWithGroup.Visible = false;
}
else if (LblMode.Text == "WithGroup") // Mode With Team
{
PHSimple.Visible = false;
PHWithGroup.Visible = true;
}
}
catch (Exception exc) //Module failed to load
{
Exceptions.ProcessModuleLoadException(this, exc);
}
}
private void SynchronizeModuleLastContentModifiedOnDate()
{
//Synchronise module (update Modules LastContentModifiedOnDate)
ModuleController.SynchronizeModule(this.ModuleId);
//clear page cache
ModuleController modules = new ModuleController();
modules.ClearCache(TabId);
}
protected void LDS_Org_Chart_Items_Selecting(object sender, LinqDataSourceSelectEventArgs e)
{
DDT_Org_Chart_LinqDataContext linqContext = new DDT_Org_Chart_LinqDataContext();
var XItem = from DDT_Org_Chart_Item tmp in linqContext.DDT_Org_Chart_Items
where tmp.PortalID == PortalId && tmp.ModuleID == ModuleId
select new { tmp.ID_Org_Chart_Item, tmp.ID_Org_Chart_Node, tmp.IsActive, tmp.IsDeleted, tmp.ItemName_Org_Chart, tmp.ItemOrder_Org_Chart, tmp.ItemTitle_Org_Chart, tmp.LastModifiedByUserID, tmp.LastModifiedOnDate, tmp.ModuleID, tmp.PortalID, tmp.Collapsed, tmp.CreatedByUserID, tmp.CreatedOnDate, tmp.ItemImageUrl_Org_Chart };
e.Result = XItem;
}
#endregion
#region GetTelerikGridSelections
//Region to allow the soft delete
public ArrayList GetTelerikGridSelections(Telerik.Web.UI.RadGrid grid)
{
ArrayList selectedItems = new ArrayList();
if (grid.MasterTableView.DataKeyNames.Length > 0)
{
string key = grid.MasterTableView.DataKeyNames[0];
for (int i = 0; i < grid.SelectedItems.Count; i++)
{
selectedItems.Add(grid.MasterTableView.DataKeyValues[grid.SelectedItems[i].ItemIndex][key]);
}
}
return selectedItems;
}
//End of Region
#endregion
#region Action RG_Items_Simple
protected void RG_Items_Simple_SoftDeleteSelected(object sender, CommandEventArgs e)
{
ArrayList MaListDeSelected = GetTelerikGridSelections(RG_Items_Simple);
int nb = MaListDeSelected.Count;
for (int i = 0; i < nb; i++)
{
int IdASoftDelete = Convert.ToInt32(MaListDeSelected[i]);
DDT_Org_Chart_LinqDataContext linqContext = new DDT_Org_Chart_LinqDataContext();
var XItem = from DDT_Org_Chart_Item tmp in linqContext.DDT_Org_Chart_Items
where tmp.ID_Org_Chart_Item == IdASoftDelete
select tmp;
DDT_Org_Chart_Item ItemSoftDelete = XItem.First();
var XTeam = from DDT_Org_Chart_Item tmp in linqContext.DDT_Org_Chart_Items
where tmp.ID_Org_Chart_Node == IdASoftDelete && tmp.IsDeleted == false
select tmp;
if (XTeam.Count() != 0)
{
PhMessageNotif3.Visible = true;
LblMessageNotif3.Text = "The node can not be deleted as long as there are items attached to this node";
}
else
{
ItemSoftDelete.IsDeleted = true;
linqContext.SubmitChanges();
PhMessageNotif3.Visible = false;
}
}
RG_Items_Simple.DataBind();
SynchronizeModuleLastContentModifiedOnDate();
}
protected void RG_Items_Simple_Load(object sender, EventArgs e)
{
//Management of the display of the fields only intended for the Hosts.
//this.RG_Items_Simple.Columns.FindByUniqueName("ID_Org_Chart_Item").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
//this.RG_Items_Simple.Columns.FindByUniqueName("PortalID").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
//this.RG_Items_Simple.Columns.FindByUniqueName("ModuleID").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
//this.RG_Items_Simple.Columns.FindByUniqueName("ItemOrder_Org_Chart").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
this.RG_Items_Simple.Columns.FindByUniqueName("ID_Org_Chart_Item").Visible = false;
this.RG_Items_Simple.Columns.FindByUniqueName("PortalID").Visible = false;
this.RG_Items_Simple.Columns.FindByUniqueName("ModuleID").Visible = false;
this.RG_Items_Simple.Columns.FindByUniqueName("ItemOrder_Org_Chart").Visible = false;
//this.RG_Items_Simple.Columns.FindByUniqueName("IsActive").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
//this.RG_Items_Simple.Columns.FindByUniqueName("IsDeleted").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
//CreatedByUserID fields CreatedOnDate LastModifiedByUserID LastModifiedOnDate Not visible
this.RG_Items_Simple.Columns.FindByUniqueName("CreatedByUserID").Visible = false;
this.RG_Items_Simple.Columns.FindByUniqueName("CreatedOnDate").Visible = false;
this.RG_Items_Simple.Columns.FindByUniqueName("LastModifiedByUserID").Visible = false;
this.RG_Items_Simple.Columns.FindByUniqueName("LastModifiedOnDate").Visible = false;
}
protected void DDT_Org_Chart_ItemlnkOrderDown_Click(object sender, EventArgs e)
{
LinkButton linkButton = sender as LinkButton;
int id = int.Parse(linkButton.CommandArgument.ToString());
DDT_Org_Chart_ItemApplyOrder(id, +1);
this.RG_Items_Simple.Rebind();
SynchronizeModuleLastContentModifiedOnDate();
}
protected void DDT_Org_Chart_ItemlnkOrderUp_Click(object sender, EventArgs e)
{
LinkButton linkButton = sender as LinkButton;
int id = int.Parse(linkButton.CommandArgument.ToString());
DDT_Org_Chart_ItemApplyOrder(id, -1);
this.RG_Items_Simple.Rebind();
SynchronizeModuleLastContentModifiedOnDate();
}
//Initialization to 0 of the count
int countDDT_Org_Chart_Items = 0;
//Setting up the Move Up and Move Down Link Display Mechanism
protected void RG_Items_Simple_ItemDataBound(object sender, GridItemEventArgs e)
{
//Processing mechanism to fill the fields PortalId and Order automatically when adding.Item.DataSetIndex == -1
//to verify that we are in a case of insertion of a new line and no update of lines
if ((e.Item.IsInEditMode) && (e.Item.DataSetIndex == -1))
{
//Code before loading the form (allows to load the different components of the form) PortalId
TextBox box = e.Item.FindControl("PortalIDTextBox") as TextBox;
box.Text = Convert.ToString(PortalId);
//The ModuleID
TextBox box2 = e.Item.FindControl("ModuleIDTextBox") as TextBox;
box2.Text = Convert.ToString(ModuleId);
//An order equal to the last +1
DDT_Org_Chart_LinqDataContext linqContext = new DDT_Org_Chart_LinqDataContext();
var MyOrderDDT_Org_Chart_Item = from DDT_Org_Chart_Item tmp in linqContext.DDT_Org_Chart_Items
where tmp.PortalID == PortalId
// orderby tmp.Order_Sectors descending. so we have the highest value in First (first)
orderby tmp.ItemOrder_Org_Chart descending
select tmp.ItemOrder_Org_Chart;
int? lastorder = 0;
if (MyOrderDDT_Org_Chart_Item.Count() > 0)
{
lastorder = MyOrderDDT_Org_Chart_Item.First();
}
// e.Result = comptelist;
TextBox boxOrder = e.Item.FindControl("OrderIDTextBox") as TextBox;
boxOrder.Text = Convert.ToString(lastorder + 1);
//Inserts Fields CreatedByUserID CreatedOnDate LastModifiedByUserID LastModifiedOnDate
TextBox tbCreatedByUserID = e.Item.FindControl("CreatedByUserID_TB") as TextBox;
tbCreatedByUserID.Text = Convert.ToString(UserController.Instance.GetCurrentUserInfo().UserID);
TextBox tbCreatedOnDate = e.Item.FindControl("CreatedOnDate_TB") as TextBox;
tbCreatedOnDate.Text = Convert.ToString(DateTime.Now);
TextBox tbLastModifiedByUserID = e.Item.FindControl("LastModifiedByUserID_TB") as TextBox;
tbLastModifiedByUserID.Text = Convert.ToString(UserController.Instance.GetCurrentUserInfo().UserID);
TextBox tbLastModifiedOnDate = e.Item.FindControl("LastModifiedOnDate_TB") as TextBox;
tbLastModifiedOnDate.Text = Convert.ToString(DateTime.Now);
}
//update case Updating the LastModifiedByUserID and LastModifiedOnDate fields
else if ((e.Item.IsInEditMode) && (e.Item.DataSetIndex != -1))
{
TextBox tbLastModifiedByUserID = e.Item.FindControl("LastModifiedByUserID_TB") as TextBox;
tbLastModifiedByUserID.Text = Convert.ToString(UserController.Instance.GetCurrentUserInfo().UserID);
TextBox tbLastModifiedOnDate = e.Item.FindControl("LastModifiedOnDate_TB") as TextBox;
tbLastModifiedOnDate.Text = Convert.ToString(DateTime.Now);
//Fix Filepicker V S
DnnFilePicker myfileP = e.Item.FindControl("FilePickerSimple") as DnnFilePicker;
if(myfileP.FilePath.Contains("//"))
{
myfileP.FilePath = myfileP.FilePath.Replace("//", "/");
}
//End Fix Filepicker V S
SynchronizeModuleLastContentModifiedOnDate();
}
//End Mechanism of treatment allowing to fill the fields PortalId and Order in automatic
//Setting up the Move Up and Move Down Link Display Mechanism
if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
{
//test if countSectors = 0, if yes, ask linq
if (countDDT_Org_Chart_Items == 0)
{
DDT_Org_Chart_LinqDataContext linqContext = new DDT_Org_Chart_LinqDataContext();
var lDDT_Org_Chart_Items = from DDT_Org_Chart_Item DDT_Org_Chart_Item in linqContext.DDT_Org_Chart_Items
where DDT_Org_Chart_Item.PortalID == PortalId && DDT_Org_Chart_Item.IsDeleted == false && DDT_Org_Chart_Item.ModuleID == ModuleId
|| DDT_Org_Chart_Item.PortalID == PortalId && DDT_Org_Chart_Item.IsDeleted == UserController.Instance.GetCurrentUserInfo().IsSuperUser && DDT_Org_Chart_Item.ModuleID == ModuleId
select DDT_Org_Chart_Item;
//followed by .Count () to get the number
countDDT_Org_Chart_Items = lDDT_Org_Chart_Items.Count();
}
//We initialize index and get it from RadGrid (index of the first line is 0)
int index = e.Item.ItemIndex;
//Processing of the down button display (all lines except the last one (index! = CountSectors-1))
LinkButton DDT_Org_Chart_ItemlnkOrderDown = e.Item.FindControl("DDT_Org_Chart_ItemlnkOrderDown") as LinkButton;
if (DDT_Org_Chart_ItemlnkOrderDown != null)
{
DDT_Org_Chart_ItemlnkOrderDown.Visible = (index != countDDT_Org_Chart_Items - 1);
}
//Processing of the down button display (all lines except the first (index! = 0))
LinkButton DDT_Org_Chart_ItemlnkOrderUp = e.Item.FindControl("DDT_Org_Chart_ItemlnkOrderUp") as LinkButton;
if (DDT_Org_Chart_ItemlnkOrderUp != null)
{
DDT_Org_Chart_ItemlnkOrderUp.Visible = (index != 0);
}
//End Move Up and Move Down Link Display Mechanism
}
}
private void DDT_Org_Chart_ItemApplyOrder(int id, int step) // Apply Order avec invertion des valeurs d'ordre
{
DDT_Org_Chart_LinqDataContext linqContext = new DDT_Org_Chart_LinqDataContext();
var lDDT_Org_Chart_Items = from DDT_Org_Chart_Item DDT_Org_Chart_Item in linqContext.DDT_Org_Chart_Items
where DDT_Org_Chart_Item.PortalID == PortalId && DDT_Org_Chart_Item.ModuleID == ModuleId
// where DDT_Org_Chart_Item.PortalID == PortalId && DDT_Org_Chart_Item.IsDeleted == false && DDT_Org_Chart_Item.ModuleID == ModuleId
// || DDT_Org_Chart_Item.PortalID == PortalId && DDT_Org_Chart_Item.IsDeleted == UserController.Instance.GetCurrentUserInfo().IsSuperUser && DDT_Org_Chart_Item.ModuleID == ModuleId
orderby DDT_Org_Chart_Item.ItemOrder_Org_Chart
select DDT_Org_Chart_Item;
if ((lDDT_Org_Chart_Items != null) && (lDDT_Org_Chart_Items.Count() > 0))
{
List<DDT_Org_Chart_Item> DDT_Org_Chart_Items = lDDT_Org_Chart_Items.ToList<DDT_Org_Chart_Item>();
//Index initialization
int index = 0;
int orderNullable = 0;
//We loop on the list
foreach (DDT_Org_Chart_Item DDT_Org_Chart_Item in DDT_Org_Chart_Items)
{
if (DDT_Org_Chart_Item.ID_Org_Chart_Item == id)
{
if (DDT_Org_Chart_Items.ElementAt(index + step).ItemOrder_Org_Chart != null)
//{
orderNullable = Convert.ToInt32(DDT_Org_Chart_Item.ItemOrder_Org_Chart);
DDT_Org_Chart_Item.ItemOrder_Org_Chart = DDT_Org_Chart_Items.ElementAt(index + step).ItemOrder_Org_Chart;
DDT_Org_Chart_Items.ElementAt(index + step).ItemOrder_Org_Chart = orderNullable;
// Sending linq changes to the database
linqContext.SubmitChanges();
//}
}
index++;
}
}
SynchronizeModuleLastContentModifiedOnDate();
}
#endregion
#region Action RG_Teams
protected void RG_Teams_SoftDeleteSelected(object sender, CommandEventArgs e)
{
ArrayList MaListDeSelected = GetTelerikGridSelections(RG_Teams);
int nb = MaListDeSelected.Count;
for (int i = 0; i < nb; i++)
{
int IdASoftDelete = Convert.ToInt32(MaListDeSelected[i]);
DDT_Org_Chart_LinqDataContext linqContext = new DDT_Org_Chart_LinqDataContext();
var XNode = from DDT_Org_Chart_Node tmp in linqContext.DDT_Org_Chart_Nodes
where tmp.ID_Org_Chart_Node == IdASoftDelete
select tmp;
DDT_Org_Chart_Node NodeSoftDelete = XNode.First();
var XTeam = from DDT_Org_Chart_Item tmp in linqContext.DDT_Org_Chart_Items
where tmp.ID_Org_Chart_Node == IdASoftDelete && tmp.IsDeleted == false
select tmp;
if (XTeam.Count() != 0)
{
PhMessageNotif3.Visible = true;
LblMessageNotif3.Text = "Le noeud ne peut pas être supprimé tant qu'il y a des items attachés a ce noeud";
}
else
{
NodeSoftDelete.IsDeleted = true;
linqContext.SubmitChanges();
PhMessageNotif3.Visible = false;
}
}
RG_Teams.DataBind();
SynchronizeModuleLastContentModifiedOnDate();
}
protected void RG_Teams_Load(object sender, EventArgs e)
{
//Management of the display of the fields only intended for the Hosts.
//this.RG_Teams.Columns.FindByUniqueName("ID_Org_Chart_Node").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
//this.RG_Teams.Columns.FindByUniqueName("PortalID").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
//this.RG_Teams.Columns.FindByUniqueName("ModuleID").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
//this.RG_Teams.Columns.FindByUniqueName("NodeOrder_Org_Chart").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
this.RG_Teams.Columns.FindByUniqueName("ID_Org_Chart_Node").Visible = false;
this.RG_Teams.Columns.FindByUniqueName("PortalID").Visible = false;
this.RG_Teams.Columns.FindByUniqueName("ModuleID").Visible = false;
this.RG_Teams.Columns.FindByUniqueName("NodeOrder_Org_Chart").Visible = false;
//this.RG_Teams.Columns.FindByUniqueName("IsActive").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
//this.RG_Teams.Columns.FindByUniqueName("IsDeleted").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
// CreatedByUserID fields CreatedOnDate LastModifiedByUserID LastModifiedOnDate Not visible
this.RG_Teams.Columns.FindByUniqueName("CreatedByUserID").Visible = false;
this.RG_Teams.Columns.FindByUniqueName("CreatedOnDate").Visible = false;
this.RG_Teams.Columns.FindByUniqueName("LastModifiedByUserID").Visible = false;
this.RG_Teams.Columns.FindByUniqueName("LastModifiedOnDate").Visible = false;
}
protected void DDT_Org_Chart_NodelnkOrderDown_Click(object sender, EventArgs e)
{
LinkButton linkButton = sender as LinkButton;
int id = int.Parse(linkButton.CommandArgument.ToString());
DDT_Org_Chart_NodeApplyOrder(id, +1);
this.RG_Teams.Rebind();
SynchronizeModuleLastContentModifiedOnDate();
}
protected void DDT_Org_Chart_NodelnkOrderUp_Click(object sender, EventArgs e)
{
LinkButton linkButton = sender as LinkButton;
int id = int.Parse(linkButton.CommandArgument.ToString());
DDT_Org_Chart_NodeApplyOrder(id, -1);
this.RG_Teams.Rebind();
SynchronizeModuleLastContentModifiedOnDate();
}
//Initialization at 0 of the count
int countDDT_Org_Chart_Nodes = 0;
//Setting up the Move Up and Move Down Link Display Mechanism
protected void RG_Teams_ItemDataBound(object sender, GridItemEventArgs e)
{
//Processing mechanism allowing to fill the fields PortalId and Order automatically when adding e.Item.DataSetIndex == -1
//makes it possible to check that one is in a case of insert of a new line and not of update of lines
if ((e.Item.IsInEditMode) && (e.Item.DataSetIndex == -1))
{
//Code before loading the form (allows to load the different components of the form)
//The PortailId
TextBox box = e.Item.FindControl("PortalIDTextBox") as TextBox;
box.Text = Convert.ToString(PortalId);
//The ModuleID
TextBox box2 = e.Item.FindControl("ModuleIDTextBox") as TextBox;
box2.Text = Convert.ToString(ModuleId);
//An order equal to the last +1
DDT_Org_Chart_LinqDataContext linqContext = new DDT_Org_Chart_LinqDataContext();
var MyOrderDDT_Org_Chart_Node = from DDT_Org_Chart_Node tmp in linqContext.DDT_Org_Chart_Nodes
where tmp.PortalID == PortalId
// orderby tmp.Order_Secteurs descending. on a donc la valeur la plus forte en Premier (first)
orderby tmp.NodeOrder_Org_Chart descending
select tmp.NodeOrder_Org_Chart;
int? lastorder = 0;
if (MyOrderDDT_Org_Chart_Node.Count() > 0)
{
lastorder = MyOrderDDT_Org_Chart_Node.First();
}
// e.Result = comptelist;
TextBox boxOrder = e.Item.FindControl("OrderIDTextBox") as TextBox;
boxOrder.Text = Convert.ToString(lastorder + 1);
//Inserts Fields CreatedByUserID CreatedOnDate LastModifiedByUserID LastModifiedOnDate
TextBox tbCreatedByUserID = e.Item.FindControl("CreatedByUserID_TB") as TextBox;
tbCreatedByUserID.Text = Convert.ToString(UserController.Instance.GetCurrentUserInfo().UserID);
TextBox tbCreatedOnDate = e.Item.FindControl("CreatedOnDate_TB") as TextBox;
tbCreatedOnDate.Text = Convert.ToString(DateTime.Now);
TextBox tbLastModifiedByUserID = e.Item.FindControl("LastModifiedByUserID_TB") as TextBox;
tbLastModifiedByUserID.Text = Convert.ToString(UserController.Instance.GetCurrentUserInfo().UserID);
TextBox tbLastModifiedOnDate = e.Item.FindControl("LastModifiedOnDate_TB") as TextBox;
tbLastModifiedOnDate.Text = Convert.ToString(DateTime.Now);
}
//update case Updating the LastModifiedByUserID and LastModifiedOnDate fields
else if ((e.Item.IsInEditMode) && (e.Item.DataSetIndex != -1))
{
TextBox tbLastModifiedByUserID = e.Item.FindControl("LastModifiedByUserID_TB") as TextBox;
tbLastModifiedByUserID.Text = Convert.ToString(UserController.Instance.GetCurrentUserInfo().UserID);
TextBox tbLastModifiedOnDate = e.Item.FindControl("LastModifiedOnDate_TB") as TextBox;
tbLastModifiedOnDate.Text = Convert.ToString(DateTime.Now);
SynchronizeModuleLastContentModifiedOnDate();
}
//End Mechanism of treatment allowing to fill the fields PortalId and Order in automatically
//Setting up the Move Up and Move Down Link Display Mechanism
if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
{
//Test if countSectors = 0, if yes, ask linq
if (countDDT_Org_Chart_Nodes == 0)
{
DDT_Org_Chart_LinqDataContext linqContext = new DDT_Org_Chart_LinqDataContext();
var lDDT_Org_Chart_Nodes = from DDT_Org_Chart_Node DDT_Org_Chart_Node in linqContext.DDT_Org_Chart_Nodes
where DDT_Org_Chart_Node.PortalID == PortalId && DDT_Org_Chart_Node.IsDeleted == false && DDT_Org_Chart_Node.ModuleID == ModuleId
|| DDT_Org_Chart_Node.PortalID == PortalId && DDT_Org_Chart_Node.IsDeleted == UserController.Instance.GetCurrentUserInfo().IsSuperUser && DDT_Org_Chart_Node.ModuleID == ModuleId
select DDT_Org_Chart_Node;
//Followed by .Count () to get the number.
countDDT_Org_Chart_Nodes = lDDT_Org_Chart_Nodes.Count();
}
//we initialize index and get it from RadGrid (index of the first line is 0)
int index = e.Item.ItemIndex;
//Processing of the down button display (all lines except the last one (index! = CountSectors-1))
LinkButton DDT_Org_Chart_NodelnkOrderDown = e.Item.FindControl("DDT_Org_Chart_NodelnkOrderDown") as LinkButton;
if (DDT_Org_Chart_NodelnkOrderDown != null)
{
DDT_Org_Chart_NodelnkOrderDown.Visible = (index != countDDT_Org_Chart_Nodes - 1);
}
//Processing of the down button display (all lines except the first (index! = 0))
LinkButton DDT_Org_Chart_NodelnkOrderUp = e.Item.FindControl("DDT_Org_Chart_NodelnkOrderUp") as LinkButton;
if (DDT_Org_Chart_NodelnkOrderUp != null)
{
DDT_Org_Chart_NodelnkOrderUp.Visible = (index != 0);
}
//End Move Up and Move Down Link Display Mechanism
}
}
private void DDT_Org_Chart_NodeApplyOrder(int id, int step) // Apply Order with inversion of order values
{
DDT_Org_Chart_LinqDataContext linqContext = new DDT_Org_Chart_LinqDataContext();
var lDDT_Org_Chart_Nodes = from DDT_Org_Chart_Node DDT_Org_Chart_Node in linqContext.DDT_Org_Chart_Nodes
where DDT_Org_Chart_Node.PortalID == PortalId && DDT_Org_Chart_Node.ModuleID == ModuleId
// where DDT_Org_Chart_Node.PortalID == PortalId && DDT_Org_Chart_Node.IsDeleted == false && DDT_Org_Chart_Node.ModuleID == ModuleId
// || DDT_Org_Chart_Node.PortalID == PortalId && DDT_Org_Chart_Node.IsDeleted == UserController.Instance.GetCurrentUserInfo().IsSuperUser && DDT_Org_Chart_Node.ModuleID == ModuleId
orderby DDT_Org_Chart_Node.NodeOrder_Org_Chart
select DDT_Org_Chart_Node;
if ((lDDT_Org_Chart_Nodes != null) && (lDDT_Org_Chart_Nodes.Count() > 0))
{
List<DDT_Org_Chart_Node> DDT_Org_Chart_Nodes = lDDT_Org_Chart_Nodes.ToList<DDT_Org_Chart_Node>();
//Index initialization
int index = 0;
int orderNullable = 0;
//We loop on the list
foreach (DDT_Org_Chart_Node DDT_Org_Chart_Node in DDT_Org_Chart_Nodes)
{
if (DDT_Org_Chart_Node.ID_Org_Chart_Node == id)
{
if (DDT_Org_Chart_Nodes.ElementAt(index + step).NodeOrder_Org_Chart != null)
//{
orderNullable = Convert.ToInt32(DDT_Org_Chart_Node.NodeOrder_Org_Chart);
DDT_Org_Chart_Node.NodeOrder_Org_Chart = DDT_Org_Chart_Nodes.ElementAt(index + step).NodeOrder_Org_Chart;
DDT_Org_Chart_Nodes.ElementAt(index + step).NodeOrder_Org_Chart = orderNullable;
// Sending linq changes to the database
linqContext.SubmitChanges();
//}
}
index++;
}
}
SynchronizeModuleLastContentModifiedOnDate();
}
#endregion
#region Action RG_Items_WithGroup
protected void DDT_Org_Chart_ItemDeleteImage_Click (object sender, EventArgs e)
{
LinkButton linkButton = sender as LinkButton;
int IdADelete = int.Parse(linkButton.CommandArgument.ToString());
DDT_Org_Chart_LinqDataContext linqContext = new DDT_Org_Chart_LinqDataContext();
var XItem = from DDT_Org_Chart_Item tmp in linqContext.DDT_Org_Chart_Items
where tmp.ID_Org_Chart_Item == IdADelete
select tmp;
DDT_Org_Chart_Item ItemSoftDelete = XItem.First();
ItemSoftDelete.ItemImageUrl_Org_Chart = null;
linqContext.SubmitChanges();
RG_Items_WithGroup.DataBind();
RG_Items_Simple.DataBind();
SynchronizeModuleLastContentModifiedOnDate();
}
protected void RG_Items_WithGroup_SoftDeleteSelected(object sender, CommandEventArgs e)
{
ArrayList MaListDeSelected = GetTelerikGridSelections(RG_Items_WithGroup);
int nb = MaListDeSelected.Count;
for (int i = 0; i < nb; i++)
{
int IdASoftDelete = Convert.ToInt32(MaListDeSelected[i]);
DDT_Org_Chart_LinqDataContext linqContext = new DDT_Org_Chart_LinqDataContext();
var XItem = from DDT_Org_Chart_Item tmp in linqContext.DDT_Org_Chart_Items
where tmp.ID_Org_Chart_Item == IdASoftDelete
select tmp;
DDT_Org_Chart_Item ItemSoftDelete = XItem.First();
ItemSoftDelete.IsDeleted = true;
linqContext.SubmitChanges();
PhMessageNotif3.Visible = false;
}
RG_Items_WithGroup.DataBind();
SynchronizeModuleLastContentModifiedOnDate();
}
protected void RG_Items_WithGroup_Load(object sender, EventArgs e)
{
//Management of the display of the fields only intended for the Hosts.
//this.RG_Items_WithGroup.Columns.FindByUniqueName("ID_Org_Chart_Item").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
//this.RG_Items_WithGroup.Columns.FindByUniqueName("PortalID").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
//this.RG_Items_WithGroup.Columns.FindByUniqueName("ModuleID").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
//this.RG_Items_WithGroup.Columns.FindByUniqueName("ItemOrder_Org_Chart").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
this.RG_Items_WithGroup.Columns.FindByUniqueName("ID_Org_Chart_Item").Visible = false;
this.RG_Items_WithGroup.Columns.FindByUniqueName("PortalID").Visible = false;
this.RG_Items_WithGroup.Columns.FindByUniqueName("ModuleID").Visible = false;
this.RG_Items_WithGroup.Columns.FindByUniqueName("ItemOrder_Org_Chart").Visible = false;
//this.RG_Items_WithGroup.Columns.FindByUniqueName("IsActive").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
//this.RG_Items_WithGroup.Columns.FindByUniqueName("IsDeleted").Visible = UserController.Instance.GetCurrentUserInfo().IsSuperUser;
// CreatedByUserID fields CreatedOnDate LastModifiedByUserID LastModifiedOnDate Not visible
this.RG_Items_WithGroup.Columns.FindByUniqueName("CreatedByUserID").Visible = false;
this.RG_Items_WithGroup.Columns.FindByUniqueName("CreatedOnDate").Visible = false;
this.RG_Items_WithGroup.Columns.FindByUniqueName("LastModifiedByUserID").Visible = false;
this.RG_Items_WithGroup.Columns.FindByUniqueName("LastModifiedOnDate").Visible = false;
}
protected void DDT_Org_Chart_Item2lnkOrderDown_Click(object sender, EventArgs e)
{
LinkButton linkButton = sender as LinkButton;
int id = int.Parse(linkButton.CommandArgument.ToString());
DDT_Org_Chart_Item2ApplyOrder(id, +1);
this.RG_Items_WithGroup.Rebind();
SynchronizeModuleLastContentModifiedOnDate();
}
protected void DDT_Org_Chart_Item2lnkOrderUp_Click(object sender, EventArgs e)
{
LinkButton linkButton = sender as LinkButton;
int id = int.Parse(linkButton.CommandArgument.ToString());
DDT_Org_Chart_Item2ApplyOrder(id, -1);
this.RG_Items_WithGroup.Rebind();
SynchronizeModuleLastContentModifiedOnDate();
}
//Initialization to 0 of the count
int countDDT_Org_Chart_Items2 = 0;
//Setting up the Move Up and Move Down Link Display Mechanism
protected void RG_Items_WithGroup_ItemDataBound(object sender, GridItemEventArgs e)
{
//Processing mechanism allowing to fill the fields PortalId and Order automatically when adding e.Item.DataSetIndex == -1
//makes it possible to check that one is in a case of insert of a new line and not of update of lines
if ((e.Item.IsInEditMode) && (e.Item.DataSetIndex == -1))
{
//Code before loading the form (allows to load the different components of the form)
//The PortailId
TextBox box = e.Item.FindControl("PortalIDTextBox") as TextBox;
box.Text = Convert.ToString(PortalId);
//The ModuleID
TextBox box2 = e.Item.FindControl("ModuleIDTextBox") as TextBox;
box2.Text = Convert.ToString(ModuleId);
//An order equal to the last +1
DDT_Org_Chart_LinqDataContext linqContext = new DDT_Org_Chart_LinqDataContext();
var MyOrderDDT_Org_Chart_Item = from DDT_Org_Chart_Item tmp in linqContext.DDT_Org_Chart_Items
where tmp.PortalID == PortalId
// orderby tmp.Order_Secteurs descending. on a donc la valeur la plus forte en Premier (first)
orderby tmp.ItemOrder_Org_Chart descending
select tmp.ItemOrder_Org_Chart;
int? lastorder = 0;
if (MyOrderDDT_Org_Chart_Item.Count() > 0)
{
lastorder = MyOrderDDT_Org_Chart_Item.First();
}
// e.Result = comptelist;
TextBox boxOrder = e.Item.FindControl("OrderIDTextBox") as TextBox;
boxOrder.Text = Convert.ToString(lastorder + 1);
//Inserts Fields CreatedByUserID CreatedOnDate LastModifiedByUserID LastModifiedOnDate
TextBox tbCreatedByUserID = e.Item.FindControl("CreatedByUserID_TB") as TextBox;
tbCreatedByUserID.Text = Convert.ToString(UserController.Instance.GetCurrentUserInfo().UserID);
TextBox tbCreatedOnDate = e.Item.FindControl("CreatedOnDate_TB") as TextBox;
tbCreatedOnDate.Text = Convert.ToString(DateTime.Now);
TextBox tbLastModifiedByUserID = e.Item.FindControl("LastModifiedByUserID_TB") as TextBox;
tbLastModifiedByUserID.Text = Convert.ToString(UserController.Instance.GetCurrentUserInfo().UserID);
TextBox tbLastModifiedOnDate = e.Item.FindControl("LastModifiedOnDate_TB") as TextBox;
tbLastModifiedOnDate.Text = Convert.ToString(DateTime.Now);
}
//Update case Updating the LastModifiedByUserID and LastModifiedOnDate fields
else if ((e.Item.IsInEditMode) && (e.Item.DataSetIndex != -1))
{
TextBox tbLastModifiedByUserID = e.Item.FindControl("LastModifiedByUserID_TB") as TextBox;
tbLastModifiedByUserID.Text = Convert.ToString(UserController.Instance.GetCurrentUserInfo().UserID);
TextBox tbLastModifiedOnDate = e.Item.FindControl("LastModifiedOnDate_TB") as TextBox;
tbLastModifiedOnDate.Text = Convert.ToString(DateTime.Now);
//Fix Filepicker V S
//DnnFilePicker myfileP = e.Item.FindControl("FilePickerSimple") as DnnFilePicker;
DnnFilePicker myfileP = e.Item.FindControl("FilePickerSimple") as DnnFilePicker;
if (myfileP.FilePath.Contains("//"))
{
myfileP.FilePath = myfileP.FilePath.Replace("//", "/");
}
//End fix Filepicker V S
SynchronizeModuleLastContentModifiedOnDate();
}
//End Mechanism of treatment allowing to fill the fields PortalId and Order in automatic
//Setting up the Move Up and Move Down Link Display Mechanism
if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
{
//test if countSectors = 0, if yes, ask linq
if (countDDT_Org_Chart_Items2 == 0)
{
DDT_Org_Chart_LinqDataContext linqContext = new DDT_Org_Chart_LinqDataContext();
var lDDT_Org_Chart_Items = from DDT_Org_Chart_Item DDT_Org_Chart_Item in linqContext.DDT_Org_Chart_Items
where DDT_Org_Chart_Item.PortalID == PortalId && DDT_Org_Chart_Item.ModuleID == ModuleId
// where DDT_Org_Chart_Item.PortalID == PortalId && DDT_Org_Chart_Item.IsDeleted == false && DDT_Org_Chart_Item.ModuleID == ModuleId
// || DDT_Org_Chart_Item.PortalID == PortalId && DDT_Org_Chart_Item.IsDeleted == UserController.Instance.GetCurrentUserInfo().IsSuperUser && DDT_Org_Chart_Item.ModuleID == ModuleId
select DDT_Org_Chart_Item;
//followed by .Count () to get the number.
countDDT_Org_Chart_Items2 = lDDT_Org_Chart_Items.Count();
}
//we initialize index and get it from RadGrid (index of the first line is 0)
int index = e.Item.ItemIndex;
//Processing of the down button display (all lines except the last one (index! = CountSectors-1))
LinkButton DDT_Org_Chart_Item2lnkOrderDown = e.Item.FindControl("DDT_Org_Chart_Item2lnkOrderDown") as LinkButton;
if (DDT_Org_Chart_Item2lnkOrderDown != null)
{
DDT_Org_Chart_Item2lnkOrderDown.Visible = (index != countDDT_Org_Chart_Items2 - 1);
}
//Processing of the down button display (all lines except the first (index! = 0))
LinkButton DDT_Org_Chart_Item2lnkOrderUp = e.Item.FindControl("DDT_Org_Chart_Item2lnkOrderUp") as LinkButton;
if (DDT_Org_Chart_Item2lnkOrderUp != null)
{
DDT_Org_Chart_Item2lnkOrderUp.Visible = (index != 0);
}
//End Move Up and Move Down Link Display Mechanism
}
}
private void DDT_Org_Chart_Item2ApplyOrder(int id, int step) //Apply Order with inversion of order values
{
DDT_Org_Chart_LinqDataContext linqContext = new DDT_Org_Chart_LinqDataContext();
var lDDT_Org_Chart_Items = from DDT_Org_Chart_Item DDT_Org_Chart_Item in linqContext.DDT_Org_Chart_Items
where DDT_Org_Chart_Item.PortalID == PortalId && DDT_Org_Chart_Item.IsDeleted == false && DDT_Org_Chart_Item.ModuleID == ModuleId
|| DDT_Org_Chart_Item.PortalID == PortalId && DDT_Org_Chart_Item.IsDeleted == UserController.Instance.GetCurrentUserInfo().IsSuperUser && DDT_Org_Chart_Item.ModuleID == ModuleId
orderby DDT_Org_Chart_Item.ItemOrder_Org_Chart
select DDT_Org_Chart_Item;
if ((lDDT_Org_Chart_Items != null) && (lDDT_Org_Chart_Items.Count() > 0))
{
List<DDT_Org_Chart_Item> DDT_Org_Chart_Items = lDDT_Org_Chart_Items.ToList<DDT_Org_Chart_Item>();
//index initialization
int index = 0;
int orderNullable = 0;
//we loop on the list
foreach (DDT_Org_Chart_Item DDT_Org_Chart_Item in DDT_Org_Chart_Items)
{
if (DDT_Org_Chart_Item.ID_Org_Chart_Item == id)
{
if (DDT_Org_Chart_Items.ElementAt(index + step).ItemOrder_Org_Chart != null)
//{
orderNullable = Convert.ToInt32(DDT_Org_Chart_Item.ItemOrder_Org_Chart);
DDT_Org_Chart_Item.ItemOrder_Org_Chart = DDT_Org_Chart_Items.ElementAt(index + step).ItemOrder_Org_Chart;
DDT_Org_Chart_Items.ElementAt(index + step).ItemOrder_Org_Chart = orderNullable;
//sending linq changes to the database
linqContext.SubmitChanges();
//}
}
index++;
}
}
SynchronizeModuleLastContentModifiedOnDate();
}
#endregion
# region localization
protected string ConfirmLocalize(string key)
{
return String.Format("javascript:return confirm('{0}')", LocalizeString(key));
}
protected void RG_Items_Simple_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridHeaderItem)
{
GridHeaderItem header = (GridHeaderItem)e.Item;
header["ItemName_Org_Chart"].Text = LocalizeString("ItemName").ToString();
header["ItemTitle_Org_Chart"].Text = LocalizeString("ItemTitle").ToString();
header["ItemImageUrl_Org_Chart"].Text = LocalizeString("ItemImageUrl").ToString();
header["IsActive"].Text = LocalizeString("IsActive").ToString();
header["IsDeleted"].Text = LocalizeString("IsDeleted").ToString();
header["Order"].Text = LocalizeString("Order").ToString();
header["TeamName_Org_Chart_Node"].Text = LocalizeString("ParentItem").ToString();
header["Collapsed"].Text = LocalizeString("Collapsed").ToString();
}
}
protected void RG_Teams_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridHeaderItem)
{
GridHeaderItem header = (GridHeaderItem)e.Item;
header["ParentID_Org_Chart_Node"].Text = LocalizeString("ParentGroup").ToString();
header["TeamName_Org_Chart_Node"].Text = LocalizeString("GroupName").ToString();
header["Collapsed"].Text = LocalizeString("Collapsed").ToString();
header["GroupCollapsed"].Text = LocalizeString("GroupCollapsed").ToString();
header["ColumnCount"].Text = LocalizeString("ColumnCount").ToString();
header["IsActive"].Text = LocalizeString("IsActive").ToString();
header["IsDeleted"].Text = LocalizeString("IsDeleted").ToString();
header["Order"].Text = LocalizeString("Order").ToString();
}
}
protected void RG_Items_WithGroup_ItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridHeaderItem)
{
GridHeaderItem header = (GridHeaderItem)e.Item;
header["TeamName_Org_Chart_Node"].Text = LocalizeString("GroupName").ToString();
header["ItemName_Org_Chart"].Text = LocalizeString("ItemName").ToString();
header["ItemTitle_Org_Chart"].Text = LocalizeString("ItemTitle").ToString();
header["ItemImageUrl_Org_Chart"].Text = LocalizeString("ItemImageUrl").ToString();
header["IsActive"].Text = LocalizeString("IsActive").ToString();
header["IsDeleted"].Text = LocalizeString("IsDeleted").ToString();
header["Order"].Text = LocalizeString("Order").ToString();
}
}
#endregion
}
}