bac71ee46387f667b08538c5b563a111dca87d61.svn-base 77 KB

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