FrmUserManager.cs 85 KB

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