334b014d76842216f6e6c0d70f5e1d62ee02b671.svn-base 77 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914
  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. }
  749. catch(System.Exception ex)
  750. {
  751. System.Diagnostics.Debug.WriteLine(ex.ToString());
  752. }
  753. }
  754. private DataSet GetUserData()
  755. {
  756. try
  757. {
  758. string str = "";
  759. CallingMessage par = new CallingMessage();
  760. par.ServerName = "PurviewManager";
  761. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  762. par.MethodName = "SelectUAM_USER";
  763. par.args = new object[] { str };
  764. string strOut = "";
  765. _userData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  766. return _userData;
  767. }
  768. catch (Exception ex)
  769. {
  770. System.Diagnostics.Debug.WriteLine(ex.ToString());
  771. return null;
  772. }
  773. }
  774. private DataSet GetValidUserData()
  775. {
  776. try
  777. {
  778. string str = "";
  779. if (operDepart != "ROOT")
  780. str = " where DEPARTMENTID in (" + allDept + ") order by 1";
  781. else
  782. str = " order by 1";
  783. CallingMessage par = new CallingMessage();
  784. par.ServerName = "PurviewManager";
  785. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  786. par.MethodName = "SelectUAM_USER";
  787. par.args = new object[] { str };
  788. string strOut = "";
  789. _validUserData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  790. return _validUserData;
  791. }
  792. catch (Exception ex)
  793. {
  794. System.Diagnostics.Debug.WriteLine(ex.ToString());
  795. return null;
  796. }
  797. }
  798. private void GetDepartmentData()
  799. {
  800. try
  801. {
  802. CallingMessage par = new CallingMessage();
  803. par.ServerName = "PurviewManager";
  804. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  805. par.MethodName = "SelectUAM_DEPARTMENT";
  806. par.args = new object[] { "" };
  807. string strOut = "";
  808. _departmentData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  809. _selectPartSQL = strOut;
  810. }
  811. catch(System.Exception ex)
  812. {
  813. System.Diagnostics.Debug.WriteLine(ex.ToString());
  814. }
  815. }
  816. private void GetRoleDataSet()
  817. {
  818. try
  819. {
  820. CallingMessage par = new CallingMessage();
  821. par.ServerName = "PurviewManager";
  822. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  823. par.MethodName = "SelectUAM_ROLE";
  824. par.args = new object[] { " order by roleid" };
  825. string strOut = "";
  826. _roleData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  827. _selectRoleSQL = strOut;
  828. }
  829. catch(System.Exception ex)
  830. {
  831. System.Diagnostics.Debug.WriteLine(ex.ToString());
  832. }
  833. }
  834. private void GetCombo3Dept()
  835. {
  836. try
  837. {
  838. if (_userData != null && _userData.Tables.Count > 0)
  839. {
  840. DataTable dt = this._userData.Tables[0].Copy();
  841. foreach (DataRow dr in dt.Rows)
  842. {
  843. if (dr["NAME"].ToString() == this.ultraComboEditor3.Text.ToString())
  844. {
  845. SelComboDept = dr["DEPARTMENTID"].ToString();
  846. }
  847. }
  848. }
  849. }
  850. catch(System.Exception ex)
  851. {
  852. System.Diagnostics.Debug.WriteLine(ex.ToString());
  853. SelComboDept = "";
  854. }
  855. }
  856. private void GetFitRole()
  857. {
  858. try
  859. {
  860. string str = "";
  861. if (operDepart != "ROOT")
  862. str = " where DEPARTMENTID in (" + allDept + ") order by roleid";
  863. else
  864. str = " order by roleid";
  865. CallingMessage par = new CallingMessage();
  866. par.ServerName = "PurviewManager";
  867. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  868. par.MethodName = "SelectUAM_ROLE";
  869. par.args = new object[] { str };
  870. string strOut = "";
  871. _fitRole = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  872. }
  873. catch(System.Exception ex)
  874. {
  875. System.Diagnostics.Debug.WriteLine(ex.ToString());
  876. }
  877. }
  878. private void InitCombo()
  879. {
  880. if (_validUserData != null && _validUserData.Tables.Count > 0)
  881. {
  882. ultraComboEditor3.Items.Clear();
  883. foreach (DataRow arow in (_validUserData).Tables[0].Rows)
  884. ultraComboEditor3.Items.Add(arow[0], arow[2].ToString());
  885. }
  886. if (_fitRole != null && _fitRole.Tables.Count > 0)
  887. {
  888. ultraComboEditor1.Items.Clear();
  889. ultraComboEditor2.Items.Clear();
  890. foreach (DataRow arow in (_fitRole).Tables[0].Rows)
  891. {
  892. ultraComboEditor1.Items.Add(arow[0], arow[1].ToString());
  893. ultraComboEditor2.Items.Add(arow[0], arow[1].ToString());
  894. }
  895. }
  896. }
  897. private void GetOperDepart()
  898. {
  899. try
  900. {
  901. if (_userData != null && _userData.Tables.Count > 0)
  902. {
  903. DataTable dt = this._userData.Tables[0].Copy();
  904. foreach (DataRow dr in dt.Rows)
  905. {
  906. if (dr["NAME"].ToString() == StrUser)
  907. {
  908. operDepart = dr["DEPARTMENTID"].ToString();
  909. DataTable dn = this._departmentData.Tables[0].Copy();
  910. foreach (DataRow dm in dn.Rows)
  911. {
  912. if (dm["DEPARTMENTID"].ToString() == operDepart)
  913. {
  914. operDepartname = dm["DEPARTMENTNAME"].ToString();
  915. }
  916. }
  917. }
  918. }
  919. }
  920. }
  921. catch(System.Exception ex)
  922. {
  923. System.Diagnostics.Debug.WriteLine(ex.ToString());
  924. }
  925. }
  926. private void InitGrid()
  927. {
  928. // InitRoleCombo();
  929. GetPartData();
  930. GetUserDataInGrid();
  931. this.ultraCheckEditor1.CheckedValue = true;
  932. this.ultraTextEditor1.Enabled = true;
  933. this.ultraTextEditor1.Text = operDepartname;
  934. this.ultraTextEditor1.Tag = allDept;
  935. Query();
  936. // this.ultraGrid1.DataSource =this.ultraDataSource1 ;
  937. // ultraGrid1.DataSource = ((DataSet)_auData).Tables[0];
  938. this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].ValueList = ultraGrid1.DisplayLayout.ValueLists["name"];
  939. this.ultraGrid1.DisplayLayout.Bands[0].Columns["ROLEID"].ValueList = ultraGrid1.DisplayLayout.ValueLists["role"];
  940. ultraGrid1.DisplayLayout.Bands[0].Columns["DEPARTMENTID"].ValueList = ultraGrid1.DisplayLayout.ValueLists["department"];
  941. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["LOGINID"].Header.Caption = "登录帐号";
  942. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["LOGINID"].Width = 80;
  943. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["LOGINID"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
  944. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["LOGINID"].CellActivation = Activation.NoEdit;
  945. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["LOGINID"].CellAppearance.BackColor = Color.LightGoldenrodYellow;
  946. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["ROLEID"].Header.Caption = "角色";
  947. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["ROLEID"].Width = 200;
  948. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["ROLEID"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
  949. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["ROLEID"].CellActivation = Activation.NoEdit;
  950. //this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Default;
  951. //this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Default;
  952. //this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Default;
  953. //this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Default;
  954. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].Header.Caption = "用户姓名";
  955. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].Width = 100;
  956. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
  957. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].CellActivation = Activation.NoEdit;
  958. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].CellAppearance.BackColor = Color.LightGoldenrodYellow;
  959. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["PASSWD"].Header.Caption = "登录密码";
  960. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["PASSWD"].Width = 100;
  961. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["PASSWD"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
  962. //this.ultraGrid1.DisplayLayout.Bands[0].Columns["PASSWD"].CellActivation = Activation.NoEdit;
  963. }
  964. private void InitRoleCombo()
  965. {
  966. if (_userData != null && _userData.Tables.Count > 0)
  967. {
  968. DataTable dt = _userData.Tables[0].Copy();
  969. foreach (DataRow dr in dt.Rows)
  970. {
  971. try
  972. {
  973. this.ultraComboEditor3.Items.Add(dr["USERID"], dr["NAME"].ToString());
  974. }
  975. catch(System.Exception ex)
  976. {
  977. System.Diagnostics.Debug.WriteLine(ex.ToString());
  978. }
  979. }
  980. }
  981. }
  982. private void GetAuData()
  983. {
  984. try
  985. {
  986. CallingMessage par = new CallingMessage();
  987. par.ServerName = "PurviewManager";
  988. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  989. par.MethodName = "SelectUAM_AUTHORIZATION";
  990. par.args = new object[] { " order by loginID" };
  991. string strOut = "";
  992. _auData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  993. _selectAuSQL = strOut;
  994. }
  995. catch(System.Exception ex)
  996. {
  997. System.Diagnostics.Debug.WriteLine(ex.ToString());
  998. }
  999. }
  1000. private void GetPartData()
  1001. {
  1002. if (ultraGrid1.DisplayLayout.ValueLists.Exists("role"))
  1003. {
  1004. ultraGrid1.DisplayLayout.ValueLists["role"].ValueListItems.Clear();
  1005. }
  1006. else
  1007. {
  1008. ultraGrid1.DisplayLayout.ValueLists.Add("role");
  1009. }
  1010. foreach (DataRow dr in this._roleData.Tables[0].Rows)
  1011. {
  1012. Infragistics.Win.ValueListItem vli = new Infragistics.Win.ValueListItem();
  1013. vli.DisplayText = dr["ROLENAME"].ToString();
  1014. vli.DataValue = dr["ROLEID"];
  1015. ultraGrid1.DisplayLayout.ValueLists["role"].ValueListItems.Add(vli);
  1016. }
  1017. if (ultraGrid1.DisplayLayout.ValueLists.Exists("department"))
  1018. {
  1019. ultraGrid1.DisplayLayout.ValueLists["department"].ValueListItems.Clear();
  1020. }
  1021. else
  1022. {
  1023. ultraGrid1.DisplayLayout.ValueLists.Add("department");
  1024. }
  1025. foreach (DataRow dr in this._departmentData.Tables[0].Rows)
  1026. {
  1027. Infragistics.Win.ValueListItem vli = new Infragistics.Win.ValueListItem();
  1028. vli.DisplayText = dr["DEPARTMENTNAME"].ToString();
  1029. vli.DataValue = dr["DEPARTMENTID"];
  1030. ultraGrid1.DisplayLayout.ValueLists["department"].ValueListItems.Add(vli);
  1031. }
  1032. }
  1033. private void GetUserDataInGrid()
  1034. {
  1035. if (ultraGrid1.DisplayLayout.ValueLists.Exists("name"))
  1036. {
  1037. ultraGrid1.DisplayLayout.ValueLists["name"].ValueListItems.Clear();
  1038. }
  1039. else
  1040. {
  1041. ultraGrid1.DisplayLayout.ValueLists.Add("name");
  1042. }
  1043. foreach (DataRow dr in this._userData.Tables[0].Rows)
  1044. {
  1045. Infragistics.Win.ValueListItem vli = new Infragistics.Win.ValueListItem();
  1046. vli.DisplayText = dr["NAME"].ToString();
  1047. vli.DataValue = dr["USERID"];
  1048. ultraGrid1.DisplayLayout.ValueLists["name"].ValueListItems.Add(vli);
  1049. }
  1050. }
  1051. private void ultraGrid1_AfterRowActivate(object sender, System.EventArgs e)
  1052. {
  1053. try
  1054. {
  1055. if (this.ultraGrid1.ActiveRow == null) return;
  1056. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  1057. this.ultraTextEditor2.Text = ugr.Cells[0].Value.ToString();
  1058. this.ultraTextEditor4.Text = ugr.Cells[3].Value.ToString();
  1059. //Usering();
  1060. //Roleing();
  1061. ultraComboEditor3.Value = ugr.Cells[2].Value.ToString();
  1062. ultraComboEditor2.Value = ugr.Cells[1].Value.ToString();
  1063. }
  1064. catch (Exception ex)
  1065. {
  1066. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1067. }
  1068. }
  1069. private void Usering()
  1070. {
  1071. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  1072. if (_userData != null && _userData.Tables.Count > 0)
  1073. {
  1074. for (int i = 0; i < _userData.Tables[0].Rows.Count; i++)
  1075. {
  1076. if (_userData.Tables[0].Rows[i][0].ToString() == ugr.Cells[2].Value.ToString())
  1077. {
  1078. this.ultraComboEditor3.Value = (_userData).Tables[0].Rows[i][2];
  1079. return;
  1080. }
  1081. }
  1082. }
  1083. }
  1084. private void Userid()
  1085. {
  1086. if (_userData != null && _userData.Tables.Count > 0)
  1087. {
  1088. for (int i = 0; i < _userData.Tables[0].Rows.Count; i++)
  1089. {
  1090. if (_userData.Tables[0].Rows[i]["NAME"].ToString() == this.ultraComboEditor3.Text.ToString())
  1091. {
  1092. userid = (_userData).Tables[0].Rows[i]["USERID"].ToString();
  1093. return;
  1094. }
  1095. }
  1096. }
  1097. }
  1098. private void Roleing()
  1099. {
  1100. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  1101. if (_roleData != null && _roleData.Tables.Count > 0)
  1102. {
  1103. for (int i = 0; i < _roleData.Tables[0].Rows.Count; i++)
  1104. {
  1105. if (_roleData.Tables[0].Rows[i]["ROLEID"].ToString() == ugr.Cells[1].Value.ToString())
  1106. {
  1107. this.ultraComboEditor2.Value = (_roleData).Tables[0].Rows[i]["ROLENAME"];
  1108. return;
  1109. }
  1110. }
  1111. }
  1112. }
  1113. private void Roleid()
  1114. {
  1115. if (_roleData != null && _roleData.Tables.Count > 0)
  1116. {
  1117. for (int i = 0; i < _roleData.Tables[0].Rows.Count; i++)
  1118. {
  1119. if (_roleData.Tables[0].Rows[i]["ROLENAME"].ToString() == this.ultraComboEditor2.Value.ToString())
  1120. {
  1121. roleid = (_roleData).Tables[0].Rows[i]["ROLEID"].ToString();
  1122. return;
  1123. }
  1124. }
  1125. }
  1126. }
  1127. #region 工具栏操作
  1128. private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
  1129. {
  1130. switch (e.Tool.Key)
  1131. {
  1132. case "add":
  1133. Add();
  1134. break;
  1135. case "del":
  1136. Del();
  1137. break;
  1138. case "edit":
  1139. Edit();
  1140. break;
  1141. case "query":
  1142. Query();
  1143. break;
  1144. case "close":
  1145. this.Close();
  1146. break;
  1147. case "back":
  1148. this.ultraToolbarsManager1.Toolbars[0].Tools["back"].SharedProps.Visible = false;
  1149. // RefreshData1("");
  1150. // ultraCheckEditor1.Checked = false;
  1151. // ultraTextEditor1.Text = "";
  1152. // ultraCheckEditor2.Checked = false;
  1153. // ultraComboEditor1.Text = "";
  1154. this.ultraCheckEditor1.CheckedValue = true;
  1155. this.ultraCheckEditor2.CheckedValue = false;
  1156. if (ultLoginID.Text.Trim().Length > 0)
  1157. {
  1158. ultLoginID.Tag = ultLoginID.Text.Trim();
  1159. ultLoginID.Text = "";
  1160. }
  1161. this.ultraTextEditor1.Enabled = true;
  1162. this.ultraTextEditor1.Text = operDepartname;
  1163. this.ultraTextEditor1.Tag = allDept;
  1164. Query();
  1165. break;
  1166. case "leadin":
  1167. try
  1168. {
  1169. string StrfileName = string.Format("c:\\{0}.xls", this.Text);
  1170. this.ultraGridExcelExporter1.Export(this.ultraGrid1, StrfileName);
  1171. ProcessStartInfo p = new ProcessStartInfo(StrfileName);
  1172. p.WorkingDirectory = Path.GetDirectoryName(StrfileName);
  1173. Process.Start(p);
  1174. }
  1175. catch (Exception ex)
  1176. {
  1177. MessageBox.Show(ex.Message);
  1178. }
  1179. break;
  1180. }
  1181. }
  1182. private void Add()
  1183. {
  1184. // try
  1185. // {
  1186. if (this.ultraTextEditor2.Text.Trim() == "")
  1187. {
  1188. MessageBox.Show("请输入登录帐号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1189. return;
  1190. }
  1191. if (this.ultraComboEditor2.Value == null)
  1192. {
  1193. MessageBox.Show("请选择角色!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1194. return;
  1195. }
  1196. if (this.ultraComboEditor3.Value == null)
  1197. {
  1198. MessageBox.Show("请选择用户!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1199. return;
  1200. }
  1201. GetCombo3Dept();
  1202. if (operDepart != "ROOT")
  1203. {
  1204. if (allDept.IndexOf("'" + SelComboDept + "'") < 0)
  1205. {
  1206. MessageBox.Show("你没有配置该用户的权限,请重新选择!");
  1207. return;
  1208. }
  1209. }
  1210. if (this.ultraTextEditor4.Text.Trim() == "")
  1211. {
  1212. MessageBox.Show("请输入登录密码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1213. return;
  1214. }
  1215. Roleid();
  1216. Userid();
  1217. ArrayList al = new ArrayList();
  1218. al.Add(this.ultraTextEditor2.Text.Trim());
  1219. al.Add(ultraComboEditor2.Value.ToString().Trim());
  1220. al.Add(ultraComboEditor3.Value.ToString().Trim());
  1221. // al.Add(this.ultraComboEditor3 .Value .ToString ());
  1222. al.Add(this.ultraTextEditor4.Text.Trim());
  1223. try
  1224. {
  1225. CallingMessage par = new CallingMessage();
  1226. par.ServerName = "PurviewManager";
  1227. // par.AssemblyName = "Core.Mes.PurviewManager";
  1228. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  1229. par.MethodName = "InsertUAM_AUTHORIZATION";
  1230. par.args = new object[] { al };
  1231. par.ServerType = MesServerType.MesSystemBaseServer;
  1232. string strOut = "";
  1233. object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
  1234. if (strOut != "")
  1235. {
  1236. MessageBox.Show("新增失败! \n" + strOut);
  1237. return;
  1238. }
  1239. else
  1240. {
  1241. if ((int)obj != 1)
  1242. {
  1243. MessageBox.Show("新增失败!");
  1244. return;
  1245. }
  1246. }
  1247. }
  1248. catch(System.Exception ex)
  1249. {
  1250. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1251. return;
  1252. }
  1253. this.GetDepartmentData();
  1254. UltraGridRow ugr = this.ultraGrid1.DisplayLayout.Bands[0].AddNew();
  1255. ugr.Cells["LOGINID"].Value = al[0];
  1256. ugr.Cells["ROLEID"].Value = al[1];
  1257. ugr.Cells["USERID"].Value = al[2];
  1258. ugr.Cells["PASSWD"].Value = al[3];
  1259. foreach (DataRow drow in _userData.Tables[0].Rows)
  1260. {
  1261. if (drow["USERID"].ToString() == al[2].ToString())
  1262. {
  1263. ugr.Cells["DEPARTMENTID"].Value = drow["DEPARTMENTID"].ToString();
  1264. ugr.Cells["WORKPOS"].Value = drow["WORKPOS"].ToString();
  1265. break;
  1266. }
  1267. }
  1268. foreach (DataRow drow in _roleData.Tables[0].Rows)
  1269. {
  1270. if (drow["ROLEID"].ToString() == al[1].ToString())
  1271. {
  1272. ugr.Cells["ROLEMEMO"].Value = drow["MEMO"].ToString();
  1273. break;
  1274. }
  1275. }
  1276. this.ultraGrid1.Update();
  1277. // }
  1278. // catch
  1279. // {}
  1280. }
  1281. private void Del()
  1282. {
  1283. int i = 0;
  1284. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  1285. if (ugr == null)
  1286. {
  1287. MessageBox.Show("请选择要删除的帐户!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1288. return;
  1289. }
  1290. GetCombo3Dept();
  1291. if (operDepart != "ROOT")
  1292. {
  1293. if (allDept.IndexOf("'" + SelComboDept + "'") < 0)
  1294. {
  1295. MessageBox.Show("你没有删除该帐户的权限,请重新选择!");
  1296. return;
  1297. }
  1298. }
  1299. if (MessageBox.Show("是否确认删除选中的帐户?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
  1300. {
  1301. return;
  1302. }
  1303. try
  1304. {
  1305. i = ugr.Index;
  1306. string strWhere = " where LOGINID = '" + ugr.Cells[0].Value.ToString() + "'";
  1307. CallingMessage par = new CallingMessage();
  1308. par.ServerName = "PurviewManager";
  1309. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  1310. par.MethodName = "DeleteUAM_AUTHORIZATION";
  1311. par.args = new object[] { strWhere };
  1312. string strOut = "";
  1313. object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
  1314. if (strOut != "")
  1315. {
  1316. MessageBox.Show("删除失败! \n" + strOut);
  1317. return;
  1318. }
  1319. else
  1320. {
  1321. if ((int)obj != 1)
  1322. {
  1323. MessageBox.Show("删除失败!");
  1324. return;
  1325. }
  1326. }
  1327. }
  1328. catch(System.Exception ex)
  1329. {
  1330. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1331. return;
  1332. }
  1333. ultraGrid1.ActiveRow.Delete(false);
  1334. ultraGrid1.UpdateData();
  1335. try
  1336. {
  1337. ultraGrid1.Rows[i].Activate();
  1338. }
  1339. catch
  1340. {
  1341. int count = ultraGrid1.Rows.Count;
  1342. if (count > 0)
  1343. ultraGrid1.Rows[count - 1].Activate();
  1344. }
  1345. }
  1346. private void Edit()
  1347. {
  1348. try
  1349. {
  1350. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  1351. if (ugr == null)
  1352. {
  1353. MessageBox.Show("请选择要修改的用户!");
  1354. return;
  1355. }
  1356. if (this.ultraTextEditor2.Text.Trim() != ugr.Cells["LOGINID"].Text.Trim())
  1357. {
  1358. MessageBox.Show("不能修改登录帐号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1359. return;
  1360. }
  1361. if (this.ultraComboEditor2.Value == null)
  1362. {
  1363. MessageBox.Show("请选择角色!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1364. return;
  1365. }
  1366. if (this.ultraComboEditor3.Value == null)
  1367. {
  1368. MessageBox.Show("请选择用户!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1369. return;
  1370. }
  1371. if (this.ultraTextEditor4.Text.Trim() == "")
  1372. {
  1373. MessageBox.Show("请输入登录密码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1374. return;
  1375. }
  1376. GetCombo3Dept();
  1377. if (allDept.IndexOf("'" + SelComboDept + "'") < 0 && operDepart != "ROOT")
  1378. {
  1379. MessageBox.Show("你没有配置这一部门用户的权限,请重新选择!");
  1380. return;
  1381. }
  1382. Roleid();
  1383. Userid();
  1384. ArrayList al = new ArrayList();
  1385. al.Add(this.ultraTextEditor2.Text.Trim());
  1386. al.Add(ultraComboEditor2.Value.ToString());
  1387. al.Add(userid.Trim());
  1388. al.Add(this.ultraTextEditor4.Text.Trim());
  1389. try
  1390. {
  1391. CallingMessage par = new CallingMessage();
  1392. par.ServerName = "PurviewManager";
  1393. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  1394. par.MethodName = "UpdateUAM_AUTHORIZATION";
  1395. par.args = new object[] { al };
  1396. string strOut = "";
  1397. object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
  1398. if (strOut != "")
  1399. {
  1400. MessageBox.Show("修改失败 \n" + strOut);
  1401. return;
  1402. }
  1403. else
  1404. {
  1405. int i = (int)obj;
  1406. if (i != 1)
  1407. {
  1408. MessageBox.Show("修改失败");
  1409. return;
  1410. }
  1411. }
  1412. }
  1413. catch(System.Exception ex)
  1414. {
  1415. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1416. return;
  1417. }
  1418. ugr.Cells["LOGINID"].Value = al[0];
  1419. ugr.Cells["ROLEID"].Value = al[1];
  1420. ugr.Cells["USERID"].Value = al[2];
  1421. ugr.Cells["PASSWD"].Value = al[3];
  1422. foreach (DataRow drow in _userData.Tables[0].Rows)
  1423. {
  1424. if (drow["USERID"].ToString() == al[2].ToString())
  1425. {
  1426. ugr.Cells["DEPARTMENTID"].Value = drow["DEPARTMENTID"].ToString();
  1427. ugr.Cells["WORKPOS"].Value = drow["WORKPOS"].ToString();
  1428. break;
  1429. }
  1430. }
  1431. foreach (DataRow drow in _roleData.Tables[0].Rows)
  1432. {
  1433. if (drow["ROLEID"].ToString() == al[1].ToString())
  1434. {
  1435. ugr.Cells["ROLEMEMO"].Value = drow["MEMO"].ToString();
  1436. break;
  1437. }
  1438. }
  1439. ultraGrid1.UpdateData();
  1440. }
  1441. catch(System.Exception ex)
  1442. {
  1443. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1444. }
  1445. }
  1446. private void Query()
  1447. {
  1448. if ((this.ultraCheckEditor1.Checked && this.ultraTextEditor1.Text != "") ||
  1449. (this.ultraCheckEditor2.Checked && this.ultraComboEditor1.Text != "") ||
  1450. (this.ultLoginID.Text.Trim().Length > 0))
  1451. {
  1452. if (this.ultraCheckEditor1.Checked && this.ultraTextEditor1.Text != "")
  1453. {
  1454. GetSelDept();
  1455. if (selDept == "ROOT")
  1456. {
  1457. if (operDepart != "ROOT")
  1458. {
  1459. MessageBox.Show("你没有查看整个公司的权限,请重新选择!");
  1460. return;
  1461. }
  1462. }
  1463. if (operDepart != "ROOT" && allDept.IndexOf("'" + selDept + "'") < 0)
  1464. {
  1465. MessageBox.Show("你没有查看这一部门的权限,请重新选择!");
  1466. return;
  1467. }
  1468. }
  1469. RefreshGrid();
  1470. this.ultraToolbarsManager1.Toolbars[0].Tools["back"].SharedProps.Visible = true;
  1471. }
  1472. else
  1473. MessageBox.Show("请选择要查询的部门、角色或帐号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1474. }
  1475. //private void RefreshData1(string str)
  1476. //{
  1477. // try
  1478. // {
  1479. // CallingMessage par = new CallingMessage();
  1480. // par.ServerName = "PurviewManager";
  1481. // par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  1482. // par.MethodName = "SelectUAM_AUTHORIZATION";
  1483. // par.args = new object[]{str};
  1484. // string strOut = "";
  1485. // _auData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  1486. // _selectAuSQL = strOut;
  1487. // }
  1488. // catch
  1489. // {
  1490. // }
  1491. // this.ultraGrid1.DataSource=_auData.Tables[0];
  1492. // ultraGrid1.UpdateData();
  1493. //}
  1494. private void RefreshGrid()
  1495. {
  1496. string str = "";
  1497. str = GetRefreshWhere();
  1498. //str = " where " + str + " order by loginID";
  1499. try
  1500. {
  1501. CallingMessage par = new CallingMessage();
  1502. par.ServerName = "PurviewManager";
  1503. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  1504. par.MethodName = "GetUAM_AUTHORIZATION";
  1505. par.args = new object[] { str };
  1506. string strOut = "";
  1507. _auData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  1508. _selectAuSQL = strOut;
  1509. }
  1510. catch(System.Exception ex)
  1511. {
  1512. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1513. }
  1514. /* try
  1515. {
  1516. this._auData.Tables[0].DefaultView.RowFilter = GetRefreshWhere();
  1517. }
  1518. catch
  1519. {
  1520. this._auData.Tables[0].DefaultView.RowFilter = "1=2";
  1521. }
  1522. */
  1523. this.ultraGrid1.DataSource = _auData.Tables[0];
  1524. ultraGrid1.UpdateData();
  1525. }
  1526. private string GetRefreshWhere()
  1527. {
  1528. string sqlstr = "";
  1529. if (this.ultraTextEditor1.Enabled && this.ultraCheckEditor1.Checked && this.ultraTextEditor1.Text != "" && ultraTextEditor1.Tag.ToString().Length>0)
  1530. {
  1531. sqlstr += "AND B.DEPARTMENTID IN (" + this.ultraTextEditor1.Tag + ")";
  1532. //ArrayList al = this.GetUserID();
  1533. //if (al == null || al.Count == 0)
  1534. //{
  1535. // sqlstr = "1=2";
  1536. //}
  1537. //else
  1538. //{
  1539. // sqlstr += " USERID in ('" + al[0].ToString() + "'";
  1540. // for (int i = 1; i < al.Count; i++)
  1541. // {
  1542. // sqlstr += ", '" + al[i].ToString() + "' ";
  1543. // }
  1544. // sqlstr += ")";
  1545. //}
  1546. }
  1547. if (this.ultraComboEditor1.Enabled && this.ultraCheckEditor2.Checked && this.ultraComboEditor1.Text != "")
  1548. {
  1549. sqlstr += " AND A.ROLEID = '" + this.ultraComboEditor1.Value.ToString() + "'";
  1550. }
  1551. if (this.ultLoginID.Text.Trim().Length > 0)
  1552. {
  1553. sqlstr += " AND A.LOGINID = '" + this.ultLoginID.Text.Trim() + "'";
  1554. }
  1555. return sqlstr;
  1556. }
  1557. private void roling_c1()
  1558. {
  1559. if (_roleData != null && _roleData.Tables.Count > 0)
  1560. {
  1561. for (int i = 0; i < _roleData.Tables[0].Rows.Count; i++)
  1562. {
  1563. if (_roleData.Tables[0].Rows[i]["ROLENAME"].ToString() == this.ultraComboEditor1.Value.ToString())
  1564. {
  1565. this.ultraComboEditor1.Value = (_roleData).Tables[0].Rows[i]["ROLEID"];
  1566. return;
  1567. }
  1568. }
  1569. }
  1570. }
  1571. private ArrayList GetUserID()
  1572. {
  1573. ArrayList al = new ArrayList();
  1574. DataTable dt = null;
  1575. if (this._userData == null && this.GetUserData() == null)
  1576. dt = null;
  1577. else
  1578. dt = this._userData.Tables[0];
  1579. if (dt != null)
  1580. {
  1581. if (this.ultraTextEditor1.Enabled && this.ultraTextEditor1.Tag != null)
  1582. {
  1583. string partid = this.ultraTextEditor1.Tag.ToString();
  1584. string strFilter = "DEPARTMENTID in (" + partid + ")";
  1585. dt.DefaultView.RowFilter = strFilter;
  1586. }
  1587. for (int i = 0; i < dt.DefaultView.Count; i++)
  1588. {
  1589. al.Add(dt.DefaultView[i]["USERID"].ToString());
  1590. }
  1591. return al;
  1592. }
  1593. else
  1594. return null;
  1595. }
  1596. #endregion
  1597. private bool CheckRoleID()
  1598. {
  1599. try
  1600. {
  1601. string userid = Core.Mes.ClientFrameWork.ClientCommon._UserInfo.LoginID;
  1602. DataRow[] drs = this._auData.Tables[0].Select("LOGINID = '" + userid + "'");
  1603. if (drs.Length > 0)
  1604. {
  1605. if (drs[0]["ROLEID"].ToString() == "001")
  1606. {
  1607. return true;
  1608. }
  1609. }
  1610. }
  1611. catch(System.Exception ex)
  1612. {
  1613. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1614. }
  1615. return false;
  1616. }
  1617. private Point GetChildWindowLocation(Size ChildWindowSize)
  1618. {
  1619. int width = Cursor.Position.X + ChildWindowSize.Width - Screen.PrimaryScreen.Bounds.Width;
  1620. int height = Cursor.Position.Y + ChildWindowSize.Height - Screen.PrimaryScreen.Bounds.Height + 30;
  1621. if (width > 0)
  1622. width = Cursor.Position.X - width;
  1623. else
  1624. width = Cursor.Position.X;
  1625. if (height > 0)
  1626. height = Cursor.Position.Y - height + 10;
  1627. else
  1628. height = Cursor.Position.Y + 10;
  1629. return new Point(width, height);
  1630. }
  1631. private void ultraComboEditor3_EditorButtonClick_1(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  1632. {
  1633. FrmSelUserID frm = new FrmSelUserID();
  1634. frm._departmentData = this._departmentData;
  1635. frm._userData = this._userData;
  1636. frm.Location = this.GetChildWindowLocation(frm.Size);
  1637. frm.ShowDialog();
  1638. if (frm._changFlag)
  1639. {
  1640. this.ultraComboEditor3.Value = frm._currSelectID;
  1641. }
  1642. // if (_userData != null && _userData.Tables.Count > 0)
  1643. // {
  1644. // DataTable dt = this._userData.Tables[0].Copy();
  1645. //
  1646. // foreach (DataRow dr in dt.Rows)
  1647. // {
  1648. // if(dr["NAME"].ToString ()==this.ultraComboEditor3.Text .ToString ())
  1649. // {
  1650. // SelComboDept=dr["DEPARTMENTID"];
  1651. // }
  1652. // }
  1653. // }
  1654. GetCombo3Dept();
  1655. if (operDepart != "ROOT")
  1656. {
  1657. if (allDept.IndexOf("'" + SelComboDept + "'") < 0)
  1658. {
  1659. this.ultraComboEditor3.Text = "";
  1660. MessageBox.Show("你没有配置该用户的权限,请重新选择!");
  1661. return;
  1662. }
  1663. }
  1664. }
  1665. private void ultraTextEditor1_EditorButtonClick_1(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  1666. {
  1667. FrmSetDepart frm = new FrmSetDepart();
  1668. frm.Location = GetChildWindowLocation(frm.Size);
  1669. frm.ShowDialog();
  1670. if (frm.SelectedID != "" && frm.SelectedName != "")
  1671. {
  1672. this.ultraTextEditor1.Text = frm.SelectedName;
  1673. this.ultraTextEditor1.Tag = frm.SelectedID;
  1674. if (this.ultraTextEditor1.Text != "" && this.ultraCheckEditor1.Checked)
  1675. {
  1676. GetSelDept();
  1677. if (operDepart != "ROOT" && allDept.IndexOf("'" + selDept + "'") < 0)
  1678. {
  1679. MessageBox.Show("你没有查看这一部门的权限,请重新选择!");
  1680. }
  1681. }
  1682. }
  1683. }
  1684. private void ultraButton1_Click(object sender, System.EventArgs e)
  1685. {
  1686. foreach (Form mdiChild in this.MdiParent.MdiChildren)
  1687. {
  1688. if (mdiChild.Text == "部门维护")
  1689. {
  1690. mdiChild.Activate();
  1691. return;
  1692. }
  1693. }
  1694. FrmDepartment frmpart = new FrmDepartment();
  1695. //frmpart.Location = GetChildWindowLocation(frmpart.Size);
  1696. frmpart.MdiParent = this.ParentForm;
  1697. frmpart.Show();
  1698. }
  1699. private void ultraButton2_Click(object sender, System.EventArgs e)
  1700. {
  1701. FrmRole frmRole = new FrmRole();
  1702. frmRole._roleData = this._roleData;
  1703. frmRole._selectSQL = this._selectRoleSQL;
  1704. frmRole.IsAdminFlag = IsAdminFlag;
  1705. //frmRole.ShowDialog(this);
  1706. frmRole.Location = GetChildWindowLocation(frmRole.Size);
  1707. frmRole.ShowDialog(this);
  1708. GetFitRole();
  1709. InitCombo();
  1710. //this._roleData = frmRole._roleData ;
  1711. //this.InitRoleCombo();
  1712. }
  1713. private void ultraCheckEditor1_CheckedChanged(object sender, System.EventArgs e)
  1714. {
  1715. ultraTextEditor1.Enabled = ultraCheckEditor1.Checked;
  1716. }
  1717. private void ultraCheckEditor2_CheckedChanged(object sender, System.EventArgs e)
  1718. {
  1719. ultraComboEditor1.Enabled = ultraCheckEditor2.Checked;
  1720. }
  1721. private void GetChildDept()
  1722. {
  1723. try
  1724. {
  1725. string strOut = "";
  1726. DataSet ds = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("PurviewManager", "Core.Mes.PurviewManager.UAM_USER", "SelectChildDept", new object[] { operDepart }, out strOut) as DataSet;
  1727. if (ds.Tables[0].Rows[0][0].ToString() != "")
  1728. {
  1729. allDept = "'" + ds.Tables[0].Rows[0][0].ToString() + "'" + operDepart + "'";
  1730. }
  1731. else
  1732. allDept = "'" + operDepart + "'";
  1733. }
  1734. catch(System.Exception ex)
  1735. {
  1736. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1737. }
  1738. }
  1739. private void GetSelDept()
  1740. {
  1741. try
  1742. {
  1743. if (this.ultraTextEditor1.Text != "" && ultraCheckEditor1.Checked)
  1744. {
  1745. DataTable dt = this._departmentData.Tables[0].Copy();
  1746. foreach (DataRow dr in dt.Rows)
  1747. {
  1748. if (dr["DEPARTMENTNAME"].ToString() == this.ultraTextEditor1.Text)
  1749. {
  1750. selDept = dr["DEPARTMENTID"].ToString();
  1751. return;
  1752. }
  1753. }
  1754. }
  1755. }
  1756. catch(System.Exception ex)
  1757. {
  1758. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1759. }
  1760. }
  1761. private void ultraComboEditor3_SelectionChanged(object sender, System.EventArgs e)
  1762. {
  1763. GetCombo3Dept();
  1764. if (operDepart != "ROOT")
  1765. {
  1766. if (allDept.IndexOf("'" + SelComboDept + "'") < 0)
  1767. {
  1768. this.ultraComboEditor3.Text = "";
  1769. MessageBox.Show("你没有配置该用户的权限,请重新选择!");
  1770. return;
  1771. }
  1772. }
  1773. }
  1774. private void ultLoginID_EditorButtonClick(object sender, EditorButtonEventArgs e)
  1775. {
  1776. try
  1777. {
  1778. if (e.Button.Key == "SET")
  1779. {
  1780. if (ultLoginID.Text.Trim().Length > 0)
  1781. {
  1782. ultLoginID.Tag = ultLoginID.Text.Trim();
  1783. ultLoginID.Text = "";
  1784. }
  1785. else
  1786. {
  1787. if (ultLoginID.Tag != null)
  1788. ultLoginID.Text = ultLoginID.Tag.ToString();
  1789. }
  1790. }
  1791. }
  1792. catch(System.Exception ex)
  1793. {
  1794. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1795. }
  1796. }
  1797. }
  1798. }