2837b27652cfdc1ed916c108cbd61f0b7e8de940.svn-base 83 KB

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