3a18b21c56a27eecd0a9590a199f17347bb1e42c.svn-base 75 KB

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