91084c50b156f33769afc749263cee96980ddaeb.svn-base 77 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969
  1. using System;
  2. using System.Data;
  3. using System.Drawing;
  4. using System.Diagnostics;
  5. using System.IO;
  6. using System.Collections;
  7. using System.ComponentModel;
  8. using System.Windows.Forms;
  9. using Infragistics.Win.UltraWinGrid;
  10. using Infragistics.Win.UltraWinEditors ;
  11. using Core.Mes.ClientFrameWork;
  12. using Core.Mes.IBaseInterface;
  13. //using Core.Mes.ServerFrameWork;
  14. namespace Core.Mes.ClientPurviewManager
  15. {
  16. /// <summary>
  17. /// FrmAuthorization 的摘要说明。
  18. /// </summary>
  19. public class FrmAuthorization : Core.Mes.ClientFrameWork.FrmBase
  20. {
  21. private System.Windows.Forms.Panel panel1;
  22. private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ultraToolbarsManager1;
  23. private System.Windows.Forms.Panel FrmAuthorization_Fill_Panel;
  24. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Left;
  25. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Right;
  26. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Top;
  27. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Bottom;
  28. private Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid1;
  29. private System.Windows.Forms.Panel panel2;
  30. private Infragistics.Win.UltraWinEditors.UltraCheckEditor ultraCheckEditor1;
  31. private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor1;
  32. private Infragistics.Win.UltraWinEditors.UltraCheckEditor ultraCheckEditor2;
  33. private Infragistics.Win.UltraWinEditors.UltraComboEditor ultraComboEditor1;
  34. private Infragistics.Win.Misc.UltraButton ultraButton1;
  35. private Infragistics.Win.Misc.UltraButton ultraButton2;
  36. private Infragistics.Win.Misc.UltraExpandableGroupBox ultraExpandableGroupBox1;
  37. private Infragistics.Win.Misc.UltraExpandableGroupBoxPanel ultraExpandableGroupBoxPanel1;
  38. private System.Windows.Forms.Panel panel3;
  39. private Infragistics.Win.UltraWinEditors.UltraComboEditor ultraComboEditor3;
  40. private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor4;
  41. private Infragistics.Win.UltraWinEditors.UltraComboEditor ultraComboEditor2;
  42. private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor2;
  43. private Infragistics.Win.Misc.UltraLabel ultraLabel4;
  44. private Infragistics.Win.Misc.UltraLabel ultraLabel3;
  45. private Infragistics.Win.Misc.UltraLabel ultraLabel2;
  46. private Infragistics.Win.Misc.UltraLabel ultraLabel1;
  47. private System.Windows.Forms.ToolTip toolTip1;
  48. private Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter ultraGridExcelExporter1;
  49. private Infragistics.Win.Misc.UltraLabel ultraLabel5;
  50. private UltraTextEditor ultLoginID;
  51. private Infragistics.Win.Misc.UltraLabel ultraLabel6;
  52. private UltraCheckEditor CHK_GL;
  53. private System.ComponentModel.IContainer components;
  54. public FrmAuthorization()
  55. {
  56. //
  57. // Windows 窗体设计器支持所必需的
  58. //
  59. InitializeComponent();
  60. //
  61. // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
  62. //
  63. }
  64. /// <summary>
  65. /// 清理所有正在使用的资源。
  66. /// </summary>
  67. protected override void Dispose(bool disposing)
  68. {
  69. if (disposing)
  70. {
  71. if (components != null)
  72. {
  73. components.Dispose();
  74. }
  75. }
  76. base.Dispose(disposing);
  77. }
  78. #region Windows 窗体设计器生成的代码
  79. /// <summary>
  80. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  81. /// 此方法的内容。
  82. /// </summary>
  83. private void InitializeComponent()
  84. {
  85. this.components = new System.ComponentModel.Container();
  86. Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
  87. Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("aubar");
  88. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool1 = new Infragistics.Win.UltraWinToolbars.ButtonTool("query");
  89. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool2 = new Infragistics.Win.UltraWinToolbars.ButtonTool("add");
  90. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("edit");
  91. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("del");
  92. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool5 = new Infragistics.Win.UltraWinToolbars.ButtonTool("close");
  93. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("back");
  94. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("leadin");
  95. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool8 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LOCK");
  96. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool9 = new Infragistics.Win.UltraWinToolbars.ButtonTool("UNLOCK");
  97. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("add");
  98. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool11 = new Infragistics.Win.UltraWinToolbars.ButtonTool("edit");
  99. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool12 = new Infragistics.Win.UltraWinToolbars.ButtonTool("del");
  100. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool13 = new Infragistics.Win.UltraWinToolbars.ButtonTool("query");
  101. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool14 = new Infragistics.Win.UltraWinToolbars.ButtonTool("close");
  102. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool15 = new Infragistics.Win.UltraWinToolbars.ButtonTool("back");
  103. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool16 = new Infragistics.Win.UltraWinToolbars.ButtonTool("leadin");
  104. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool17 = new Infragistics.Win.UltraWinToolbars.ButtonTool("LOCK");
  105. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool18 = new Infragistics.Win.UltraWinToolbars.ButtonTool("UNLOCK");
  106. Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand1 = new Infragistics.Win.UltraWinGrid.UltraGridBand("Band 0", -1);
  107. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn1 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("LOGINID");
  108. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn2 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("ROLEID");
  109. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn3 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("USERID");
  110. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn4 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("PASSWD");
  111. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn5 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("DEPARTMENTID");
  112. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn6 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("WORKPOS");
  113. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn7 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("ROLEMEMO");
  114. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn8 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("STATUS");
  115. Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
  116. Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
  117. Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
  118. this.ultraTextEditor4 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
  119. this.panel1 = new System.Windows.Forms.Panel();
  120. this._panel1_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  121. this.ultraToolbarsManager1 = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
  122. this._panel1_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  123. this._panel1_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  124. this._panel1_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  125. this.FrmAuthorization_Fill_Panel = new System.Windows.Forms.Panel();
  126. this.ultraGrid1 = new Infragistics.Win.UltraWinGrid.UltraGrid();
  127. this.ultraExpandableGroupBox1 = new Infragistics.Win.Misc.UltraExpandableGroupBox();
  128. this.ultraExpandableGroupBoxPanel1 = new Infragistics.Win.Misc.UltraExpandableGroupBoxPanel();
  129. this.panel3 = new System.Windows.Forms.Panel();
  130. this.ultraLabel5 = new Infragistics.Win.Misc.UltraLabel();
  131. this.ultraComboEditor3 = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
  132. this.ultraComboEditor2 = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
  133. this.ultraTextEditor2 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
  134. this.ultraLabel4 = new Infragistics.Win.Misc.UltraLabel();
  135. this.ultraLabel3 = new Infragistics.Win.Misc.UltraLabel();
  136. this.ultraLabel2 = new Infragistics.Win.Misc.UltraLabel();
  137. this.ultraLabel1 = new Infragistics.Win.Misc.UltraLabel();
  138. this.panel2 = new System.Windows.Forms.Panel();
  139. this.CHK_GL = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  140. this.ultLoginID = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
  141. this.ultraLabel6 = new Infragistics.Win.Misc.UltraLabel();
  142. this.ultraButton2 = new Infragistics.Win.Misc.UltraButton();
  143. this.ultraButton1 = new Infragistics.Win.Misc.UltraButton();
  144. this.ultraComboEditor1 = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
  145. this.ultraCheckEditor2 = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  146. this.ultraTextEditor1 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
  147. this.ultraCheckEditor1 = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  148. this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
  149. this.ultraGridExcelExporter1 = new Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter();
  150. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor4)).BeginInit();
  151. this.panel1.SuspendLayout();
  152. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).BeginInit();
  153. this.FrmAuthorization_Fill_Panel.SuspendLayout();
  154. ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).BeginInit();
  155. ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).BeginInit();
  156. this.ultraExpandableGroupBox1.SuspendLayout();
  157. this.ultraExpandableGroupBoxPanel1.SuspendLayout();
  158. this.panel3.SuspendLayout();
  159. ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor3)).BeginInit();
  160. ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor2)).BeginInit();
  161. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor2)).BeginInit();
  162. this.panel2.SuspendLayout();
  163. ((System.ComponentModel.ISupportInitialize)(this.ultLoginID)).BeginInit();
  164. ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor1)).BeginInit();
  165. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor1)).BeginInit();
  166. this.SuspendLayout();
  167. //
  168. // ultraTextEditor4
  169. //
  170. appearance1.BackColor = System.Drawing.Color.LightCyan;
  171. this.ultraTextEditor4.Appearance = appearance1;
  172. this.ultraTextEditor4.AutoSize = true;
  173. this.ultraTextEditor4.BackColor = System.Drawing.Color.LightCyan;
  174. this.ultraTextEditor4.FlatMode = true;
  175. this.ultraTextEditor4.Location = new System.Drawing.Point(422, 23);
  176. this.ultraTextEditor4.Name = "ultraTextEditor4";
  177. this.ultraTextEditor4.PasswordChar = '*';
  178. this.ultraTextEditor4.Size = new System.Drawing.Size(224, 19);
  179. this.ultraTextEditor4.TabIndex = 15;
  180. //
  181. // panel1
  182. //
  183. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Left);
  184. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Right);
  185. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Top);
  186. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Bottom);
  187. this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
  188. this.panel1.Location = new System.Drawing.Point(0, 0);
  189. this.panel1.Name = "panel1";
  190. this.panel1.Size = new System.Drawing.Size(927, 32);
  191. this.panel1.TabIndex = 0;
  192. //
  193. // _panel1_Toolbars_Dock_Area_Left
  194. //
  195. this._panel1_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  196. this._panel1_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control;
  197. this._panel1_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
  198. this._panel1_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
  199. this._panel1_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 25);
  200. this._panel1_Toolbars_Dock_Area_Left.Name = "_panel1_Toolbars_Dock_Area_Left";
  201. this._panel1_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 7);
  202. this._panel1_Toolbars_Dock_Area_Left.ToolbarsManager = this.ultraToolbarsManager1;
  203. //
  204. // ultraToolbarsManager1
  205. //
  206. this.ultraToolbarsManager1.DesignerFlags = 1;
  207. this.ultraToolbarsManager1.DockWithinContainer = this.panel1;
  208. this.ultraToolbarsManager1.FlatMode = true;
  209. this.ultraToolbarsManager1.ShowQuickCustomizeButton = false;
  210. this.ultraToolbarsManager1.Style = Infragistics.Win.UltraWinToolbars.ToolbarStyle.VisualStudio2005;
  211. ultraToolbar1.DockedColumn = 0;
  212. ultraToolbar1.DockedRow = 0;
  213. ultraToolbar1.Text = "aubar";
  214. buttonTool1.InstanceProps.IsFirstInGroup = true;
  215. buttonTool2.InstanceProps.IsFirstInGroup = true;
  216. buttonTool3.InstanceProps.IsFirstInGroup = true;
  217. buttonTool4.InstanceProps.IsFirstInGroup = true;
  218. buttonTool5.InstanceProps.IsFirstInGroup = true;
  219. buttonTool6.InstanceProps.IsFirstInGroup = true;
  220. buttonTool7.InstanceProps.IsFirstInGroup = true;
  221. ultraToolbar1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
  222. buttonTool1,
  223. buttonTool2,
  224. buttonTool3,
  225. buttonTool4,
  226. buttonTool5,
  227. buttonTool6,
  228. buttonTool7,
  229. buttonTool8,
  230. buttonTool9});
  231. this.ultraToolbarsManager1.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
  232. ultraToolbar1});
  233. buttonTool10.SharedProps.Caption = "新增(&A)";
  234. buttonTool10.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  235. buttonTool11.SharedProps.Caption = "修改(&U)";
  236. buttonTool11.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  237. buttonTool11.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlU;
  238. buttonTool12.SharedProps.Caption = "删除(&D)";
  239. buttonTool12.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  240. buttonTool13.SharedProps.Caption = "查询(&Q)";
  241. buttonTool13.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  242. buttonTool14.SharedProps.Caption = "关闭(&E)";
  243. buttonTool14.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  244. buttonTool14.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlE;
  245. buttonTool15.SharedProps.Caption = "返回(&B)";
  246. buttonTool15.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  247. buttonTool15.SharedProps.Visible = false;
  248. buttonTool16.SharedProps.Caption = "导入Excel";
  249. buttonTool16.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  250. buttonTool17.SharedProps.Caption = "停用(L)";
  251. buttonTool17.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  252. buttonTool18.SharedProps.Caption = "启用(I)";
  253. buttonTool18.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  254. this.ultraToolbarsManager1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
  255. buttonTool10,
  256. buttonTool11,
  257. buttonTool12,
  258. buttonTool13,
  259. buttonTool14,
  260. buttonTool15,
  261. buttonTool16,
  262. buttonTool17,
  263. buttonTool18});
  264. this.ultraToolbarsManager1.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.ultraToolbarsManager1_ToolClick);
  265. //
  266. // _panel1_Toolbars_Dock_Area_Right
  267. //
  268. this._panel1_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  269. this._panel1_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control;
  270. this._panel1_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
  271. this._panel1_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
  272. this._panel1_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(927, 25);
  273. this._panel1_Toolbars_Dock_Area_Right.Name = "_panel1_Toolbars_Dock_Area_Right";
  274. this._panel1_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 7);
  275. this._panel1_Toolbars_Dock_Area_Right.ToolbarsManager = this.ultraToolbarsManager1;
  276. //
  277. // _panel1_Toolbars_Dock_Area_Top
  278. //
  279. this._panel1_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  280. this._panel1_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control;
  281. this._panel1_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
  282. this._panel1_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
  283. this._panel1_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
  284. this._panel1_Toolbars_Dock_Area_Top.Name = "_panel1_Toolbars_Dock_Area_Top";
  285. this._panel1_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(927, 25);
  286. this._panel1_Toolbars_Dock_Area_Top.ToolbarsManager = this.ultraToolbarsManager1;
  287. //
  288. // _panel1_Toolbars_Dock_Area_Bottom
  289. //
  290. this._panel1_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  291. this._panel1_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control;
  292. this._panel1_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
  293. this._panel1_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
  294. this._panel1_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 32);
  295. this._panel1_Toolbars_Dock_Area_Bottom.Name = "_panel1_Toolbars_Dock_Area_Bottom";
  296. this._panel1_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(927, 0);
  297. this._panel1_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.ultraToolbarsManager1;
  298. //
  299. // FrmAuthorization_Fill_Panel
  300. //
  301. this.FrmAuthorization_Fill_Panel.Controls.Add(this.ultraGrid1);
  302. this.FrmAuthorization_Fill_Panel.Controls.Add(this.ultraExpandableGroupBox1);
  303. this.FrmAuthorization_Fill_Panel.Controls.Add(this.panel2);
  304. this.FrmAuthorization_Fill_Panel.Controls.Add(this.panel1);
  305. this.FrmAuthorization_Fill_Panel.Cursor = System.Windows.Forms.Cursors.Default;
  306. this.FrmAuthorization_Fill_Panel.Dock = System.Windows.Forms.DockStyle.Fill;
  307. this.FrmAuthorization_Fill_Panel.Location = new System.Drawing.Point(0, 0);
  308. this.FrmAuthorization_Fill_Panel.Name = "FrmAuthorization_Fill_Panel";
  309. this.FrmAuthorization_Fill_Panel.Size = new System.Drawing.Size(927, 509);
  310. this.FrmAuthorization_Fill_Panel.TabIndex = 0;
  311. //
  312. // ultraGrid1
  313. //
  314. ultraGridColumn1.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  315. ultraGridColumn1.Header.Caption = "登录帐号";
  316. ultraGridColumn1.Header.VisiblePosition = 0;
  317. ultraGridColumn1.Width = 80;
  318. ultraGridColumn2.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  319. ultraGridColumn2.Header.Caption = "角色";
  320. ultraGridColumn2.Header.VisiblePosition = 1;
  321. ultraGridColumn2.Width = 150;
  322. ultraGridColumn3.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  323. ultraGridColumn3.Header.Caption = "员工";
  324. ultraGridColumn3.Header.VisiblePosition = 3;
  325. ultraGridColumn3.Width = 100;
  326. ultraGridColumn4.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  327. ultraGridColumn4.EditorControl = this.ultraTextEditor4;
  328. ultraGridColumn4.Format = "*";
  329. ultraGridColumn4.Header.Caption = "登录密码";
  330. ultraGridColumn4.Header.VisiblePosition = 2;
  331. ultraGridColumn4.Width = 80;
  332. ultraGridColumn5.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  333. ultraGridColumn5.Header.Caption = "部门";
  334. ultraGridColumn5.Header.VisiblePosition = 4;
  335. ultraGridColumn5.Width = 150;
  336. ultraGridColumn6.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  337. ultraGridColumn6.Header.Caption = "岗位";
  338. ultraGridColumn6.Header.VisiblePosition = 5;
  339. ultraGridColumn6.Width = 100;
  340. ultraGridColumn7.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  341. ultraGridColumn7.Header.Caption = "角色描述";
  342. ultraGridColumn7.Header.VisiblePosition = 6;
  343. ultraGridColumn7.Width = 300;
  344. ultraGridColumn8.Header.Caption = "状态";
  345. ultraGridColumn8.Header.VisiblePosition = 7;
  346. ultraGridBand1.Columns.AddRange(new object[] {
  347. ultraGridColumn1,
  348. ultraGridColumn2,
  349. ultraGridColumn3,
  350. ultraGridColumn4,
  351. ultraGridColumn5,
  352. ultraGridColumn6,
  353. ultraGridColumn7,
  354. ultraGridColumn8});
  355. this.ultraGrid1.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
  356. this.ultraGrid1.DisplayLayout.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  357. this.ultraGrid1.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.False;
  358. this.ultraGrid1.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  359. this.ultraGrid1.DisplayLayout.GroupByBox.Hidden = true;
  360. this.ultraGrid1.DisplayLayout.MaxColScrollRegions = 1;
  361. this.ultraGrid1.DisplayLayout.MaxRowScrollRegions = 1;
  362. this.ultraGrid1.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.RaisedSoft;
  363. this.ultraGrid1.DisplayLayout.Override.BorderStyleRow = Infragistics.Win.UIElementBorderStyle.Dotted;
  364. this.ultraGrid1.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText;
  365. this.ultraGrid1.DisplayLayout.Override.CellPadding = 0;
  366. this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti;
  367. this.ultraGrid1.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.Standard;
  368. this.ultraGrid1.DisplayLayout.Override.MinRowHeight = 21;
  369. this.ultraGrid1.DisplayLayout.Override.RowSelectorHeaderStyle = Infragistics.Win.UltraWinGrid.RowSelectorHeaderStyle.SeparateElement;
  370. this.ultraGrid1.DisplayLayout.Override.RowSelectorNumberStyle = Infragistics.Win.UltraWinGrid.RowSelectorNumberStyle.RowIndex;
  371. this.ultraGrid1.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.True;
  372. this.ultraGrid1.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
  373. this.ultraGrid1.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate;
  374. this.ultraGrid1.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy;
  375. this.ultraGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
  376. this.ultraGrid1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  377. this.ultraGrid1.Location = new System.Drawing.Point(0, 80);
  378. this.ultraGrid1.Name = "ultraGrid1";
  379. this.ultraGrid1.Size = new System.Drawing.Size(927, 317);
  380. this.ultraGrid1.TabIndex = 1;
  381. this.ultraGrid1.Text = "ultraGrid1";
  382. this.ultraGrid1.AfterRowActivate += new System.EventHandler(this.ultraGrid1_AfterRowActivate);
  383. //
  384. // ultraExpandableGroupBox1
  385. //
  386. this.ultraExpandableGroupBox1.BackColor = System.Drawing.Color.Gainsboro;
  387. this.ultraExpandableGroupBox1.Controls.Add(this.ultraExpandableGroupBoxPanel1);
  388. this.ultraExpandableGroupBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
  389. this.ultraExpandableGroupBox1.ExpandedSize = new System.Drawing.Size(704, 112);
  390. this.ultraExpandableGroupBox1.Location = new System.Drawing.Point(0, 397);
  391. this.ultraExpandableGroupBox1.Name = "ultraExpandableGroupBox1";
  392. this.ultraExpandableGroupBox1.Size = new System.Drawing.Size(927, 112);
  393. this.ultraExpandableGroupBox1.SupportThemes = false;
  394. this.ultraExpandableGroupBox1.TabIndex = 3;
  395. this.ultraExpandableGroupBox1.Text = "编辑区域";
  396. this.ultraExpandableGroupBox1.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003;
  397. //
  398. // ultraExpandableGroupBoxPanel1
  399. //
  400. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.panel3);
  401. this.ultraExpandableGroupBoxPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
  402. this.ultraExpandableGroupBoxPanel1.Location = new System.Drawing.Point(2, 22);
  403. this.ultraExpandableGroupBoxPanel1.Name = "ultraExpandableGroupBoxPanel1";
  404. this.ultraExpandableGroupBoxPanel1.Size = new System.Drawing.Size(923, 88);
  405. this.ultraExpandableGroupBoxPanel1.TabIndex = 0;
  406. //
  407. // panel3
  408. //
  409. this.panel3.Controls.Add(this.ultraLabel5);
  410. this.panel3.Controls.Add(this.ultraComboEditor3);
  411. this.panel3.Controls.Add(this.ultraTextEditor4);
  412. this.panel3.Controls.Add(this.ultraComboEditor2);
  413. this.panel3.Controls.Add(this.ultraTextEditor2);
  414. this.panel3.Controls.Add(this.ultraLabel4);
  415. this.panel3.Controls.Add(this.ultraLabel3);
  416. this.panel3.Controls.Add(this.ultraLabel2);
  417. this.panel3.Controls.Add(this.ultraLabel1);
  418. this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
  419. this.panel3.Location = new System.Drawing.Point(0, 0);
  420. this.panel3.Name = "panel3";
  421. this.panel3.Size = new System.Drawing.Size(923, 88);
  422. this.panel3.TabIndex = 0;
  423. //
  424. // ultraLabel5
  425. //
  426. this.ultraLabel5.Location = new System.Drawing.Point(665, 28);
  427. this.ultraLabel5.Name = "ultraLabel5";
  428. this.ultraLabel5.Size = new System.Drawing.Size(54, 16);
  429. this.ultraLabel5.TabIndex = 17;
  430. this.ultraLabel5.Text = "登录密码";
  431. this.ultraLabel5.Visible = false;
  432. //
  433. // ultraComboEditor3
  434. //
  435. this.ultraComboEditor3.AutoSize = true;
  436. this.ultraComboEditor3.DropDownButtonDisplayStyle = Infragistics.Win.ButtonDisplayStyle.Never;
  437. this.ultraComboEditor3.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
  438. this.ultraComboEditor3.FlatMode = true;
  439. this.ultraComboEditor3.Location = new System.Drawing.Point(168, 56);
  440. this.ultraComboEditor3.Name = "ultraComboEditor3";
  441. this.ultraComboEditor3.Size = new System.Drawing.Size(152, 19);
  442. this.ultraComboEditor3.TabIndex = 16;
  443. this.ultraComboEditor3.SelectionChanged += new System.EventHandler(this.ultraComboEditor3_SelectionChanged);
  444. this.ultraComboEditor3.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.ultraComboEditor3_EditorButtonClick_1);
  445. this.ultraComboEditor3.Click += new System.EventHandler(this.ultraComboEditor3_Click);
  446. //
  447. // ultraComboEditor2
  448. //
  449. this.ultraComboEditor2.AutoSize = true;
  450. this.ultraComboEditor2.FlatMode = true;
  451. this.ultraComboEditor2.Location = new System.Drawing.Point(422, 56);
  452. this.ultraComboEditor2.Name = "ultraComboEditor2";
  453. this.ultraComboEditor2.Size = new System.Drawing.Size(224, 19);
  454. this.ultraComboEditor2.TabIndex = 14;
  455. //
  456. // ultraTextEditor2
  457. //
  458. appearance2.BackColor = System.Drawing.Color.LightCyan;
  459. this.ultraTextEditor2.Appearance = appearance2;
  460. this.ultraTextEditor2.AutoSize = true;
  461. this.ultraTextEditor2.BackColor = System.Drawing.Color.LightCyan;
  462. this.ultraTextEditor2.FlatMode = true;
  463. this.ultraTextEditor2.Location = new System.Drawing.Point(168, 23);
  464. this.ultraTextEditor2.Name = "ultraTextEditor2";
  465. this.ultraTextEditor2.Size = new System.Drawing.Size(152, 19);
  466. this.ultraTextEditor2.TabIndex = 13;
  467. //
  468. // ultraLabel4
  469. //
  470. this.ultraLabel4.Location = new System.Drawing.Point(364, 24);
  471. this.ultraLabel4.Name = "ultraLabel4";
  472. this.ultraLabel4.Size = new System.Drawing.Size(54, 16);
  473. this.ultraLabel4.TabIndex = 12;
  474. this.ultraLabel4.Text = "登录密码";
  475. //
  476. // ultraLabel3
  477. //
  478. this.ultraLabel3.Location = new System.Drawing.Point(110, 57);
  479. this.ultraLabel3.Name = "ultraLabel3";
  480. this.ultraLabel3.Size = new System.Drawing.Size(54, 16);
  481. this.ultraLabel3.TabIndex = 11;
  482. this.ultraLabel3.Text = "用户姓名";
  483. //
  484. // ultraLabel2
  485. //
  486. this.ultraLabel2.Location = new System.Drawing.Point(389, 57);
  487. this.ultraLabel2.Name = "ultraLabel2";
  488. this.ultraLabel2.Size = new System.Drawing.Size(29, 16);
  489. this.ultraLabel2.TabIndex = 10;
  490. this.ultraLabel2.Text = "角色";
  491. //
  492. // ultraLabel1
  493. //
  494. this.ultraLabel1.Location = new System.Drawing.Point(110, 24);
  495. this.ultraLabel1.Name = "ultraLabel1";
  496. this.ultraLabel1.Size = new System.Drawing.Size(54, 16);
  497. this.ultraLabel1.TabIndex = 9;
  498. this.ultraLabel1.Text = "登录帐号";
  499. //
  500. // panel2
  501. //
  502. this.panel2.BackColor = System.Drawing.Color.Gainsboro;
  503. this.panel2.Controls.Add(this.CHK_GL);
  504. this.panel2.Controls.Add(this.ultLoginID);
  505. this.panel2.Controls.Add(this.ultraLabel6);
  506. this.panel2.Controls.Add(this.ultraButton2);
  507. this.panel2.Controls.Add(this.ultraButton1);
  508. this.panel2.Controls.Add(this.ultraComboEditor1);
  509. this.panel2.Controls.Add(this.ultraCheckEditor2);
  510. this.panel2.Controls.Add(this.ultraTextEditor1);
  511. this.panel2.Controls.Add(this.ultraCheckEditor1);
  512. this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
  513. this.panel2.Location = new System.Drawing.Point(0, 32);
  514. this.panel2.Name = "panel2";
  515. this.panel2.Size = new System.Drawing.Size(927, 48);
  516. this.panel2.TabIndex = 2;
  517. //
  518. // CHK_GL
  519. //
  520. this.CHK_GL.Location = new System.Drawing.Point(855, 16);
  521. this.CHK_GL.Name = "CHK_GL";
  522. this.CHK_GL.Size = new System.Drawing.Size(49, 20);
  523. this.CHK_GL.TabIndex = 56;
  524. this.CHK_GL.Text = "过滤";
  525. this.CHK_GL.CheckedChanged += new System.EventHandler(this.CHK_GL_CheckedChanged);
  526. //
  527. // ultLoginID
  528. //
  529. appearance3.BackColor = System.Drawing.Color.LightCyan;
  530. this.ultLoginID.Appearance = appearance3;
  531. this.ultLoginID.AutoSize = true;
  532. this.ultLoginID.BackColor = System.Drawing.Color.LightCyan;
  533. this.ultLoginID.FlatMode = true;
  534. this.ultLoginID.Location = new System.Drawing.Point(688, 17);
  535. this.ultLoginID.Name = "ultLoginID";
  536. this.ultLoginID.Size = new System.Drawing.Size(152, 19);
  537. this.ultLoginID.TabIndex = 6;
  538. this.ultLoginID.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.ultLoginID_EditorButtonClick);
  539. //
  540. // ultraLabel6
  541. //
  542. this.ultraLabel6.Location = new System.Drawing.Point(630, 21);
  543. this.ultraLabel6.Name = "ultraLabel6";
  544. this.ultraLabel6.Size = new System.Drawing.Size(54, 16);
  545. this.ultraLabel6.TabIndex = 0;
  546. this.ultraLabel6.Text = "登录帐号";
  547. //
  548. // ultraButton2
  549. //
  550. this.ultraButton2.Location = new System.Drawing.Point(571, 17);
  551. this.ultraButton2.Name = "ultraButton2";
  552. this.ultraButton2.Size = new System.Drawing.Size(29, 19);
  553. this.ultraButton2.TabIndex = 5;
  554. this.ultraButton2.Text = ">>";
  555. this.toolTip1.SetToolTip(this.ultraButton2, "角色维护");
  556. this.ultraButton2.Click += new System.EventHandler(this.ultraButton2_Click);
  557. //
  558. // ultraButton1
  559. //
  560. this.ultraButton1.Location = new System.Drawing.Point(272, 17);
  561. this.ultraButton1.Name = "ultraButton1";
  562. this.ultraButton1.Size = new System.Drawing.Size(29, 19);
  563. this.ultraButton1.TabIndex = 2;
  564. this.ultraButton1.Text = ">>";
  565. this.toolTip1.SetToolTip(this.ultraButton1, "部门维护");
  566. this.ultraButton1.Visible = false;
  567. this.ultraButton1.Click += new System.EventHandler(this.ultraButton1_Click);
  568. //
  569. // ultraComboEditor1
  570. //
  571. this.ultraComboEditor1.AutoSize = true;
  572. this.ultraComboEditor1.Enabled = false;
  573. this.ultraComboEditor1.FlatMode = true;
  574. this.ultraComboEditor1.Location = new System.Drawing.Point(387, 17);
  575. this.ultraComboEditor1.Name = "ultraComboEditor1";
  576. this.ultraComboEditor1.Size = new System.Drawing.Size(182, 19);
  577. this.ultraComboEditor1.TabIndex = 4;
  578. //
  579. // ultraCheckEditor2
  580. //
  581. this.ultraCheckEditor2.Location = new System.Drawing.Point(331, 17);
  582. this.ultraCheckEditor2.Name = "ultraCheckEditor2";
  583. this.ultraCheckEditor2.Size = new System.Drawing.Size(48, 20);
  584. this.ultraCheckEditor2.TabIndex = 3;
  585. this.ultraCheckEditor2.Text = "角色";
  586. this.ultraCheckEditor2.CheckedChanged += new System.EventHandler(this.ultraCheckEditor2_CheckedChanged);
  587. //
  588. // ultraTextEditor1
  589. //
  590. appearance4.BackColor = System.Drawing.Color.LightCyan;
  591. this.ultraTextEditor1.Appearance = appearance4;
  592. this.ultraTextEditor1.AutoSize = true;
  593. this.ultraTextEditor1.BackColor = System.Drawing.Color.LightCyan;
  594. this.ultraTextEditor1.Enabled = false;
  595. this.ultraTextEditor1.FlatMode = true;
  596. this.ultraTextEditor1.Location = new System.Drawing.Point(88, 17);
  597. this.ultraTextEditor1.Name = "ultraTextEditor1";
  598. this.ultraTextEditor1.ReadOnly = true;
  599. this.ultraTextEditor1.Size = new System.Drawing.Size(182, 19);
  600. this.ultraTextEditor1.TabIndex = 1;
  601. this.ultraTextEditor1.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.ultraTextEditor1_EditorButtonClick_1);
  602. //
  603. // ultraCheckEditor1
  604. //
  605. this.ultraCheckEditor1.Location = new System.Drawing.Point(32, 17);
  606. this.ultraCheckEditor1.Name = "ultraCheckEditor1";
  607. this.ultraCheckEditor1.Size = new System.Drawing.Size(48, 20);
  608. this.ultraCheckEditor1.TabIndex = 0;
  609. this.ultraCheckEditor1.Text = "部门";
  610. this.ultraCheckEditor1.CheckedChanged += new System.EventHandler(this.ultraCheckEditor1_CheckedChanged);
  611. //
  612. // FrmAuthorization
  613. //
  614. this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
  615. this.ClientSize = new System.Drawing.Size(927, 509);
  616. this.Controls.Add(this.FrmAuthorization_Fill_Panel);
  617. this.Name = "FrmAuthorization";
  618. this.Text = "FrmAuthorization";
  619. this.Load += new System.EventHandler(this.FrmAuthorization_Load);
  620. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor4)).EndInit();
  621. this.panel1.ResumeLayout(false);
  622. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).EndInit();
  623. this.FrmAuthorization_Fill_Panel.ResumeLayout(false);
  624. ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).EndInit();
  625. ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).EndInit();
  626. this.ultraExpandableGroupBox1.ResumeLayout(false);
  627. this.ultraExpandableGroupBoxPanel1.ResumeLayout(false);
  628. this.panel3.ResumeLayout(false);
  629. ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor3)).EndInit();
  630. ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor2)).EndInit();
  631. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor2)).EndInit();
  632. this.panel2.ResumeLayout(false);
  633. ((System.ComponentModel.ISupportInitialize)(this.ultLoginID)).EndInit();
  634. ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor1)).EndInit();
  635. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor1)).EndInit();
  636. this.ResumeLayout(false);
  637. }
  638. #endregion
  639. #region " Variable "
  640. private DataSet _departmentData;
  641. public TreeView _departmentTree;
  642. private string _selectPartSQL;
  643. private DataSet _roleData;
  644. private string _selectRoleSQL;
  645. private DataSet _auData;
  646. private string _selectAuSQL;
  647. private DataSet _userData;
  648. DataSet _validUserData;
  649. private DataSet _fitRole;
  650. private string userid;
  651. private string roleid;
  652. private bool IsAdminFlag = false;
  653. public string StrUser = "";
  654. public string operDepart = "";
  655. public string operDepartname = "";
  656. public string allDept = "";
  657. public string selDept = "";
  658. public string SelComboDept = "";
  659. #endregion
  660. private void FrmAuthorization_Load(object sender, System.EventArgs e)
  661. {
  662. try
  663. {
  664. StrUser = Core.Mes.ClientFrameWork.ClientCommon._UserInfo.UserName;
  665. GetUserData();
  666. GetDepartmentData();
  667. GetOperDepart();
  668. GetChildDept();
  669. GetFitRole();
  670. GetValidUserData();
  671. GetRoleDataSet();
  672. InitCombo();
  673. GetAuData();
  674. ultraCheckEditor1.CheckedValue = true;
  675. ultraTextEditor1.Enabled = true;
  676. ultraTextEditor1.Text = operDepartname;
  677. ultraTextEditor1.Tag = allDept;
  678. InitGrid();
  679. //InitRoleCombo();
  680. // GetCombo3Dept();
  681. IsAdminFlag = CheckRoleID();
  682. if (operDepart == "ROOT")
  683. {
  684. ultraButton1.Visible = true;
  685. ultraButton2.Visible = true;
  686. }
  687. this.ultraGrid1.DisplayLayout.Bands[0].Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.True;
  688. }
  689. catch(System.Exception ex)
  690. {
  691. System.Diagnostics.Debug.WriteLine(ex.ToString());
  692. }
  693. }
  694. private DataSet GetUserData()
  695. {
  696. try
  697. {
  698. string str = "";
  699. CallingMessage par = new CallingMessage();
  700. par.ServerName = "PurviewManager";
  701. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  702. par.MethodName = "SelectUAM_USER";
  703. par.args = new object[] { str };
  704. string strOut = "";
  705. _userData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  706. return _userData;
  707. }
  708. catch (Exception ex)
  709. {
  710. System.Diagnostics.Debug.WriteLine(ex.ToString());
  711. return null;
  712. }
  713. }
  714. private DataSet GetValidUserData()
  715. {
  716. try
  717. {
  718. string str = "";
  719. if (operDepart != "ROOT")
  720. str = " where DEPARTMENTID in (" + allDept + ") order by 1";
  721. else
  722. str = " order by 1";
  723. CallingMessage par = new CallingMessage();
  724. par.ServerName = "PurviewManager";
  725. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  726. par.MethodName = "SelectUAM_USER";
  727. par.args = new object[] { str };
  728. string strOut = "";
  729. _validUserData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  730. return _validUserData;
  731. }
  732. catch (Exception ex)
  733. {
  734. System.Diagnostics.Debug.WriteLine(ex.ToString());
  735. return null;
  736. }
  737. }
  738. private void GetDepartmentData()
  739. {
  740. try
  741. {
  742. CallingMessage par = new CallingMessage();
  743. par.ServerName = "PurviewManager";
  744. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  745. par.MethodName = "SelectUAM_DEPARTMENT";
  746. par.args = new object[] { "" };
  747. string strOut = "";
  748. _departmentData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  749. _selectPartSQL = strOut;
  750. }
  751. catch(System.Exception ex)
  752. {
  753. System.Diagnostics.Debug.WriteLine(ex.ToString());
  754. }
  755. }
  756. private void GetRoleDataSet()
  757. {
  758. try
  759. {
  760. CallingMessage par = new CallingMessage();
  761. par.ServerName = "PurviewManager";
  762. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  763. par.MethodName = "SelectUAM_ROLE";
  764. par.args = new object[] { " order by roleid" };
  765. string strOut = "";
  766. _roleData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  767. _selectRoleSQL = strOut;
  768. }
  769. catch(System.Exception ex)
  770. {
  771. System.Diagnostics.Debug.WriteLine(ex.ToString());
  772. }
  773. }
  774. private void GetCombo3Dept()
  775. {
  776. try
  777. {
  778. if (_userData != null && _userData.Tables.Count > 0)
  779. {
  780. DataTable dt = this._userData.Tables[0].Copy();
  781. foreach (DataRow dr in dt.Rows)
  782. {
  783. if (dr["NAME"].ToString() == this.ultraComboEditor3.Text.ToString())
  784. {
  785. SelComboDept = dr["DEPARTMENTID"].ToString();
  786. }
  787. }
  788. }
  789. }
  790. catch(System.Exception ex)
  791. {
  792. System.Diagnostics.Debug.WriteLine(ex.ToString());
  793. SelComboDept = "";
  794. }
  795. }
  796. private void GetFitRole()
  797. {
  798. try
  799. {
  800. string str = "";
  801. if (operDepart != "ROOT")
  802. str = " where DEPARTMENTID in (" + allDept + ") order by roleid";
  803. else
  804. str = " order by roleid";
  805. CallingMessage par = new CallingMessage();
  806. par.ServerName = "PurviewManager";
  807. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  808. par.MethodName = "SelectUAM_ROLE";
  809. par.args = new object[] { str };
  810. string strOut = "";
  811. _fitRole = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  812. }
  813. catch(System.Exception ex)
  814. {
  815. System.Diagnostics.Debug.WriteLine(ex.ToString());
  816. }
  817. }
  818. private void InitCombo()
  819. {
  820. if (_validUserData != null && _validUserData.Tables.Count > 0)
  821. {
  822. ultraComboEditor3.Items.Clear();
  823. foreach (DataRow arow in (_validUserData).Tables[0].Rows)
  824. ultraComboEditor3.Items.Add(arow[0], arow[2].ToString());
  825. }
  826. if (_fitRole != null && _fitRole.Tables.Count > 0)
  827. {
  828. ultraComboEditor1.Items.Clear();
  829. ultraComboEditor2.Items.Clear();
  830. foreach (DataRow arow in (_fitRole).Tables[0].Rows)
  831. {
  832. ultraComboEditor1.Items.Add(arow[0], arow[1].ToString());
  833. ultraComboEditor2.Items.Add(arow[0], arow[1].ToString());
  834. }
  835. }
  836. }
  837. private void GetOperDepart()
  838. {
  839. try
  840. {
  841. if (_userData != null && _userData.Tables.Count > 0)
  842. {
  843. DataTable dt = this._userData.Tables[0].Copy();
  844. foreach (DataRow dr in dt.Rows)
  845. {
  846. if (dr["NAME"].ToString() == StrUser)
  847. {
  848. operDepart = dr["DEPARTMENTID"].ToString();
  849. DataTable dn = this._departmentData.Tables[0].Copy();
  850. foreach (DataRow dm in dn.Rows)
  851. {
  852. if (dm["DEPARTMENTID"].ToString() == operDepart)
  853. {
  854. operDepartname = dm["DEPARTMENTNAME"].ToString();
  855. }
  856. }
  857. }
  858. }
  859. }
  860. }
  861. catch(System.Exception ex)
  862. {
  863. System.Diagnostics.Debug.WriteLine(ex.ToString());
  864. }
  865. }
  866. private void InitGrid()
  867. {
  868. // InitRoleCombo();
  869. GetPartData();
  870. GetUserDataInGrid();
  871. this.ultraCheckEditor1.CheckedValue = true;
  872. this.ultraTextEditor1.Enabled = true;
  873. this.ultraTextEditor1.Text = operDepartname;
  874. this.ultraTextEditor1.Tag = allDept;
  875. Query();
  876. // this.ultraGrid1.DataSource =this.ultraDataSource1 ;
  877. // ultraGrid1.DataSource = ((DataSet)_auData).Tables[0];
  878. this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].ValueList = ultraGrid1.DisplayLayout.ValueLists["name"];
  879. this.ultraGrid1.DisplayLayout.Bands[0].Columns["ROLEID"].ValueList = ultraGrid1.DisplayLayout.ValueLists["role"];
  880. ultraGrid1.DisplayLayout.Bands[0].Columns["DEPARTMENTID"].ValueList = ultraGrid1.DisplayLayout.ValueLists["department"];
  881. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["LOGINID"].Header.Caption = "登录帐号";
  882. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["LOGINID"].Width = 80;
  883. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["LOGINID"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
  884. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["LOGINID"].CellActivation = Activation.NoEdit;
  885. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["LOGINID"].CellAppearance.BackColor = Color.LightGoldenrodYellow;
  886. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["ROLEID"].Header.Caption = "角色";
  887. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["ROLEID"].Width = 200;
  888. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["ROLEID"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
  889. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["ROLEID"].CellActivation = Activation.NoEdit;
  890. //this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Default;
  891. //this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Default;
  892. //this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Default;
  893. //this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Default;
  894. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].Header.Caption = "用户姓名";
  895. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].Width = 100;
  896. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
  897. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].CellActivation = Activation.NoEdit;
  898. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].CellAppearance.BackColor = Color.LightGoldenrodYellow;
  899. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["PASSWD"].Header.Caption = "登录密码";
  900. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["PASSWD"].Width = 100;
  901. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["PASSWD"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
  902. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["PASSWD"].CellActivation = Activation.NoEdit;
  903. }
  904. private void InitRoleCombo()
  905. {
  906. if (_userData != null && _userData.Tables.Count > 0)
  907. {
  908. DataTable dt = _userData.Tables[0].Copy();
  909. foreach (DataRow dr in dt.Rows)
  910. {
  911. try
  912. {
  913. this.ultraComboEditor3.Items.Add(dr["USERID"], dr["NAME"].ToString());
  914. }
  915. catch(System.Exception ex)
  916. {
  917. System.Diagnostics.Debug.WriteLine(ex.ToString());
  918. }
  919. }
  920. }
  921. }
  922. private void GetAuData()
  923. {
  924. try
  925. {
  926. CallingMessage par = new CallingMessage();
  927. par.ServerName = "PurviewManager";
  928. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  929. par.MethodName = "SelectUAM_AUTHORIZATION";
  930. par.args = new object[] { " order by loginID" };
  931. string strOut = "";
  932. _auData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  933. _selectAuSQL = strOut;
  934. }
  935. catch(System.Exception ex)
  936. {
  937. System.Diagnostics.Debug.WriteLine(ex.ToString());
  938. }
  939. }
  940. private void GetPartData()
  941. {
  942. if (ultraGrid1.DisplayLayout.ValueLists.Exists("role"))
  943. {
  944. ultraGrid1.DisplayLayout.ValueLists["role"].ValueListItems.Clear();
  945. }
  946. else
  947. {
  948. ultraGrid1.DisplayLayout.ValueLists.Add("role");
  949. }
  950. foreach (DataRow dr in this._roleData.Tables[0].Rows)
  951. {
  952. Infragistics.Win.ValueListItem vli = new Infragistics.Win.ValueListItem();
  953. vli.DisplayText = dr["ROLENAME"].ToString();
  954. vli.DataValue = dr["ROLEID"];
  955. ultraGrid1.DisplayLayout.ValueLists["role"].ValueListItems.Add(vli);
  956. }
  957. if (ultraGrid1.DisplayLayout.ValueLists.Exists("department"))
  958. {
  959. ultraGrid1.DisplayLayout.ValueLists["department"].ValueListItems.Clear();
  960. }
  961. else
  962. {
  963. ultraGrid1.DisplayLayout.ValueLists.Add("department");
  964. }
  965. foreach (DataRow dr in this._departmentData.Tables[0].Rows)
  966. {
  967. Infragistics.Win.ValueListItem vli = new Infragistics.Win.ValueListItem();
  968. vli.DisplayText = dr["DEPARTMENTNAME"].ToString();
  969. vli.DataValue = dr["DEPARTMENTID"];
  970. ultraGrid1.DisplayLayout.ValueLists["department"].ValueListItems.Add(vli);
  971. }
  972. }
  973. private void GetUserDataInGrid()
  974. {
  975. if (ultraGrid1.DisplayLayout.ValueLists.Exists("name"))
  976. {
  977. ultraGrid1.DisplayLayout.ValueLists["name"].ValueListItems.Clear();
  978. }
  979. else
  980. {
  981. ultraGrid1.DisplayLayout.ValueLists.Add("name");
  982. }
  983. foreach (DataRow dr in this._userData.Tables[0].Rows)
  984. {
  985. Infragistics.Win.ValueListItem vli = new Infragistics.Win.ValueListItem();
  986. vli.DisplayText = dr["NAME"].ToString();
  987. vli.DataValue = dr["USERID"];
  988. ultraGrid1.DisplayLayout.ValueLists["name"].ValueListItems.Add(vli);
  989. }
  990. }
  991. private void ultraGrid1_AfterRowActivate(object sender, System.EventArgs e)
  992. {
  993. try
  994. {
  995. if (this.ultraGrid1.ActiveRow == null) return;
  996. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  997. this.ultraTextEditor2.Text = ugr.Cells[0].Value.ToString();
  998. this.ultraTextEditor4.Text = ugr.Cells[3].Value.ToString();
  999. //Usering();
  1000. //Roleing();
  1001. ultraComboEditor3.Value = ugr.Cells[2].Value.ToString();
  1002. ultraComboEditor2.Value = ugr.Cells[1].Value.ToString();
  1003. }
  1004. catch (Exception ex)
  1005. {
  1006. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1007. }
  1008. }
  1009. private void Usering()
  1010. {
  1011. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  1012. if (_userData != null && _userData.Tables.Count > 0)
  1013. {
  1014. for (int i = 0; i < _userData.Tables[0].Rows.Count; i++)
  1015. {
  1016. if (_userData.Tables[0].Rows[i][0].ToString() == ugr.Cells[2].Value.ToString())
  1017. {
  1018. this.ultraComboEditor3.Value = (_userData).Tables[0].Rows[i][2];
  1019. return;
  1020. }
  1021. }
  1022. }
  1023. }
  1024. private void Userid()
  1025. {
  1026. if (_userData != null && _userData.Tables.Count > 0)
  1027. {
  1028. for (int i = 0; i < _userData.Tables[0].Rows.Count; i++)
  1029. {
  1030. if (_userData.Tables[0].Rows[i]["NAME"].ToString() == this.ultraComboEditor3.Text.ToString())
  1031. {
  1032. userid = (_userData).Tables[0].Rows[i]["USERID"].ToString();
  1033. return;
  1034. }
  1035. }
  1036. }
  1037. }
  1038. private void Roleing()
  1039. {
  1040. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  1041. if (_roleData != null && _roleData.Tables.Count > 0)
  1042. {
  1043. for (int i = 0; i < _roleData.Tables[0].Rows.Count; i++)
  1044. {
  1045. if (_roleData.Tables[0].Rows[i]["ROLEID"].ToString() == ugr.Cells[1].Value.ToString())
  1046. {
  1047. this.ultraComboEditor2.Value = (_roleData).Tables[0].Rows[i]["ROLENAME"];
  1048. return;
  1049. }
  1050. }
  1051. }
  1052. }
  1053. private void Roleid()
  1054. {
  1055. if (_roleData != null && _roleData.Tables.Count > 0)
  1056. {
  1057. for (int i = 0; i < _roleData.Tables[0].Rows.Count; i++)
  1058. {
  1059. if (_roleData.Tables[0].Rows[i]["ROLENAME"].ToString() == this.ultraComboEditor2.Value.ToString())
  1060. {
  1061. roleid = (_roleData).Tables[0].Rows[i]["ROLEID"].ToString();
  1062. return;
  1063. }
  1064. }
  1065. }
  1066. }
  1067. #region 工具栏操作
  1068. private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
  1069. {
  1070. switch (e.Tool.Key)
  1071. {
  1072. case "add":
  1073. Add();
  1074. break;
  1075. case "del":
  1076. Del();
  1077. break;
  1078. case "edit":
  1079. Edit();
  1080. break;
  1081. case "query":
  1082. Query();
  1083. break;
  1084. case "close":
  1085. this.Close();
  1086. break;
  1087. case "back":
  1088. this.ultraToolbarsManager1.Toolbars[0].Tools["back"].SharedProps.Visible = false;
  1089. // RefreshData1("");
  1090. // ultraCheckEditor1.Checked = false;
  1091. // ultraTextEditor1.Text = "";
  1092. // ultraCheckEditor2.Checked = false;
  1093. // ultraComboEditor1.Text = "";
  1094. this.ultraCheckEditor1.CheckedValue = true;
  1095. this.ultraCheckEditor2.CheckedValue = false;
  1096. if (ultLoginID.Text.Trim().Length > 0)
  1097. {
  1098. ultLoginID.Tag = ultLoginID.Text.Trim();
  1099. ultLoginID.Text = "";
  1100. }
  1101. this.ultraTextEditor1.Enabled = true;
  1102. this.ultraTextEditor1.Text = operDepartname;
  1103. this.ultraTextEditor1.Tag = allDept;
  1104. Query();
  1105. break;
  1106. case "leadin":
  1107. try
  1108. {
  1109. string StrfileName = string.Format("c:\\{0}.xls", this.Text);
  1110. this.ultraGridExcelExporter1.Export(this.ultraGrid1, StrfileName);
  1111. ProcessStartInfo p = new ProcessStartInfo(StrfileName);
  1112. p.WorkingDirectory = Path.GetDirectoryName(StrfileName);
  1113. Process.Start(p);
  1114. }
  1115. catch (Exception ex)
  1116. {
  1117. MessageBox.Show(ex.Message);
  1118. }
  1119. break;
  1120. case "LOCK":
  1121. this.LOCK();
  1122. break;
  1123. case "UNLOCK":
  1124. this.UNLOCK();
  1125. break;
  1126. default:
  1127. break;
  1128. }
  1129. }
  1130. private void LOCK()
  1131. {
  1132. if (this.ultraGrid1.ActiveRow == null) {
  1133. MessageBox.Show("请选择需要操作的帐户!");
  1134. }
  1135. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  1136. string loginid = ugr.Cells[0].Value.ToString();
  1137. string sql = "update UAM_AUTHORIZATION t set t.lockstatus = '1',PASSWD = 'XXXXXX' where t.loginid = '" + loginid + "'";
  1138. CallingMessage par = new CallingMessage();
  1139. par.ServerName = "TurnoffReport";
  1140. par.ClassName = "Core.XgMes.Server.TurnoffReport.TurnoffSCC_ZL";
  1141. par.MethodName = "updateData";
  1142. par.args = new object[] { sql };
  1143. string strOut = "";
  1144. object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
  1145. if (strOut != "")
  1146. {
  1147. MessageBox.Show("注销失败! \n" + strOut);
  1148. return;
  1149. }
  1150. else
  1151. {
  1152. if ((int)obj == 0)
  1153. {
  1154. MessageBox.Show("注销失败!");
  1155. return;
  1156. }
  1157. }
  1158. MessageBox.Show("注销成功!");
  1159. }
  1160. private void UNLOCK()
  1161. {
  1162. if (this.ultraGrid1.ActiveRow == null)
  1163. {
  1164. MessageBox.Show("请选择需要操作的帐户!");
  1165. }
  1166. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  1167. string loginid = ugr.Cells[0].Value.ToString();
  1168. string sql = "update UAM_AUTHORIZATION t set t.lockstatus = '0',PASSWD = '1' where t.loginid = '" + loginid + "'";
  1169. CallingMessage par = new CallingMessage();
  1170. par.ServerName = "TurnoffReport";
  1171. par.ClassName = "Core.XgMes.Server.TurnoffReport.TurnoffSCC_ZL";
  1172. par.MethodName = "updateData";
  1173. par.args = new object[] { sql };
  1174. string strOut = "";
  1175. object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
  1176. if (strOut != "")
  1177. {
  1178. MessageBox.Show("启用失败! \n" + strOut);
  1179. return;
  1180. }
  1181. else
  1182. {
  1183. if ((int)obj == 0)
  1184. {
  1185. MessageBox.Show("启动失败!");
  1186. return;
  1187. }
  1188. }
  1189. MessageBox.Show("启用成功!");
  1190. }
  1191. private void Add()
  1192. {
  1193. // try
  1194. // {
  1195. if (this.ultraTextEditor2.Text.Trim() == "")
  1196. {
  1197. MessageBox.Show("请输入登录帐号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1198. return;
  1199. }
  1200. if (this.ultraComboEditor2.Value == null)
  1201. {
  1202. MessageBox.Show("请选择角色!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1203. return;
  1204. }
  1205. if (this.ultraComboEditor3.Value == null)
  1206. {
  1207. MessageBox.Show("请选择用户!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1208. return;
  1209. }
  1210. GetCombo3Dept();
  1211. if (operDepart != "ROOT")
  1212. {
  1213. if (allDept.IndexOf("'" + SelComboDept + "'") < 0)
  1214. {
  1215. MessageBox.Show("你没有配置该用户的权限,请重新选择!");
  1216. return;
  1217. }
  1218. }
  1219. if (this.ultraTextEditor4.Text.Trim() == "")
  1220. {
  1221. MessageBox.Show("请输入登录密码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1222. return;
  1223. }
  1224. Roleid();
  1225. Userid();
  1226. ArrayList al = new ArrayList();
  1227. al.Add(this.ultraTextEditor2.Text.Trim());
  1228. al.Add(ultraComboEditor2.Value.ToString().Trim());
  1229. al.Add(ultraComboEditor3.Value.ToString().Trim());
  1230. // al.Add(this.ultraComboEditor3 .Value .ToString ());
  1231. al.Add(this.ultraTextEditor4.Text.Trim());
  1232. try
  1233. {
  1234. CallingMessage par = new CallingMessage();
  1235. par.ServerName = "PurviewManager";
  1236. // par.AssemblyName = "Core.Mes.PurviewManager";
  1237. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  1238. par.MethodName = "InsertUAM_AUTHORIZATION";
  1239. par.args = new object[] { al };
  1240. par.ServerType = MesServerType.MesSystemBaseServer;
  1241. string strOut = "";
  1242. object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
  1243. if (strOut != "")
  1244. {
  1245. MessageBox.Show("新增失败! \n" + strOut);
  1246. return;
  1247. }
  1248. else
  1249. {
  1250. if ((int)obj != 1)
  1251. {
  1252. MessageBox.Show("新增失败!");
  1253. return;
  1254. }
  1255. }
  1256. }
  1257. catch(System.Exception ex)
  1258. {
  1259. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1260. return;
  1261. }
  1262. this.GetDepartmentData();
  1263. UltraGridRow ugr = this.ultraGrid1.DisplayLayout.Bands[0].AddNew();
  1264. ugr.Cells["LOGINID"].Value = al[0];
  1265. ugr.Cells["ROLEID"].Value = al[1];
  1266. ugr.Cells["USERID"].Value = al[2];
  1267. ugr.Cells["PASSWD"].Value = al[3];
  1268. foreach (DataRow drow in _userData.Tables[0].Rows)
  1269. {
  1270. if (drow["USERID"].ToString() == al[2].ToString())
  1271. {
  1272. ugr.Cells["DEPARTMENTID"].Value = drow["DEPARTMENTID"].ToString();
  1273. ugr.Cells["WORKPOS"].Value = drow["WORKPOS"].ToString();
  1274. break;
  1275. }
  1276. }
  1277. foreach (DataRow drow in _roleData.Tables[0].Rows)
  1278. {
  1279. if (drow["ROLEID"].ToString() == al[1].ToString())
  1280. {
  1281. ugr.Cells["ROLEMEMO"].Value = drow["MEMO"].ToString();
  1282. break;
  1283. }
  1284. }
  1285. this.ultraGrid1.Update();
  1286. // }
  1287. // catch
  1288. // {}
  1289. }
  1290. private void Del()
  1291. {
  1292. int i = 0;
  1293. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  1294. if (ugr == null)
  1295. {
  1296. MessageBox.Show("请选择要删除的帐户!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1297. return;
  1298. }
  1299. GetCombo3Dept();
  1300. if (operDepart != "ROOT")
  1301. {
  1302. if (allDept.IndexOf("'" + SelComboDept + "'") < 0)
  1303. {
  1304. MessageBox.Show("你没有删除该帐户的权限,请重新选择!");
  1305. return;
  1306. }
  1307. }
  1308. if (MessageBox.Show("是否确认删除选中的帐户?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
  1309. {
  1310. return;
  1311. }
  1312. try
  1313. {
  1314. i = ugr.Index;
  1315. string strWhere = " where LOGINID = '" + ugr.Cells[0].Value.ToString() + "'";
  1316. CallingMessage par = new CallingMessage();
  1317. par.ServerName = "PurviewManager";
  1318. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  1319. par.MethodName = "DeleteUAM_AUTHORIZATION";
  1320. par.args = new object[] { strWhere };
  1321. string strOut = "";
  1322. object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
  1323. if (strOut != "")
  1324. {
  1325. MessageBox.Show("删除失败! \n" + strOut);
  1326. return;
  1327. }
  1328. else
  1329. {
  1330. if ((int)obj != 1)
  1331. {
  1332. MessageBox.Show("删除失败!");
  1333. return;
  1334. }
  1335. }
  1336. }
  1337. catch(System.Exception ex)
  1338. {
  1339. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1340. return;
  1341. }
  1342. ultraGrid1.ActiveRow.Delete(false);
  1343. ultraGrid1.UpdateData();
  1344. try
  1345. {
  1346. ultraGrid1.Rows[i].Activate();
  1347. }
  1348. catch
  1349. {
  1350. int count = ultraGrid1.Rows.Count;
  1351. if (count > 0)
  1352. ultraGrid1.Rows[count - 1].Activate();
  1353. }
  1354. }
  1355. private void Edit()
  1356. {
  1357. try
  1358. {
  1359. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  1360. if (ugr == null)
  1361. {
  1362. MessageBox.Show("请选择要修改的用户!");
  1363. return;
  1364. }
  1365. if (this.ultraTextEditor2.Text.Trim() != ugr.Cells["LOGINID"].Text.Trim())
  1366. {
  1367. MessageBox.Show("不能修改登录帐号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1368. return;
  1369. }
  1370. if (this.ultraComboEditor2.Value == null)
  1371. {
  1372. MessageBox.Show("请选择角色!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1373. return;
  1374. }
  1375. if (this.ultraComboEditor3.Value == null)
  1376. {
  1377. MessageBox.Show("请选择用户!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1378. return;
  1379. }
  1380. if (this.ultraTextEditor4.Text.Trim() == "")
  1381. {
  1382. MessageBox.Show("请输入登录密码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1383. return;
  1384. }
  1385. GetCombo3Dept();
  1386. if (allDept.IndexOf("'" + SelComboDept + "'") < 0 && operDepart != "ROOT")
  1387. {
  1388. MessageBox.Show("你没有配置这一部门用户的权限,请重新选择!");
  1389. return;
  1390. }
  1391. Roleid();
  1392. Userid();
  1393. ArrayList al = new ArrayList();
  1394. al.Add(this.ultraTextEditor2.Text.Trim());
  1395. al.Add(ultraComboEditor2.Value.ToString());
  1396. al.Add(userid.Trim());
  1397. al.Add(this.ultraTextEditor4.Text.Trim());
  1398. try
  1399. {
  1400. CallingMessage par = new CallingMessage();
  1401. par.ServerName = "PurviewManager";
  1402. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  1403. par.MethodName = "UpdateUAM_AUTHORIZATION";
  1404. par.args = new object[] { al };
  1405. string strOut = "";
  1406. object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
  1407. if (strOut != "")
  1408. {
  1409. MessageBox.Show("修改失败 \n" + strOut);
  1410. return;
  1411. }
  1412. else
  1413. {
  1414. int i = (int)obj;
  1415. if (i != 1)
  1416. {
  1417. MessageBox.Show("修改失败");
  1418. return;
  1419. }
  1420. }
  1421. }
  1422. catch(System.Exception ex)
  1423. {
  1424. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1425. return;
  1426. }
  1427. ugr.Cells["LOGINID"].Value = al[0];
  1428. ugr.Cells["ROLEID"].Value = al[1];
  1429. ugr.Cells["USERID"].Value = al[2];
  1430. ugr.Cells["PASSWD"].Value = al[3];
  1431. foreach (DataRow drow in _userData.Tables[0].Rows)
  1432. {
  1433. if (drow["USERID"].ToString() == al[2].ToString())
  1434. {
  1435. ugr.Cells["DEPARTMENTID"].Value = drow["DEPARTMENTID"].ToString();
  1436. ugr.Cells["WORKPOS"].Value = drow["WORKPOS"].ToString();
  1437. break;
  1438. }
  1439. }
  1440. foreach (DataRow drow in _roleData.Tables[0].Rows)
  1441. {
  1442. if (drow["ROLEID"].ToString() == al[1].ToString())
  1443. {
  1444. ugr.Cells["ROLEMEMO"].Value = drow["MEMO"].ToString();
  1445. break;
  1446. }
  1447. }
  1448. ultraGrid1.UpdateData();
  1449. }
  1450. catch(System.Exception ex)
  1451. {
  1452. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1453. }
  1454. }
  1455. private void Query()
  1456. {
  1457. if ((this.ultraCheckEditor1.Checked && this.ultraTextEditor1.Text != "") ||
  1458. (this.ultraCheckEditor2.Checked && this.ultraComboEditor1.Text != "") ||
  1459. (this.ultLoginID.Text.Trim().Length > 0))
  1460. {
  1461. if (this.ultraCheckEditor1.Checked && this.ultraTextEditor1.Text != "")
  1462. {
  1463. GetSelDept();
  1464. if (selDept == "ROOT")
  1465. {
  1466. if (operDepart != "ROOT")
  1467. {
  1468. MessageBox.Show("你没有查看整个公司的权限,请重新选择!");
  1469. return;
  1470. }
  1471. }
  1472. if (operDepart != "ROOT" && allDept.IndexOf("'" + selDept + "'") < 0)
  1473. {
  1474. MessageBox.Show("你没有查看这一部门的权限,请重新选择!");
  1475. return;
  1476. }
  1477. }
  1478. RefreshGrid();
  1479. this.ultraToolbarsManager1.Toolbars[0].Tools["back"].SharedProps.Visible = true;
  1480. }
  1481. else
  1482. MessageBox.Show("请选择要查询的部门、角色或帐号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1483. }
  1484. //private void RefreshData1(string str)
  1485. //{
  1486. // try
  1487. // {
  1488. // CallingMessage par = new CallingMessage();
  1489. // par.ServerName = "PurviewManager";
  1490. // par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  1491. // par.MethodName = "SelectUAM_AUTHORIZATION";
  1492. // par.args = new object[]{str};
  1493. // string strOut = "";
  1494. // _auData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  1495. // _selectAuSQL = strOut;
  1496. // }
  1497. // catch
  1498. // {
  1499. // }
  1500. // this.ultraGrid1.DataSource=_auData.Tables[0];
  1501. // ultraGrid1.UpdateData();
  1502. //}
  1503. private void RefreshGrid()
  1504. {
  1505. string str = "";
  1506. str = GetRefreshWhere();
  1507. //str = " where " + str + " order by loginID";
  1508. try
  1509. {
  1510. CallingMessage par = new CallingMessage();
  1511. par.ServerName = "PurviewManager";
  1512. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  1513. par.MethodName = "GetUAM_AUTHORIZATION";
  1514. par.args = new object[] { str };
  1515. string strOut = "";
  1516. _auData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  1517. _selectAuSQL = strOut;
  1518. }
  1519. catch(System.Exception ex)
  1520. {
  1521. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1522. }
  1523. /* try
  1524. {
  1525. this._auData.Tables[0].DefaultView.RowFilter = GetRefreshWhere();
  1526. }
  1527. catch
  1528. {
  1529. this._auData.Tables[0].DefaultView.RowFilter = "1=2";
  1530. }
  1531. */
  1532. this.ultraGrid1.DataSource = _auData.Tables[0];
  1533. ultraGrid1.UpdateData();
  1534. }
  1535. private string GetRefreshWhere()
  1536. {
  1537. string sqlstr = "";
  1538. if (this.ultraTextEditor1.Enabled && this.ultraCheckEditor1.Checked && this.ultraTextEditor1.Text != "" && ultraTextEditor1.Tag.ToString().Length>0)
  1539. {
  1540. sqlstr += "AND B.DEPARTMENTID IN (" + this.ultraTextEditor1.Tag + ")";
  1541. //ArrayList al = this.GetUserID();
  1542. //if (al == null || al.Count == 0)
  1543. //{
  1544. // sqlstr = "1=2";
  1545. //}
  1546. //else
  1547. //{
  1548. // sqlstr += " USERID in ('" + al[0].ToString() + "'";
  1549. // for (int i = 1; i < al.Count; i++)
  1550. // {
  1551. // sqlstr += ", '" + al[i].ToString() + "' ";
  1552. // }
  1553. // sqlstr += ")";
  1554. //}
  1555. }
  1556. if (this.ultraComboEditor1.Enabled && this.ultraCheckEditor2.Checked && this.ultraComboEditor1.Text != "")
  1557. {
  1558. sqlstr += " AND A.ROLEID = '" + this.ultraComboEditor1.Value.ToString() + "'";
  1559. }
  1560. if (this.ultLoginID.Text.Trim().Length > 0)
  1561. {
  1562. sqlstr += " AND A.LOGINID = '" + this.ultLoginID.Text.Trim() + "'";
  1563. }
  1564. return sqlstr;
  1565. }
  1566. private void roling_c1()
  1567. {
  1568. if (_roleData != null && _roleData.Tables.Count > 0)
  1569. {
  1570. for (int i = 0; i < _roleData.Tables[0].Rows.Count; i++)
  1571. {
  1572. if (_roleData.Tables[0].Rows[i]["ROLENAME"].ToString() == this.ultraComboEditor1.Value.ToString())
  1573. {
  1574. this.ultraComboEditor1.Value = (_roleData).Tables[0].Rows[i]["ROLEID"];
  1575. return;
  1576. }
  1577. }
  1578. }
  1579. }
  1580. private ArrayList GetUserID()
  1581. {
  1582. ArrayList al = new ArrayList();
  1583. DataTable dt = null;
  1584. if (this._userData == null && this.GetUserData() == null)
  1585. dt = null;
  1586. else
  1587. dt = this._userData.Tables[0];
  1588. if (dt != null)
  1589. {
  1590. if (this.ultraTextEditor1.Enabled && this.ultraTextEditor1.Tag != null)
  1591. {
  1592. string partid = this.ultraTextEditor1.Tag.ToString();
  1593. string strFilter = "DEPARTMENTID in (" + partid + ")";
  1594. dt.DefaultView.RowFilter = strFilter;
  1595. }
  1596. for (int i = 0; i < dt.DefaultView.Count; i++)
  1597. {
  1598. al.Add(dt.DefaultView[i]["USERID"].ToString());
  1599. }
  1600. return al;
  1601. }
  1602. else
  1603. return null;
  1604. }
  1605. #endregion
  1606. private bool CheckRoleID()
  1607. {
  1608. try
  1609. {
  1610. string userid = Core.Mes.ClientFrameWork.ClientCommon._UserInfo.LoginID;
  1611. DataRow[] drs = this._auData.Tables[0].Select("LOGINID = '" + userid + "'");
  1612. if (drs.Length > 0)
  1613. {
  1614. if (drs[0]["ROLEID"].ToString() == "001")
  1615. {
  1616. return true;
  1617. }
  1618. }
  1619. }
  1620. catch(System.Exception ex)
  1621. {
  1622. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1623. }
  1624. return false;
  1625. }
  1626. private Point GetChildWindowLocation(Size ChildWindowSize)
  1627. {
  1628. int width = Cursor.Position.X + ChildWindowSize.Width - Screen.PrimaryScreen.Bounds.Width;
  1629. int height = Cursor.Position.Y + ChildWindowSize.Height - Screen.PrimaryScreen.Bounds.Height + 30;
  1630. if (width > 0)
  1631. width = Cursor.Position.X - width;
  1632. else
  1633. width = Cursor.Position.X;
  1634. if (height > 0)
  1635. height = Cursor.Position.Y - height + 10;
  1636. else
  1637. height = Cursor.Position.Y + 10;
  1638. return new Point(width, height);
  1639. }
  1640. private void ultraComboEditor3_EditorButtonClick_1(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  1641. {
  1642. FrmSelUserID frm = new FrmSelUserID();
  1643. frm._departmentData = this._departmentData;
  1644. frm._userData = this._userData;
  1645. frm.Location = this.GetChildWindowLocation(frm.Size);
  1646. frm.ShowDialog();
  1647. if (frm._changFlag)
  1648. {
  1649. this.ultraComboEditor3.Value = frm._currSelectID;
  1650. }
  1651. // if (_userData != null && _userData.Tables.Count > 0)
  1652. // {
  1653. // DataTable dt = this._userData.Tables[0].Copy();
  1654. //
  1655. // foreach (DataRow dr in dt.Rows)
  1656. // {
  1657. // if(dr["NAME"].ToString ()==this.ultraComboEditor3.Text .ToString ())
  1658. // {
  1659. // SelComboDept=dr["DEPARTMENTID"];
  1660. // }
  1661. // }
  1662. // }
  1663. GetCombo3Dept();
  1664. if (operDepart != "ROOT")
  1665. {
  1666. if (allDept.IndexOf("'" + SelComboDept + "'") < 0)
  1667. {
  1668. this.ultraComboEditor3.Text = "";
  1669. MessageBox.Show("你没有配置该用户的权限,请重新选择!");
  1670. return;
  1671. }
  1672. }
  1673. }
  1674. private void ultraTextEditor1_EditorButtonClick_1(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  1675. {
  1676. FrmSetDepart frm = new FrmSetDepart();
  1677. frm.Location = GetChildWindowLocation(frm.Size);
  1678. frm.ShowDialog();
  1679. if (frm.SelectedID != "" && frm.SelectedName != "")
  1680. {
  1681. this.ultraTextEditor1.Text = frm.SelectedName;
  1682. this.ultraTextEditor1.Tag = frm.SelectedID;
  1683. if (this.ultraTextEditor1.Text != "" && this.ultraCheckEditor1.Checked)
  1684. {
  1685. GetSelDept();
  1686. if (operDepart != "ROOT" && allDept.IndexOf("'" + selDept + "'") < 0)
  1687. {
  1688. MessageBox.Show("你没有查看这一部门的权限,请重新选择!");
  1689. }
  1690. }
  1691. }
  1692. }
  1693. private void ultraButton1_Click(object sender, System.EventArgs e)
  1694. {
  1695. foreach (Form mdiChild in this.MdiParent.MdiChildren)
  1696. {
  1697. if (mdiChild.Text == "部门维护")
  1698. {
  1699. mdiChild.Activate();
  1700. return;
  1701. }
  1702. }
  1703. FrmDepartment frmpart = new FrmDepartment();
  1704. //frmpart.Location = GetChildWindowLocation(frmpart.Size);
  1705. frmpart.MdiParent = this.ParentForm;
  1706. frmpart.Show();
  1707. }
  1708. private void ultraButton2_Click(object sender, System.EventArgs e)
  1709. {
  1710. FrmRole frmRole = new FrmRole();
  1711. frmRole._roleData = this._roleData;
  1712. frmRole._selectSQL = this._selectRoleSQL;
  1713. frmRole.IsAdminFlag = IsAdminFlag;
  1714. //frmRole.ShowDialog(this);
  1715. frmRole.Location = GetChildWindowLocation(frmRole.Size);
  1716. frmRole.ShowDialog(this);
  1717. GetFitRole();
  1718. InitCombo();
  1719. //this._roleData = frmRole._roleData ;
  1720. //this.InitRoleCombo();
  1721. }
  1722. private void ultraCheckEditor1_CheckedChanged(object sender, System.EventArgs e)
  1723. {
  1724. ultraTextEditor1.Enabled = ultraCheckEditor1.Checked;
  1725. }
  1726. private void ultraCheckEditor2_CheckedChanged(object sender, System.EventArgs e)
  1727. {
  1728. ultraComboEditor1.Enabled = ultraCheckEditor2.Checked;
  1729. }
  1730. private void GetChildDept()
  1731. {
  1732. try
  1733. {
  1734. string strOut = "";
  1735. DataSet ds = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("PurviewManager", "Core.Mes.PurviewManager.UAM_USER", "SelectChildDept", new object[] { operDepart }, out strOut) as DataSet;
  1736. if (ds.Tables[0].Rows[0][0].ToString() != "")
  1737. {
  1738. allDept = "'" + ds.Tables[0].Rows[0][0].ToString() + "'" + operDepart + "'";
  1739. }
  1740. else
  1741. allDept = "'" + operDepart + "'";
  1742. }
  1743. catch(System.Exception ex)
  1744. {
  1745. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1746. }
  1747. }
  1748. private void GetSelDept()
  1749. {
  1750. try
  1751. {
  1752. if (this.ultraTextEditor1.Text != "" && ultraCheckEditor1.Checked)
  1753. {
  1754. DataTable dt = this._departmentData.Tables[0].Copy();
  1755. foreach (DataRow dr in dt.Rows)
  1756. {
  1757. if (dr["DEPARTMENTNAME"].ToString() == this.ultraTextEditor1.Text)
  1758. {
  1759. selDept = dr["DEPARTMENTID"].ToString();
  1760. return;
  1761. }
  1762. }
  1763. }
  1764. }
  1765. catch(System.Exception ex)
  1766. {
  1767. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1768. }
  1769. }
  1770. private void ultraComboEditor3_SelectionChanged(object sender, System.EventArgs e)
  1771. {
  1772. GetCombo3Dept();
  1773. if (operDepart != "ROOT")
  1774. {
  1775. if (allDept.IndexOf("'" + SelComboDept + "'") < 0)
  1776. {
  1777. this.ultraComboEditor3.Text = "";
  1778. MessageBox.Show("你没有配置该用户的权限,请重新选择!");
  1779. return;
  1780. }
  1781. }
  1782. }
  1783. private void ultLoginID_EditorButtonClick(object sender, EditorButtonEventArgs e)
  1784. {
  1785. try
  1786. {
  1787. if (e.Button.Key == "SET")
  1788. {
  1789. if (ultLoginID.Text.Trim().Length > 0)
  1790. {
  1791. ultLoginID.Tag = ultLoginID.Text.Trim();
  1792. ultLoginID.Text = "";
  1793. }
  1794. else
  1795. {
  1796. if (ultLoginID.Tag != null)
  1797. ultLoginID.Text = ultLoginID.Tag.ToString();
  1798. }
  1799. }
  1800. }
  1801. catch(System.Exception ex)
  1802. {
  1803. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1804. }
  1805. }
  1806. private void CHK_GL_CheckedChanged(object sender, EventArgs e)
  1807. {
  1808. if (this.CHK_GL.Checked)
  1809. {
  1810. this.ultraGrid1.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.True;
  1811. }
  1812. else
  1813. {
  1814. this.ultraGrid1.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.False;
  1815. this.ultraGrid1.DisplayLayout.Bands[0].ColumnFilters.ClearAllFilters();
  1816. }
  1817. }
  1818. private void ultraComboEditor3_Click(object sender, EventArgs e)
  1819. {
  1820. FrmSelUserID frm = new FrmSelUserID();
  1821. frm._departmentData = this._departmentData;
  1822. frm._userData = this._userData;
  1823. frm.Location = this.GetChildWindowLocation(frm.Size);
  1824. frm.ShowDialog();
  1825. if (frm._changFlag)
  1826. {
  1827. this.ultraComboEditor3.Value = frm._currSelectID;
  1828. }
  1829. GetCombo3Dept();
  1830. if (operDepart != "ROOT")
  1831. {
  1832. if (allDept.IndexOf("'" + SelComboDept + "'") < 0)
  1833. {
  1834. this.ultraComboEditor3.Text = "";
  1835. MessageBox.Show("你没有配置该用户的权限,请重新选择!");
  1836. return;
  1837. }
  1838. }
  1839. }
  1840. }
  1841. }