| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774 |
- using System;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- using Core.Mes.ClientFrameWork;
- using Core.Mes.IBaseInterface;
- using global::Infragistics.Win.UltraWinGrid;
- using global::Infragistics.Win.UltraWinEditors;
- using System.Data;
- using System.Diagnostics;
- using System.IO;
- using System.Text.RegularExpressions;
- namespace Core.Mes.ClientPurviewManager
- {
- /// <summary>
- /// FrmUserManager 的摘要说明。
- /// </summary>
- public class FrmUserManager : Core.Mes.ClientFrameWork.FrmBase
- {
- #region "Varible"
- private System.Windows.Forms.Panel panel1;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ultraToolbarsManager1;
- private System.Windows.Forms.Panel FrmUserManager_Fill_Panel;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Left;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Right;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Top;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Bottom;
- private System.Windows.Forms.Panel panel2;
- private Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid1;
- private Infragistics.Win.Misc.UltraExpandableGroupBox ultraExpandableGroupBox1;
- private Infragistics.Win.Misc.UltraExpandableGroupBoxPanel ultraExpandableGroupBoxPanel1;
- private System.Windows.Forms.Panel panel3;
- private Infragistics.Win.Misc.UltraLabel ultraLabel2;
- private Infragistics.Win.Misc.UltraLabel ultraLabel3;
- private Infragistics.Win.Misc.UltraLabel ultraLabel4;
- private Infragistics.Win.Misc.UltraLabel ultraLabel5;
- private Infragistics.Win.Misc.UltraLabel ultraLabel6;
- private Infragistics.Win.Misc.UltraLabel ultraLabel7;
- private Infragistics.Win.Misc.UltraLabel ultraLabel8;
- private Infragistics.Win.Misc.UltraLabel ultraLabel9;
- private Infragistics.Win.Misc.UltraLabel ultraLabel10;
- private Infragistics.Win.Misc.UltraLabel ultraLabel11;
- private Infragistics.Win.UltraWinEditors.UltraComboEditor ulcmeSex;
- private Infragistics.Win.UltraWinEditors.UltraTextEditor ultxtUserNo;
- private Infragistics.Win.UltraWinEditors.UltraTextEditor ultxtUserName;
- private Infragistics.Win.UltraWinEditors.UltraTextEditor ultxtAge;
- private Infragistics.Win.UltraWinEditors.UltraTextEditor ultxtGW;
- private Infragistics.Win.UltraWinEditors.UltraTextEditor ultxtZW;
- private Infragistics.Win.UltraWinEditors.UltraTextEditor ultxtPhono;
- private Infragistics.Win.UltraWinEditors.UltraTextEditor ultxtMemo;
- private Infragistics.Win.Misc.UltraButton ultraButton1;
- private System.ComponentModel.IContainer components;
- private DataSet _departmentData;
- public TreeView _departmentTree;
- private string _selectPartSQL;
- public string StrUser = "";
- public string operDepart = "";
- public string operDepartname = "";
- public string allDept = "";
- public string selDept = "";
- private DataSet _userData;
- private Infragistics.Win.UltraWinEditors.UltraComboEditor ulcmeDepartment;
- private System.Windows.Forms.ToolTip toolTip1;
- private Infragistics.Win.UltraWinEditors.UltraCheckEditor ultraCheckEditor1;
- private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor8;
- private Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter ultraGridExcelExporter1;
- private UltraTextEditor ultxtEmail;
- private Infragistics.Win.Misc.UltraLabel ultraLabel1;
- private UltraTextEditor ultLoginID;
- private Infragistics.Win.Misc.UltraLabel ultraLabel12;
- private FlowLayoutPanel flowLayoutPanel1;
- private string _selectUserSQL;
- #endregion
- #region "头部"
- public FrmUserManager()
- {
- //
- // Windows 窗体设计器支持所必需的
- //
- InitializeComponent();
- //
- // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
- //
- }
- /// <summary>
- /// 清理所有正在使用的资源。
- /// </summary>
- protected override void Dispose(bool disposing)
- {
- if (disposing)
- {
- if (components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose(disposing);
- }
- #endregion
- #region Windows 窗体设计器生成的代码
- /// <summary>
- /// 设计器支持所需的方法 - 不要使用代码编辑器修改
- /// 此方法的内容。
- /// </summary>
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("Toolbar1");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool1 = new Infragistics.Win.UltraWinToolbars.ButtonTool("query");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool2 = new Infragistics.Win.UltraWinToolbars.ButtonTool("add");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("edit");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("del");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool5 = new Infragistics.Win.UltraWinToolbars.ButtonTool("exit");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("back");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("leadin");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool8 = new Infragistics.Win.UltraWinToolbars.ButtonTool("add");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool9 = new Infragistics.Win.UltraWinToolbars.ButtonTool("edit");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("del");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool11 = new Infragistics.Win.UltraWinToolbars.ButtonTool("query");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool12 = new Infragistics.Win.UltraWinToolbars.ButtonTool("exit");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool13 = new Infragistics.Win.UltraWinToolbars.ButtonTool("back");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool14 = new Infragistics.Win.UltraWinToolbars.ButtonTool("leadin");
- Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand1 = new Infragistics.Win.UltraWinGrid.UltraGridBand("Band 0", -1);
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn1 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("USERID");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn2 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("DEPARTMENTID", -1, null, 1, Infragistics.Win.UltraWinGrid.SortIndicator.Ascending, false);
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn3 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("NAME");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn4 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("SEX");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn5 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("AGE");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn6 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("COMPUTERIP");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn7 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("HOMEPHONE");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn8 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("WORKPOS");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn9 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("WORKJOB");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn10 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("MEMO");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn11 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("EMAIL");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn12 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("PD", -1, null, 0, Infragistics.Win.UltraWinGrid.SortIndicator.Ascending, false);
- Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
- Infragistics.Win.ValueListItem valueListItem1 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem2 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem3 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.ValueListItem valueListItem4 = new Infragistics.Win.ValueListItem();
- Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance();
- this.panel1 = new System.Windows.Forms.Panel();
- this._panel1_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
- this.ultraToolbarsManager1 = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
- this._panel1_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
- this._panel1_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
- this._panel1_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
- this.FrmUserManager_Fill_Panel = new System.Windows.Forms.Panel();
- this.ultraGrid1 = new Infragistics.Win.UltraWinGrid.UltraGrid();
- this.ultraExpandableGroupBox1 = new Infragistics.Win.Misc.UltraExpandableGroupBox();
- this.ultraExpandableGroupBoxPanel1 = new Infragistics.Win.Misc.UltraExpandableGroupBoxPanel();
- this.panel3 = new System.Windows.Forms.Panel();
- this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
- this.ultxtEmail = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- this.ultraLabel1 = new Infragistics.Win.Misc.UltraLabel();
- this.ulcmeDepartment = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
- this.ultxtMemo = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- this.ultxtPhono = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- this.ultxtZW = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- this.ultxtGW = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- this.ultxtAge = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- this.ultxtUserName = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- this.ultxtUserNo = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- this.ulcmeSex = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
- this.ultraLabel11 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraLabel10 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraLabel9 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraLabel8 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraLabel7 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraLabel6 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraLabel5 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraLabel4 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraLabel3 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraLabel2 = new Infragistics.Win.Misc.UltraLabel();
- this.panel2 = new System.Windows.Forms.Panel();
- this.ultLoginID = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- this.ultraLabel12 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraTextEditor8 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- this.ultraCheckEditor1 = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
- this.ultraButton1 = new Infragistics.Win.Misc.UltraButton();
- this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
- this.ultraGridExcelExporter1 = new Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter();
- this.panel1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).BeginInit();
- this.FrmUserManager_Fill_Panel.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).BeginInit();
- this.ultraExpandableGroupBox1.SuspendLayout();
- this.ultraExpandableGroupBoxPanel1.SuspendLayout();
- this.panel3.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.ultxtEmail)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ulcmeDepartment)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultxtMemo)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultxtPhono)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultxtZW)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultxtGW)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultxtAge)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultxtUserName)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultxtUserNo)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ulcmeSex)).BeginInit();
- this.panel2.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.ultLoginID)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor8)).BeginInit();
- this.SuspendLayout();
- //
- // panel1
- //
- this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Left);
- this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Right);
- this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Top);
- this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Bottom);
- this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
- this.panel1.Location = new System.Drawing.Point(0, 0);
- this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(1012, 32);
- this.panel1.TabIndex = 0;
- //
- // _panel1_Toolbars_Dock_Area_Left
- //
- this._panel1_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
- this._panel1_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control;
- this._panel1_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
- this._panel1_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
- this._panel1_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 27);
- this._panel1_Toolbars_Dock_Area_Left.Name = "_panel1_Toolbars_Dock_Area_Left";
- this._panel1_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 5);
- this._panel1_Toolbars_Dock_Area_Left.ToolbarsManager = this.ultraToolbarsManager1;
- //
- // ultraToolbarsManager1
- //
- this.ultraToolbarsManager1.DesignerFlags = 1;
- this.ultraToolbarsManager1.DockWithinContainer = this.panel1;
- this.ultraToolbarsManager1.ShowQuickCustomizeButton = false;
- this.ultraToolbarsManager1.Style = Infragistics.Win.UltraWinToolbars.ToolbarStyle.VisualStudio2005;
- ultraToolbar1.DockedColumn = 0;
- ultraToolbar1.DockedRow = 0;
- ultraToolbar1.Text = "Toolbar1";
- buttonTool1.InstanceProps.IsFirstInGroup = true;
- buttonTool2.InstanceProps.IsFirstInGroup = true;
- buttonTool3.InstanceProps.IsFirstInGroup = true;
- buttonTool4.InstanceProps.IsFirstInGroup = true;
- buttonTool5.InstanceProps.IsFirstInGroup = true;
- buttonTool6.InstanceProps.IsFirstInGroup = true;
- buttonTool7.InstanceProps.IsFirstInGroup = true;
- ultraToolbar1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
- buttonTool1,
- buttonTool2,
- buttonTool3,
- buttonTool4,
- buttonTool5,
- buttonTool6,
- buttonTool7});
- this.ultraToolbarsManager1.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
- ultraToolbar1});
- buttonTool8.SharedProps.Caption = "新增(&A)";
- buttonTool8.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool8.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlA;
- buttonTool9.SharedProps.Caption = "修改(&U)";
- buttonTool9.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool9.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlU;
- buttonTool10.SharedProps.Caption = "删除(&D)";
- buttonTool10.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool10.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlD;
- buttonTool11.SharedProps.Caption = "查询(&Q)";
- buttonTool11.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool11.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlQ;
- buttonTool12.SharedProps.Caption = "关闭(&E)";
- buttonTool12.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool12.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlE;
- buttonTool13.SharedProps.Caption = "返回(&B)";
- buttonTool13.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool13.SharedProps.Visible = false;
- buttonTool14.SharedProps.Caption = "导入EXCEL";
- buttonTool14.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- this.ultraToolbarsManager1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
- buttonTool8,
- buttonTool9,
- buttonTool10,
- buttonTool11,
- buttonTool12,
- buttonTool13,
- buttonTool14});
- this.ultraToolbarsManager1.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.ultraToolbarsManager1_ToolClick);
- //
- // _panel1_Toolbars_Dock_Area_Right
- //
- this._panel1_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
- this._panel1_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control;
- this._panel1_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
- this._panel1_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
- this._panel1_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(1012, 27);
- this._panel1_Toolbars_Dock_Area_Right.Name = "_panel1_Toolbars_Dock_Area_Right";
- this._panel1_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 5);
- this._panel1_Toolbars_Dock_Area_Right.ToolbarsManager = this.ultraToolbarsManager1;
- //
- // _panel1_Toolbars_Dock_Area_Top
- //
- this._panel1_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
- this._panel1_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control;
- this._panel1_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
- this._panel1_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
- this._panel1_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
- this._panel1_Toolbars_Dock_Area_Top.Name = "_panel1_Toolbars_Dock_Area_Top";
- this._panel1_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(1012, 27);
- this._panel1_Toolbars_Dock_Area_Top.ToolbarsManager = this.ultraToolbarsManager1;
- //
- // _panel1_Toolbars_Dock_Area_Bottom
- //
- this._panel1_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
- this._panel1_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control;
- this._panel1_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
- this._panel1_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
- this._panel1_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 32);
- this._panel1_Toolbars_Dock_Area_Bottom.Name = "_panel1_Toolbars_Dock_Area_Bottom";
- this._panel1_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(1012, 0);
- this._panel1_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.ultraToolbarsManager1;
- //
- // FrmUserManager_Fill_Panel
- //
- this.FrmUserManager_Fill_Panel.Controls.Add(this.ultraGrid1);
- this.FrmUserManager_Fill_Panel.Controls.Add(this.ultraExpandableGroupBox1);
- this.FrmUserManager_Fill_Panel.Controls.Add(this.panel2);
- this.FrmUserManager_Fill_Panel.Controls.Add(this.panel1);
- this.FrmUserManager_Fill_Panel.Cursor = System.Windows.Forms.Cursors.Default;
- this.FrmUserManager_Fill_Panel.Dock = System.Windows.Forms.DockStyle.Fill;
- this.FrmUserManager_Fill_Panel.Location = new System.Drawing.Point(0, 0);
- this.FrmUserManager_Fill_Panel.Name = "FrmUserManager_Fill_Panel";
- this.FrmUserManager_Fill_Panel.Size = new System.Drawing.Size(1012, 733);
- this.FrmUserManager_Fill_Panel.TabIndex = 0;
- //
- // ultraGrid1
- //
- this.ultraGrid1.Cursor = System.Windows.Forms.Cursors.Hand;
- ultraGridColumn1.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn1.Header.Caption = "员工编号";
- ultraGridColumn1.Header.VisiblePosition = 0;
- ultraGridColumn1.Width = 80;
- ultraGridColumn2.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn2.Header.Caption = "部门";
- ultraGridColumn2.Header.VisiblePosition = 2;
- ultraGridColumn2.Width = 100;
- ultraGridColumn3.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn3.Header.Caption = "姓名";
- ultraGridColumn3.Header.VisiblePosition = 5;
- ultraGridColumn3.Width = 80;
- ultraGridColumn4.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn4.Header.Caption = "性别";
- ultraGridColumn4.Header.VisiblePosition = 6;
- ultraGridColumn4.Width = 60;
- ultraGridColumn5.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn5.Header.Caption = "年龄";
- ultraGridColumn5.Header.VisiblePosition = 7;
- ultraGridColumn5.Hidden = true;
- ultraGridColumn6.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn6.Header.Caption = "机器地址";
- ultraGridColumn6.Header.VisiblePosition = 8;
- ultraGridColumn6.Width = 80;
- ultraGridColumn7.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn7.Header.Caption = "联系电话";
- ultraGridColumn7.Header.VisiblePosition = 9;
- ultraGridColumn7.Width = 100;
- ultraGridColumn8.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn8.Header.Caption = "岗位";
- ultraGridColumn8.Header.VisiblePosition = 3;
- ultraGridColumn8.Width = 100;
- ultraGridColumn9.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn9.Header.Caption = "职务";
- ultraGridColumn9.Header.VisiblePosition = 4;
- ultraGridColumn9.Width = 100;
- ultraGridColumn10.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn10.Header.Caption = "备注";
- ultraGridColumn10.Header.VisiblePosition = 11;
- ultraGridColumn10.Width = 100;
- ultraGridColumn11.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn11.Header.Caption = "邮件地址";
- ultraGridColumn11.Header.VisiblePosition = 10;
- ultraGridColumn11.Width = 100;
- ultraGridColumn12.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn12.Header.Caption = "上级部门";
- ultraGridColumn12.Header.VisiblePosition = 1;
- ultraGridColumn12.Width = 100;
- ultraGridBand1.Columns.AddRange(new object[] {
- ultraGridColumn1,
- ultraGridColumn2,
- ultraGridColumn3,
- ultraGridColumn4,
- ultraGridColumn5,
- ultraGridColumn6,
- ultraGridColumn7,
- ultraGridColumn8,
- ultraGridColumn9,
- ultraGridColumn10,
- ultraGridColumn11,
- ultraGridColumn12});
- ultraGridBand1.Override.RowSelectorHeaderStyle = Infragistics.Win.UltraWinGrid.RowSelectorHeaderStyle.SeparateElement;
- ultraGridBand1.Override.RowSelectorNumberStyle = Infragistics.Win.UltraWinGrid.RowSelectorNumberStyle.RowIndex;
- ultraGridBand1.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.True;
- this.ultraGrid1.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
- this.ultraGrid1.DisplayLayout.BorderStyle = Infragistics.Win.UIElementBorderStyle.RaisedSoft;
- this.ultraGrid1.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.False;
- this.ultraGrid1.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- this.ultraGrid1.DisplayLayout.GroupByBox.Hidden = true;
- this.ultraGrid1.DisplayLayout.MaxColScrollRegions = 1;
- this.ultraGrid1.DisplayLayout.MaxRowScrollRegions = 1;
- this.ultraGrid1.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.RaisedSoft;
- this.ultraGrid1.DisplayLayout.Override.BorderStyleRow = Infragistics.Win.UIElementBorderStyle.Dotted;
- this.ultraGrid1.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText;
- this.ultraGrid1.DisplayLayout.Override.CellPadding = 0;
- this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti;
- this.ultraGrid1.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.Standard;
- this.ultraGrid1.DisplayLayout.Override.MinRowHeight = 21;
- this.ultraGrid1.DisplayLayout.Override.RowSelectorHeaderStyle = Infragistics.Win.UltraWinGrid.RowSelectorHeaderStyle.SeparateElement;
- this.ultraGrid1.DisplayLayout.Override.RowSelectorNumberStyle = Infragistics.Win.UltraWinGrid.RowSelectorNumberStyle.RowIndex;
- this.ultraGrid1.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.True;
- this.ultraGrid1.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
- this.ultraGrid1.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate;
- this.ultraGrid1.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy;
- this.ultraGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ultraGrid1.Location = new System.Drawing.Point(0, 88);
- this.ultraGrid1.Name = "ultraGrid1";
- this.ultraGrid1.Size = new System.Drawing.Size(1012, 477);
- this.ultraGrid1.TabIndex = 2;
- this.ultraGrid1.Text = "ultraGrid1";
- //
- // ultraExpandableGroupBox1
- //
- this.ultraExpandableGroupBox1.Controls.Add(this.ultraExpandableGroupBoxPanel1);
- this.ultraExpandableGroupBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.ultraExpandableGroupBox1.ExpandedSize = new System.Drawing.Size(1012, 168);
- this.ultraExpandableGroupBox1.Location = new System.Drawing.Point(0, 565);
- this.ultraExpandableGroupBox1.Name = "ultraExpandableGroupBox1";
- this.ultraExpandableGroupBox1.Size = new System.Drawing.Size(1012, 168);
- this.ultraExpandableGroupBox1.SupportThemes = false;
- this.ultraExpandableGroupBox1.TabIndex = 3;
- this.ultraExpandableGroupBox1.Text = "编辑区域";
- this.ultraExpandableGroupBox1.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003;
- //
- // ultraExpandableGroupBoxPanel1
- //
- this.ultraExpandableGroupBoxPanel1.Controls.Add(this.panel3);
- this.ultraExpandableGroupBoxPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
- this.ultraExpandableGroupBoxPanel1.Location = new System.Drawing.Point(2, 22);
- this.ultraExpandableGroupBoxPanel1.Name = "ultraExpandableGroupBoxPanel1";
- this.ultraExpandableGroupBoxPanel1.Size = new System.Drawing.Size(1008, 144);
- this.ultraExpandableGroupBoxPanel1.TabIndex = 0;
- //
- // panel3
- //
- this.panel3.BackColor = System.Drawing.Color.Gainsboro;
- this.panel3.Controls.Add(this.flowLayoutPanel1);
- this.panel3.Controls.Add(this.ultxtEmail);
- this.panel3.Controls.Add(this.ultraLabel1);
- this.panel3.Controls.Add(this.ulcmeDepartment);
- this.panel3.Controls.Add(this.ultxtMemo);
- this.panel3.Controls.Add(this.ultxtPhono);
- this.panel3.Controls.Add(this.ultxtZW);
- this.panel3.Controls.Add(this.ultxtGW);
- this.panel3.Controls.Add(this.ultxtAge);
- this.panel3.Controls.Add(this.ultxtUserName);
- this.panel3.Controls.Add(this.ultxtUserNo);
- this.panel3.Controls.Add(this.ulcmeSex);
- this.panel3.Controls.Add(this.ultraLabel11);
- this.panel3.Controls.Add(this.ultraLabel10);
- this.panel3.Controls.Add(this.ultraLabel9);
- this.panel3.Controls.Add(this.ultraLabel8);
- this.panel3.Controls.Add(this.ultraLabel7);
- this.panel3.Controls.Add(this.ultraLabel6);
- this.panel3.Controls.Add(this.ultraLabel5);
- this.panel3.Controls.Add(this.ultraLabel4);
- this.panel3.Controls.Add(this.ultraLabel3);
- this.panel3.Controls.Add(this.ultraLabel2);
- this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.panel3.Location = new System.Drawing.Point(0, -8);
- this.panel3.Name = "panel3";
- this.panel3.Size = new System.Drawing.Size(1008, 152);
- this.panel3.TabIndex = 0;
- //
- // flowLayoutPanel1
- //
- this.flowLayoutPanel1.AutoScroll = true;
- this.flowLayoutPanel1.Location = new System.Drawing.Point(806, 19);
- this.flowLayoutPanel1.Name = "flowLayoutPanel1";
- this.flowLayoutPanel1.Size = new System.Drawing.Size(171, 123);
- this.flowLayoutPanel1.TabIndex = 24;
- //
- // ultxtEmail
- //
- appearance1.BackColor = System.Drawing.Color.LightCyan;
- this.ultxtEmail.Appearance = appearance1;
- this.ultxtEmail.AutoSize = true;
- this.ultxtEmail.BackColor = System.Drawing.Color.LightCyan;
- this.ultxtEmail.Location = new System.Drawing.Point(560, 85);
- this.ultxtEmail.Name = "ultxtEmail";
- this.ultxtEmail.Size = new System.Drawing.Size(160, 21);
- this.ultxtEmail.TabIndex = 23;
- //
- // ultraLabel1
- //
- this.ultraLabel1.Location = new System.Drawing.Point(503, 86);
- this.ultraLabel1.Name = "ultraLabel1";
- this.ultraLabel1.Size = new System.Drawing.Size(54, 16);
- this.ultraLabel1.TabIndex = 22;
- this.ultraLabel1.Text = "邮件地址";
- //
- // ulcmeDepartment
- //
- this.ulcmeDepartment.AutoSize = true;
- this.ulcmeDepartment.DropDownButtonDisplayStyle = Infragistics.Win.ButtonDisplayStyle.Never;
- this.ulcmeDepartment.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
- this.ulcmeDepartment.Location = new System.Drawing.Point(560, 17);
- this.ulcmeDepartment.Name = "ulcmeDepartment";
- this.ulcmeDepartment.Size = new System.Drawing.Size(160, 21);
- this.ulcmeDepartment.TabIndex = 21;
- this.ulcmeDepartment.SelectionChanged += new System.EventHandler(this.ultraComboEditor2_SelectionChanged);
- this.ulcmeDepartment.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.ultraComboEditor2_EditorButtonClick);
- //
- // ultxtMemo
- //
- appearance2.BackColor = System.Drawing.Color.LightCyan;
- this.ultxtMemo.Appearance = appearance2;
- this.ultxtMemo.AutoSize = true;
- this.ultxtMemo.BackColor = System.Drawing.Color.LightCyan;
- this.ultxtMemo.Location = new System.Drawing.Point(81, 119);
- this.ultxtMemo.Name = "ultxtMemo";
- this.ultxtMemo.Size = new System.Drawing.Size(640, 21);
- this.ultxtMemo.TabIndex = 19;
- //
- // ultxtPhono
- //
- appearance3.BackColor = System.Drawing.Color.LightCyan;
- this.ultxtPhono.Appearance = appearance3;
- this.ultxtPhono.AutoSize = true;
- this.ultxtPhono.BackColor = System.Drawing.Color.LightCyan;
- this.ultxtPhono.Location = new System.Drawing.Point(560, 51);
- this.ultxtPhono.Name = "ultxtPhono";
- this.ultxtPhono.Size = new System.Drawing.Size(160, 21);
- this.ultxtPhono.TabIndex = 18;
- //
- // ultxtZW
- //
- appearance4.BackColor = System.Drawing.Color.LightCyan;
- this.ultxtZW.Appearance = appearance4;
- this.ultxtZW.AutoSize = true;
- this.ultxtZW.BackColor = System.Drawing.Color.LightCyan;
- this.ultxtZW.Location = new System.Drawing.Point(313, 51);
- this.ultxtZW.Name = "ultxtZW";
- this.ultxtZW.Size = new System.Drawing.Size(136, 21);
- this.ultxtZW.TabIndex = 17;
- //
- // ultxtGW
- //
- appearance5.BackColor = System.Drawing.Color.LightCyan;
- this.ultxtGW.Appearance = appearance5;
- this.ultxtGW.AutoSize = true;
- this.ultxtGW.BackColor = System.Drawing.Color.LightCyan;
- this.ultxtGW.Location = new System.Drawing.Point(81, 51);
- this.ultxtGW.Name = "ultxtGW";
- this.ultxtGW.Size = new System.Drawing.Size(136, 21);
- this.ultxtGW.TabIndex = 16;
- //
- // ultxtAge
- //
- appearance6.BackColor = System.Drawing.Color.LightCyan;
- this.ultxtAge.Appearance = appearance6;
- this.ultxtAge.AutoSize = true;
- this.ultxtAge.BackColor = System.Drawing.Color.LightCyan;
- this.ultxtAge.Location = new System.Drawing.Point(313, 81);
- this.ultxtAge.Name = "ultxtAge";
- this.ultxtAge.Size = new System.Drawing.Size(136, 21);
- this.ultxtAge.TabIndex = 15;
- this.ultxtAge.Visible = false;
- //
- // ultxtUserName
- //
- appearance7.BackColor = System.Drawing.Color.LightCyan;
- this.ultxtUserName.Appearance = appearance7;
- this.ultxtUserName.AutoSize = true;
- this.ultxtUserName.BackColor = System.Drawing.Color.LightCyan;
- this.ultxtUserName.Location = new System.Drawing.Point(313, 17);
- this.ultxtUserName.Name = "ultxtUserName";
- this.ultxtUserName.Size = new System.Drawing.Size(136, 21);
- this.ultxtUserName.TabIndex = 14;
- //
- // ultxtUserNo
- //
- appearance8.BackColor = System.Drawing.Color.LavenderBlush;
- this.ultxtUserNo.Appearance = appearance8;
- this.ultxtUserNo.AutoSize = true;
- this.ultxtUserNo.BackColor = System.Drawing.Color.LavenderBlush;
- this.ultxtUserNo.Location = new System.Drawing.Point(81, 17);
- this.ultxtUserNo.Name = "ultxtUserNo";
- this.ultxtUserNo.Size = new System.Drawing.Size(136, 21);
- this.ultxtUserNo.TabIndex = 13;
- //
- // ulcmeSex
- //
- this.ulcmeSex.AutoSize = true;
- this.ulcmeSex.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
- valueListItem2.DataValue = "男";
- valueListItem2.DisplayText = "男";
- valueListItem1.DataValue = valueListItem2;
- valueListItem1.DisplayText = "男";
- valueListItem4.DataValue = "女";
- valueListItem4.DisplayText = "女";
- valueListItem3.DataValue = valueListItem4;
- valueListItem3.DisplayText = "女";
- this.ulcmeSex.Items.Add(valueListItem1);
- this.ulcmeSex.Items.Add(valueListItem3);
- this.ulcmeSex.Location = new System.Drawing.Point(81, 85);
- this.ulcmeSex.Name = "ulcmeSex";
- this.ulcmeSex.Size = new System.Drawing.Size(136, 21);
- this.ulcmeSex.TabIndex = 11;
- //
- // ultraLabel11
- //
- this.ultraLabel11.Location = new System.Drawing.Point(36, 120);
- this.ultraLabel11.Name = "ultraLabel11";
- this.ultraLabel11.Size = new System.Drawing.Size(42, 16);
- this.ultraLabel11.TabIndex = 9;
- this.ultraLabel11.Text = "备 注";
- //
- // ultraLabel10
- //
- this.ultraLabel10.Location = new System.Drawing.Point(503, 52);
- this.ultraLabel10.Name = "ultraLabel10";
- this.ultraLabel10.Size = new System.Drawing.Size(54, 16);
- this.ultraLabel10.TabIndex = 8;
- this.ultraLabel10.Text = "联系电话";
- //
- // ultraLabel9
- //
- this.ultraLabel9.Location = new System.Drawing.Point(734, 19);
- this.ultraLabel9.Name = "ultraLabel9";
- this.ultraLabel9.Size = new System.Drawing.Size(66, 16);
- this.ultraLabel9.TabIndex = 7;
- this.ultraLabel9.Text = "机器IP地址";
- this.toolTip1.SetToolTip(this.ultraLabel9, "鼠标左击增加IP框;右击减少");
- this.ultraLabel9.MouseClick += new System.Windows.Forms.MouseEventHandler(this.ultraLabel9_MouseClick);
- //
- // ultraLabel8
- //
- this.ultraLabel8.Location = new System.Drawing.Point(528, 18);
- this.ultraLabel8.Name = "ultraLabel8";
- this.ultraLabel8.Size = new System.Drawing.Size(29, 16);
- this.ultraLabel8.TabIndex = 6;
- this.ultraLabel8.Text = "部门";
- //
- // ultraLabel7
- //
- this.ultraLabel7.Location = new System.Drawing.Point(281, 52);
- this.ultraLabel7.Name = "ultraLabel7";
- this.ultraLabel7.Size = new System.Drawing.Size(29, 16);
- this.ultraLabel7.TabIndex = 5;
- this.ultraLabel7.Text = "职务";
- //
- // ultraLabel6
- //
- this.ultraLabel6.Location = new System.Drawing.Point(280, 84);
- this.ultraLabel6.Name = "ultraLabel6";
- this.ultraLabel6.Size = new System.Drawing.Size(32, 16);
- this.ultraLabel6.TabIndex = 4;
- this.ultraLabel6.Text = "年龄";
- this.ultraLabel6.Visible = false;
- //
- // ultraLabel5
- //
- this.ultraLabel5.Location = new System.Drawing.Point(281, 18);
- this.ultraLabel5.Name = "ultraLabel5";
- this.ultraLabel5.Size = new System.Drawing.Size(29, 16);
- this.ultraLabel5.TabIndex = 3;
- this.ultraLabel5.Text = "姓名";
- //
- // ultraLabel4
- //
- this.ultraLabel4.Location = new System.Drawing.Point(49, 52);
- this.ultraLabel4.Name = "ultraLabel4";
- this.ultraLabel4.Size = new System.Drawing.Size(29, 16);
- this.ultraLabel4.TabIndex = 2;
- this.ultraLabel4.Text = "岗位";
- //
- // ultraLabel3
- //
- this.ultraLabel3.Location = new System.Drawing.Point(49, 86);
- this.ultraLabel3.Name = "ultraLabel3";
- this.ultraLabel3.Size = new System.Drawing.Size(29, 16);
- this.ultraLabel3.TabIndex = 1;
- this.ultraLabel3.Text = "性别";
- //
- // ultraLabel2
- //
- this.ultraLabel2.Location = new System.Drawing.Point(24, 18);
- this.ultraLabel2.Name = "ultraLabel2";
- this.ultraLabel2.Size = new System.Drawing.Size(54, 16);
- this.ultraLabel2.TabIndex = 0;
- this.ultraLabel2.Text = "员工编号";
- //
- // panel2
- //
- this.panel2.BackColor = System.Drawing.Color.Gainsboro;
- this.panel2.Controls.Add(this.ultLoginID);
- this.panel2.Controls.Add(this.ultraLabel12);
- this.panel2.Controls.Add(this.ultraTextEditor8);
- this.panel2.Controls.Add(this.ultraCheckEditor1);
- this.panel2.Controls.Add(this.ultraButton1);
- this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
- this.panel2.Location = new System.Drawing.Point(0, 32);
- this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(1012, 56);
- this.panel2.TabIndex = 1;
- //
- // ultLoginID
- //
- appearance9.BackColor = System.Drawing.Color.LightCyan;
- this.ultLoginID.Appearance = appearance9;
- this.ultLoginID.AutoSize = true;
- this.ultLoginID.BackColor = System.Drawing.Color.LightCyan;
- this.ultLoginID.FlatMode = true;
- this.ultLoginID.Location = new System.Drawing.Point(371, 18);
- this.ultLoginID.Name = "ultLoginID";
- this.ultLoginID.Size = new System.Drawing.Size(152, 19);
- this.ultLoginID.TabIndex = 3;
- this.ultLoginID.Visible = false;
- this.ultLoginID.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.ultLoginID_EditorButtonClick);
- //
- // ultraLabel12
- //
- this.ultraLabel12.Location = new System.Drawing.Point(313, 22);
- this.ultraLabel12.Name = "ultraLabel12";
- this.ultraLabel12.Size = new System.Drawing.Size(54, 16);
- this.ultraLabel12.TabIndex = 0;
- this.ultraLabel12.Text = "员工编号";
- this.ultraLabel12.Visible = false;
- //
- // ultraTextEditor8
- //
- appearance10.BackColor = System.Drawing.Color.Gainsboro;
- this.ultraTextEditor8.Appearance = appearance10;
- this.ultraTextEditor8.AutoSize = true;
- this.ultraTextEditor8.BackColor = System.Drawing.Color.Gainsboro;
- this.ultraTextEditor8.Enabled = false;
- this.ultraTextEditor8.FlatMode = true;
- this.ultraTextEditor8.Location = new System.Drawing.Point(86, 18);
- this.ultraTextEditor8.Name = "ultraTextEditor8";
- this.ultraTextEditor8.ReadOnly = true;
- this.ultraTextEditor8.Size = new System.Drawing.Size(149, 19);
- this.ultraTextEditor8.TabIndex = 1;
- this.ultraTextEditor8.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.ultraTextEditor8_EditorButtonClick);
- //
- // ultraCheckEditor1
- //
- this.ultraCheckEditor1.Location = new System.Drawing.Point(31, 18);
- this.ultraCheckEditor1.Name = "ultraCheckEditor1";
- this.ultraCheckEditor1.Size = new System.Drawing.Size(48, 20);
- this.ultraCheckEditor1.TabIndex = 0;
- this.ultraCheckEditor1.Text = "部门";
- this.ultraCheckEditor1.CheckedChanged += new System.EventHandler(this.ultraCheckEditor1_CheckedChanged);
- //
- // ultraButton1
- //
- this.ultraButton1.Location = new System.Drawing.Point(237, 17);
- this.ultraButton1.Name = "ultraButton1";
- this.ultraButton1.Size = new System.Drawing.Size(27, 21);
- this.ultraButton1.TabIndex = 2;
- this.ultraButton1.Text = ">>";
- this.toolTip1.SetToolTip(this.ultraButton1, "部门维护");
- this.ultraButton1.Visible = false;
- this.ultraButton1.Click += new System.EventHandler(this.ultraButton1_Click);
- //
- // FrmUserManager
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
- this.ClientSize = new System.Drawing.Size(1012, 733);
- this.Controls.Add(this.FrmUserManager_Fill_Panel);
- this.Name = "FrmUserManager";
- this.Text = "系统用户管理";
- this.Load += new System.EventHandler(this.FrmUserManager_Load);
- this.panel1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).EndInit();
- this.FrmUserManager_Fill_Panel.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).EndInit();
- this.ultraExpandableGroupBox1.ResumeLayout(false);
- this.ultraExpandableGroupBoxPanel1.ResumeLayout(false);
- this.panel3.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.ultxtEmail)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ulcmeDepartment)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultxtMemo)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultxtPhono)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultxtZW)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultxtGW)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultxtAge)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultxtUserName)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultxtUserNo)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ulcmeSex)).EndInit();
- this.panel2.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.ultLoginID)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor8)).EndInit();
- this.ResumeLayout(false);
- }
- #endregion
- #region "显示窗体"
- private void FrmUserManager_Load(object sender, System.EventArgs e)
- {
- StrUser = Core.Mes.ClientFrameWork.ClientCommon._UserInfo.UserName;
- GetDepartmentData();
- GetUserData("", true);
- GetOperDepart();
- GetChildDept();
- InitComboBox();
- InitGrid();
- if (operDepart == "ROOT")
- {
- ultraButton1.Visible = true;
- }
- this.createIpedt(1);
- this.ultraGrid1.DisplayLayout.Bands[0].Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.True;
- }
- private void GetDepartmentData()
- {
- try
- {
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "SelectUAM_DEPARTMENT";
- par.args = new object[] { " order by DEPARTMENTID " };
- string strOut = "";
- _departmentData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
- _selectPartSQL = strOut;
- }
- catch
- { }
- }
- private void InitComboBox()
- {
- if (_departmentData != null && _departmentData.Tables.Count > 0)
- {
- DataTable dt = this._departmentData.Tables[0].Copy();
- this.ulcmeDepartment.Items.Clear();
- foreach (DataRow dr in dt.Rows)
- {
- if (dr["DEPARTMENTID"].ToString() == "ROOT" && operDepart != "ROOT") continue;
- try
- {
- this.ulcmeDepartment.Items.Add(dr["DEPARTMENTID"], dr["DEPARTMENTNAME"].ToString());
- }
- catch
- { }
- }
- }
- }
- private void GetUserData(string strWhere, bool flag)
- {
- try
- {
- if (!flag)
- {
- _userData.Tables[0].DefaultView.RowFilter = strWhere;
- return;
- }
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "SelectUAM_USER";
- par.args = new object[] { strWhere };
- string strOut = "";
- _userData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
- _selectUserSQL = strOut;
- }
- catch
- { }
- }
- private void GetOperDepart()
- {
- try
- {
- if (_userData != null && _userData.Tables.Count > 0)
- {
- DataTable dt = this._userData.Tables[0].Copy();
- foreach (DataRow dr in dt.Rows)
- {
- if (dr["NAME"].ToString() == StrUser)
- {
- operDepart = dr["DEPARTMENTID"].ToString();
- //operDepart=operDepart.Substring(0,3);
- //if(operDepart=="xg0")
- //{
- // operDepart="xg";
- //}
- DataTable dn = this._departmentData.Tables[0].Copy();
- foreach (DataRow dm in dn.Rows)
- {
- if (dm["DEPARTMENTID"].ToString() == operDepart)
- {
- operDepartname = dm["DEPARTMENTNAME"].ToString();
- }
- }
- }
- }
- }
- }
- catch
- { }
- }
- private void InitGrid()
- {
- #region " ValueList "
- GetPartData();
- ultraGrid1.DisplayLayout.Bands[0].Columns["DEPARTMENTID"].ValueList = ultraGrid1.DisplayLayout.ValueLists["part"];
- ultraGrid1.DisplayLayout.Bands[0].Columns["PD"].ValueList = ultraGrid1.DisplayLayout.ValueLists["part"];
- #endregion
- this.ultraCheckEditor1.CheckedValue = true;
- this.ultraTextEditor8.Enabled = true;
- this.ultraTextEditor8.Text = operDepartname;
- this.ultraTextEditor8.Tag = allDept;
- Query();
- // this.ultraGrid1.DataSource = this._userData.Tables[0];
- this.ultraGrid1.AfterRowActivate += new EventHandler(ultraGrid1_AfterRowActivate);
- }
- private void ultraGrid1_AfterRowActivate(object sender, System.EventArgs e)
- {
- try
- {
- if (this.ultraGrid1.ActiveRow == null) return;
- UltraGridRow ugr = this.ultraGrid1.ActiveRow;
- this.ultxtUserNo.Text = ugr.Cells["USERID"].Value.ToString();
- this.ulcmeDepartment.Value = ugr.Cells["DEPARTMENTID"].Value;
- this.ultxtUserName.Text = ugr.Cells["NAME"].Value.ToString();
- this.ulcmeSex.Text = ugr.Cells["SEX"].Value.ToString();
- this.ultxtAge.Text = ugr.Cells["AGE"].Value.ToString();
- //this.ulmskedtIP.Text = ugr.Cells["COMPUTERIP"].Value.ToString();
- this.analysisIpstr(ugr.Cells["COMPUTERIP"].Value.ToString());
- this.ultxtPhono.Text = ugr.Cells["HOMEPHONE"].Value.ToString();
- this.ultxtGW.Text = ugr.Cells["WORKPOS"].Value.ToString();
- this.ultxtZW.Text = ugr.Cells["WORKJOB"].Value.ToString();
- this.ultxtMemo.Text = ugr.Cells["MEMO"].Value.ToString();
- this.ultxtEmail.Text = ugr.Cells["EMAIL"].Value.ToString();
- }
- catch (Exception ex)
- {
- Console.WriteLine(ex.Message);
- }
- }
- private void GetPartData()
- {
- if (ultraGrid1.DisplayLayout.ValueLists.Exists("part"))
- ultraGrid1.DisplayLayout.ValueLists["part"].ValueListItems.Clear();
- else
- ultraGrid1.DisplayLayout.ValueLists.Add("part");
- //try
- //{
- // ultraGrid1.DisplayLayout.ValueLists["part"].ValueListItems.Clear();
- //}
- //catch
- //{
- // ultraGrid1.DisplayLayout.ValueLists.Add("part");
- //}
- DataTable dt = this._departmentData.Tables[0].Copy();
- foreach (DataRow dr in dt.Rows)
- {
- Infragistics.Win.ValueListItem vli = new Infragistics.Win.ValueListItem();
- vli.DisplayText = dr["DEPARTMENTNAME"].ToString();
- vli.DataValue = dr["DEPARTMENTID"];
- ultraGrid1.DisplayLayout.ValueLists["part"].ValueListItems.Add(vli);
- }
- }
- #endregion
- #region "工具栏操作"
- private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- switch (e.Tool.Key)
- {
- case "add":
- Add();
- GetUserData("", true);
- break;
- case "del":
- Del();
- break;
- case "edit":
- Edit();
- break;
- case "query":
- Query();
- break;
- case "exit":
- this.Close();
- break;
- case "back":
- // this.ultraToolbarsManager1.Toolbars[0].Tools["back"].SharedProps.Visible=false;
- // RefreshGrid("");
- // ultraCheckEditor1.Checked = false;
- // ultraTextEditor8.Text = "";
- this.ultraCheckEditor1.CheckedValue = true;
- if (ultLoginID.Text.Trim().Length > 0)
- {
- ultLoginID.Tag = ultLoginID.Text.Trim();
- ultLoginID.Text = "";
- }
- this.ultraTextEditor8.Enabled = true;
- this.ultraTextEditor8.Text = operDepartname;
- this.ultraTextEditor8.Tag = allDept;
- Query();
- break;
- case "leadin":
- try
- {
- string StrfileName = string.Format("c:\\{0}.xls", this.Text);
- this.ultraGridExcelExporter1.Export(this.ultraGrid1, StrfileName);
- ProcessStartInfo p = new ProcessStartInfo(StrfileName);
- p.WorkingDirectory = Path.GetDirectoryName(StrfileName);
- Process.Start(p);
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.Message);
- }
- break;
- }
- }
- private void Add()
- {
- if (this.ultxtUserNo.Text.Trim() == "")
- {
- MessageBox.Show("请录入员工编号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (this.ultxtUserName.Text.Trim() == "")
- {
- MessageBox.Show("请录入员工姓名!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (this.ulcmeDepartment.Value == null)
- {
- MessageBox.Show("请选择员工所在部门!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (this.ulcmeDepartment.Value.ToString() == "ROOT")
- {
- this.ulcmeDepartment.Value = null;
- MessageBox.Show("必须选择下属部门!");
- return;
- }
- if (!(RightsComm.CheckRole(ulcmeDepartment.Value.ToString())))
- {
- return;
- }
- //if (allDept.IndexOf("'" + ulcmeDepartment.Value.ToString() + "'") < 0 && operDepart != "ROOT")
- //{
- // this.ulcmeDepartment.Value = null;
- // MessageBox.Show("你没有配置这一部门用户的权限,请重新选择部门!");
- // return;
- //}
- ArrayList al = new ArrayList();
- al.Add(this.ultxtUserNo.Text.Trim());
- al.Add(this.ulcmeDepartment.Value);
- al.Add(this.ultxtUserName.Text.Trim());
- if (this.ulcmeSex.SelectedIndex != -1)
- {
- al.Add(this.ulcmeSex.Text.Trim());
- }
- else
- {
- al.Add("");
- }
- if (this.ultxtAge.Text == "")
- al.Add(0);
- else
- al.Add(this.ultxtAge.Text.Trim());
- //al.Add(this.ulmskedtIP.Text.Trim());
- al.Add(this.getIpstr());
- this.checkIpstr(this.getIpstr());
- al.Add(this.ultxtPhono.Text.Trim());
- al.Add(this.ultxtGW.Text.Trim());
- al.Add(this.ultxtZW.Text.Trim());
- al.Add(this.ultxtMemo.Text.Trim());
- al.Add(this.ultxtEmail.Text.Trim());
- try
- {
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "InsertUAM_USER";
- par.args = new object[] { al };
- string strOut = "";
- object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
- if (strOut != "")
- {
- MessageBox.Show("新增失败! \n" + strOut);
- return;
- }
- else
- {
- if ((int)obj != 1)
- {
- MessageBox.Show("新增失败!");
- return;
- }
- }
- }
- catch
- {
- return;
- }
- this.GetDepartmentData();
- UltraGridRow ugr = this.ultraGrid1.DisplayLayout.Bands[0].AddNew();
- ugr.Cells["USERID"].Value = al[0];
- ugr.Cells["DEPARTMENTID"].Value = al[1];
- ugr.Cells["NAME"].Value = al[2];
- ugr.Cells["SEX"].Value = al[3];
- ugr.Cells["AGE"].Value = al[4];
- //ugr.Cells["COMPUTERIP"].Value = al[5];
- this.analysisIpstr(ugr.Cells["COMPUTERIP"].Value.ToString());
- ugr.Cells["HOMEPHONE"].Value = al[6];
- ugr.Cells["WORKPOS"].Value = al[7];
- ugr.Cells["WORKJOB"].Value = al[8];
- ugr.Cells["MEMO"].Value = al[9];
- ugr.Cells["EMAIL"].Value = al[10];
- for (int i = 0; i < _departmentData.Tables[0].Rows.Count; i++)
- {
- if (_departmentData.Tables[0].Rows[i]["DEPARTMENTID"].ToString() == al[1].ToString())
- {
- ugr.Cells["PD"].Value = _departmentData.Tables[0].Rows[i]["DEPARTMENTPID"].ToString();
- break;
- }
- }
- this.ultraGrid1.UpdateData();
- }
- private void Del()
- {
- int i = 0;
- UltraGridRow ugr = this.ultraGrid1.ActiveRow;
- if (ugr == null)
- {
- MessageBox.Show("请选择要删除的员工!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (MessageBox.Show("是否确认删除选中的员工?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
- {
- return;
- }
- string targetName = ugr.Cells["NAME"].Value.ToString();
- if (MessageBox.Show("是否确认删除员工----" + targetName + "----", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
- {
- return;
- }
- try
- {
- string OpDptID = "";
- OpDptID = ugr.Cells["DEPARTMENTID"].Value.ToString();
- if (!(RightsComm.CheckRole(OpDptID)))
- return;
- i = ugr.Index;
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "DeleteUAM_USER";
- par.args = new object[] { ugr.Cells[0].Value.ToString() };
- string strOut = "";
- object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
- if (strOut != "")
- {
- MessageBox.Show("删除失败! \n" + strOut);
- return;
- }
- else
- {
- if ((int)obj != 1)
- {
- MessageBox.Show("删除失败!");
- return;
- }
- }
- }
- catch //(Exception ex)
- {
- // CoreMesLogger.log(this.GetType()).Error(ex.Message);
- return;
- }
- this.ultraGrid1.ActiveRow.Delete(false);
- this.ultraGrid1.UpdateData();
- try
- {
- this.ultraGrid1.Rows[i].Activate();
- }
- catch
- {
- int count = this.ultraGrid1.Rows.Count;
- if (count > 0)
- this.ultraGrid1.Rows[count - 1].Activate();
- }
- }
- private void Edit()
- {
- UltraGridRow ugr = this.ultraGrid1.ActiveRow;
- if (ugr == null)
- {
- MessageBox.Show("请选择要修改的员工!");
- return;
- }
- if (this.ultxtUserNo.Text.Trim() != ugr.Cells["USERID"].Text.Trim())
- {
- MessageBox.Show("不能修改员工编号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (this.ultxtUserName.Text.Trim() == "")
- {
- MessageBox.Show("请录入员工姓名!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (this.ulcmeDepartment.Value == null)
- {
- MessageBox.Show("请选择员工所在部门!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (this.ulcmeDepartment.Value.ToString() == "ROOT")
- {
- this.ulcmeDepartment.Value = null;
- MessageBox.Show("必须选择下属部门!");
- return;
- }
- if (allDept.IndexOf("'" + ulcmeDepartment.Value.ToString() + "'") < 0 && operDepart != "ROOT")
- {
- this.ulcmeDepartment.Value = null;
- MessageBox.Show("你没有修改该用户的权限,请重新选择部门!");
- return;
- }
- ArrayList al = new ArrayList();
- al.Add(this.ultxtUserNo.Text.Trim());
- al.Add(this.ulcmeDepartment.Value);
- al.Add(this.ultxtUserName.Text.Trim());
- al.Add(this.ulcmeSex.Text.Trim());
- al.Add((ultxtAge.Text.Trim() != "") ? ultxtAge.Text.Trim() : "0");
- //al.Add(this.ulmskedtIP.Text.Trim());
- al.Add(this.getIpstr());
- this.checkIpstr(this.getIpstr());
- al.Add(this.ultxtPhono.Text.Trim());
- al.Add(this.ultxtGW.Text.Trim());
- al.Add(this.ultxtZW.Text.Trim());
- al.Add(this.ultxtMemo.Text.Trim());
- al.Add(this.ultxtEmail.Text.Trim());
- try
- {
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "UpdateUAM_USER";
- par.args = new object[] { al };
- string strOut = "";
- object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
- if (strOut != "")
- {
- MessageBox.Show("修改失败 \n" + strOut);
- return;
- }
- else
- {
- int i = (int)obj;
- if (i != 1)
- {
- MessageBox.Show("修改失败");
- return;
- }
- }
- }
- catch //(Exception ex)
- {
- // CoreMesLogger.log(this.GetType()).Error(ex.Message);
- return;
- }
- ugr.Cells["DEPARTMENTID"].Value = al[1];
- ugr.Cells["NAME"].Value = al[2];
- ugr.Cells["SEX"].Value = al[3];
- ugr.Cells["AGE"].Value = al[4];
- //ugr.Cells["COMPUTERIP"].Value = al[5];
- this.analysisIpstr(ugr.Cells["COMPUTERIP"].Value.ToString());
- ugr.Cells["HOMEPHONE"].Value = al[6];
- ugr.Cells["WORKPOS"].Value = al[7];
- ugr.Cells["WORKJOB"].Value = al[8];
- ugr.Cells["MEMO"].Value = al[9];
- ugr.Cells["EMAIL"].Value = al[10];
- for (int i = 0; i < _departmentData.Tables[0].Rows.Count; i++)
- {
- if (_departmentData.Tables[0].Rows[i]["DEPARTMENTID"].ToString() == al[1].ToString())
- {
- ugr.Cells["PD"].Value = _departmentData.Tables[0].Rows[i]["DEPARTMENTPID"].ToString();
- break;
- }
- }
- this.ultraGrid1.UpdateData();
- }
- private void Query()
- {
- try
- {
- if ((this.ultraTextEditor8.Text == null || !this.ultraCheckEditor1.Checked) &&
- (this.ultLoginID.Text.Trim().Length == 0))
- {
- MessageBox.Show("请选择要查询的部门或员工编号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (this.ultraCheckEditor1.Checked && this.ultraTextEditor8.Text != "")
- {
- GetSelDept();
- if (operDepart != "ROOT" && allDept.IndexOf("'" + selDept + "'") < 0)
- {
- MessageBox.Show("你没有查看这一部门的权限,请重新选择!");
- return;
- }
- }
- this.ultraToolbarsManager1.Toolbars[0].Tools["back"].SharedProps.Visible = true;
- string strWhere = "";
- if (this.ultraTextEditor8.Tag.ToString().Length > 0)
- strWhere = " WHERE DEPARTMENTID in (" + this.ultraTextEditor8.Tag.ToString() + ")";
- //strWhere = GetRefreshWhere();
- //strWhere = " where " + strWhere;
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "GetUAM_USER";
- par.args = new object[] { strWhere };
- string strOut = "";
- DataSet obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
- this.ultraGrid1.DataSource = obj.Tables[0];
- this.ultraGrid1.Refresh();
- }
- catch (System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private string GetRefreshWhere()
- {
- string sqlstr = "";
- if (this.ultraTextEditor8.Enabled && this.ultraCheckEditor1.Checked && this.ultraTextEditor8.Text != "")
- {
- ArrayList al = this.GetUserID();
- if (al == null || al.Count == 0)
- {
- sqlstr = "1=2";
- }
- else
- {
- sqlstr += " USERID in ('" + al[0].ToString() + "'";
- for (int i = 1; i < al.Count; i++)
- {
- sqlstr += ", '" + al[i].ToString() + "' ";
- }
- sqlstr += ")";
- }
- }
- if (this.ultLoginID.Text.Trim().Length > 0)
- {
- if (sqlstr != "")
- sqlstr += " and ";
- sqlstr += " USERID = '" + this.ultLoginID.Text.Trim() + "'";
- }
- return sqlstr;
- }
- private ArrayList GetUserID()
- {
- ArrayList al = new ArrayList();
- DataTable dt = null;
- if (this._userData == null)
- dt = null;
- else
- dt = this._userData.Tables[0];
- if (dt != null)
- {
- if (this.ultraTextEditor8.Enabled && this.ultraTextEditor8.Tag != null)
- {
- string partid = this.ultraTextEditor8.Tag.ToString();
- string strFilter = "DEPARTMENTID in (" + partid + ")";
- dt.DefaultView.RowFilter = strFilter;
- }
- for (int i = 0; i < dt.DefaultView.Count; i++)
- {
- al.Add(dt.DefaultView[i]["USERID"].ToString());
- }
- return al;
- }
- else
- return null;
- }
- private void RefreshGrid(string strWhere)
- {
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "SelectUAM_USER";
- par.args = new object[] { strWhere };
- string strOut = "";
- DataSet obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
- this.ultraGrid1.DataSource = obj.Tables[0];
- this.ultraGrid1.Refresh();
- }
- #endregion
- #region "Button"
- private void ultraButton1_Click(object sender, System.EventArgs e)
- {
- foreach (Form mdiChild in this.MdiParent.MdiChildren)
- {
- if (mdiChild.Text == "部门管理")
- {
- mdiChild.Activate();
- return;
- }
- }
- FrmDepartment frmpart = new FrmDepartment();
- // frmpart.RemotingHelp = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp;
- frmpart.MdiParent = this.ParentForm;
- frmpart.Show();
- }
- #endregion
- #region "TextBox"
- private void ultraTextEditor8_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- try
- {
- FrmSetDepart frm = new FrmSetDepart();
- frm.Location = GetChildWindowLocation(frm.Size);
- frm.ShowDialog();
- if (frm.SelectedID != "" && frm.SelectedName != "")
- {
- this.ultraTextEditor8.Text = frm.SelectedName;
- this.ultraTextEditor8.Tag = frm.SelectedID;
- }
- if (this.ultraTextEditor8.Text != "" && this.ultraCheckEditor1.Checked)
- {
- GetSelDept();
- if (operDepart != "ROOT" && allDept.IndexOf("'" + selDept + "'") < 0)
- {
- MessageBox.Show("你没有查看这一部门的权限,请重新选择!");
- }
- }
- }
- catch
- { }
- }
- private void ultLoginID_EditorButtonClick(object sender, EditorButtonEventArgs e)
- {
- try
- {
- if (e.Button.Key == "SET")
- {
- if (ultLoginID.Text.Trim().Length > 0)
- {
- ultLoginID.Tag = ultLoginID.Text.Trim();
- ultLoginID.Text = "";
- }
- else
- {
- if (ultLoginID.Tag != null)
- ultLoginID.Text = ultLoginID.Tag.ToString();
- }
- }
- }
- catch { }
- }
- #endregion
- #region "Custom Method"
- private Point GetChildWindowLocation(Size ChildWindowSize)
- {
- int width = Cursor.Position.X + ChildWindowSize.Width - Screen.PrimaryScreen.Bounds.Width;
- int height = Cursor.Position.Y + ChildWindowSize.Height - Screen.PrimaryScreen.Bounds.Height + 30;
- if (width > 0)
- width = Cursor.Position.X - width;
- else
- width = Cursor.Position.X;
- if (height > 0)
- height = Cursor.Position.Y - height + 10;
- else
- height = Cursor.Position.Y + 10;
- return new Point(width, height);
- }
- private void GetChildDept()
- {
- try
- {
- string strOut = "";
- DataSet ds = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("PurviewManager", "Core.Mes.PurviewManager.UAM_USER", "SelectChildDept", new object[] { operDepart }, out strOut) as DataSet;
- if (ds.Tables[0].Rows[0][0].ToString() != "")
- {
- allDept = "'" + ds.Tables[0].Rows[0][0].ToString() + "'" + operDepart + "'";
- }
- else
- allDept = "'" + operDepart + "'";
- }
- catch
- { }
- }
- private void GetSelDept()
- {
- try
- {
- if (this.ultraTextEditor8.Text != "" && this.ultraCheckEditor1.Checked)
- {
- DataTable dt = this._departmentData.Tables[0].Copy();
- foreach (DataRow dr in dt.Rows)
- {
- if (dr["DEPARTMENTNAME"].ToString() == this.ultraTextEditor8.Text)
- {
- selDept = dr["DEPARTMENTID"].ToString();
- return;
- }
- }
- }
- }
- catch
- { }
- }
- #endregion
- #region "ComboBox"
- private void ultraComboEditor2_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- try
- {
- FrmSetDepart frm = new FrmSetDepart();
- frm.GetChildIDFlag = false;
- frm.Location = GetChildWindowLocation(frm.Size);
- frm.ShowDialog();
- InitComboBox();
- if (frm.SelectedID != "" && frm.SelectedName != "")
- {
- this.ulcmeDepartment.Value = frm.SelectedID;
- if (operDepart != "ROOT" && this.ulcmeDepartment.Value.ToString() == "ROOT")
- {
- this.ulcmeDepartment.Value = null;
- MessageBox.Show("所属权限不允许选择选择整个公司!");
- return;
- }
- if (allDept.IndexOf("'" + ulcmeDepartment.Value.ToString() + "'") < 0 && operDepart != "ROOT")
- {
- this.ulcmeDepartment.Value = null;
- MessageBox.Show("你没有配置这一部门用户的权限,请重新选择部门!");
- return;
- }
- }
- }
- catch
- { }
- }
- private void ultraComboEditor2_SelectionChanged(object sender, System.EventArgs e)
- {
- try
- {
- if (operDepart != "ROOT" && ulcmeDepartment.Value.ToString() == "ROOT")
- {
- this.ulcmeDepartment.Value = null;
- MessageBox.Show("所属权限不允许选择选择整个公司!");
- return;
- }
- if (ulcmeDepartment.Value != null && allDept.IndexOf("'" + ulcmeDepartment.Value.ToString() + "'") < 0 && operDepart != "ROOT")
- {
- this.ulcmeDepartment.Value = null;
- MessageBox.Show("你没有配置这一部门用户的权限,请重新选择部门!");
- return;
- }
- }
- catch
- { }
- }
- #endregion
- #region "CheckBox"
- private void ultraCheckEditor1_CheckedChanged(object sender, System.EventArgs e)
- {
- this.ultraTextEditor8.Enabled = this.ultraCheckEditor1.Checked;
- }
- #endregion
- private ArrayList listIpedt = new ArrayList();
- private void createIpedt(int sum)
- {
- for (int i = 0; i < sum; i++)
- {
- if (this.listIpedt.Count >= 4)
- {
- break;
- }
- Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit ipedt = new Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit();
- ipedt = new Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit();
- ipedt.EditAs = Infragistics.Win.UltraWinMaskedEdit.EditAsType.UseSpecifiedMask;
- ipedt.InputMask = "nnn\\.nnn\\.nnn\\.nnn";
- ipedt.Location = new System.Drawing.Point(3, 3);
- ipedt.Name = "ulmskedtIP";
- ipedt.Size = new System.Drawing.Size(136, 21);
- ipedt.TabIndex = 12;
- ipedt.Text = "...";
- //this.toolTip1.SetToolTip(ipedt, "鼠标左击增加IP框;右击减少");
- this.flowLayoutPanel1.Controls.Add(ipedt);
- listIpedt.Add(ipedt);
- }
-
- }
- private void deleteIpedt(int sum)
- {
- if (sum > 0 && listIpedt.Count - sum > 0)
- {
- int cnt = listIpedt.Count -sum;
- for (int i=listIpedt.Count;i>cnt;i--){
-
- Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit ipedt = (Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit) listIpedt[listIpedt.Count - 1];
- ipedt.Dispose();
- listIpedt.RemoveAt(listIpedt.Count - 1);
- }
- }
- }
- private string getIpstr()
- {
- string ipstr = "";
- Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit ipedt;
- for (int i = 0; i < listIpedt.Count; i++)
- {
- ipedt = (Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit)listIpedt[i];
- if (!"...".Equals(ipedt.Value.ToString().Trim()) && !"".Equals(ipedt.Value.ToString().Trim()))
- {
- ipstr += ipedt.Value.ToString().Trim() + ";";
- }
- }
- if (ipstr.Trim().Length>0&&";".Equals(ipstr.Substring(ipstr.Length - 1, 1)))
- {
- ipstr = ipstr.Substring(0, ipstr.Length - 1);
- }
- return ipstr;
- }
- private void ultraLabel9_MouseClick(object sender, MouseEventArgs e)
- {
- if (e.Button == MouseButtons.Left)
- {
- this.createIpedt(1);
- }
- if (e.Button == MouseButtons.Right)
- {
- this.deleteIpedt(1);
- }
- }
- private void analysisIpstr(string ipstr)
- {
- Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit ipedt;
- string[] ipR = ipstr.Split(new string[] { ";", @";" }, StringSplitOptions.None);
- this.createIpedt(ipR.GetLength(0) - listIpedt.Count);
- this.deleteIpedt(listIpedt.Count - ipR.GetLength(0));
- for (int i = 0; i < ipR.GetLength(0); i++)
- {
- ipedt = (Infragistics.Win.UltraWinMaskedEdit.UltraMaskedEdit) listIpedt[i];
- ipedt.Text = ipR[i].ToString();
- }
- }
- private bool checkIpstr(string IpRule)
- {
- if (string.IsNullOrEmpty(IpRule)) return true;
- string[] ipR = IpRule.Split(new string[] { ";", @";" }, StringSplitOptions.None);
- for (int i = 0; i < ipR.GetLength(0); i++)
- {
- string iprs = ipR[i].Trim();
- string[] ipRules = iprs.Split(new string[] { ".", @"。" }, StringSplitOptions.None);
- int min_len = ipRules.GetLength(0);
- for (int idx = 0; idx < (min_len >= 4 ? 4 : min_len); idx++)
- {
- string ip_segment = ipRules[idx].Trim();
- if (string.IsNullOrEmpty(ip_segment)) continue;
- //检查ip规则配置是否正确 只允许包含 [数字]、[*]、[?] 三种字符;
- Regex regex_segment = new Regex(@"^[0-9\?\*]{1,3}$");
- if (!regex_segment.IsMatch(ip_segment))
- {
- MessageBox.Show(string.Format("IP规则第三段配置不正确![{0}]", ip_segment));
- }
- }
- }
- return true;
- }
- }
- }
|