| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914 |
- using System;
- using System.Data;
- using System.Drawing;
- using System.Diagnostics;
- using System.IO;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- using Infragistics.Win.UltraWinGrid;
- using Infragistics.Win.UltraWinEditors ;
- using Core.Mes.ClientFrameWork;
- using Core.Mes.IBaseInterface;
- //using Core.Mes.ServerFrameWork;
- namespace Core.Mes.ClientPurviewManager
- {
- /// <summary>
- /// FrmAuthorization 的摘要说明。
- /// </summary>
- public class FrmAuthorization : Core.Mes.ClientFrameWork.FrmBase
- {
- private System.Windows.Forms.Panel panel1;
- private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ultraToolbarsManager1;
- private System.Windows.Forms.Panel FrmAuthorization_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 Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid1;
- private System.Windows.Forms.Panel panel2;
- private Infragistics.Win.UltraWinEditors.UltraCheckEditor ultraCheckEditor1;
- private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor1;
- private Infragistics.Win.UltraWinEditors.UltraCheckEditor ultraCheckEditor2;
- private Infragistics.Win.UltraWinEditors.UltraComboEditor ultraComboEditor1;
- private Infragistics.Win.Misc.UltraButton ultraButton1;
- private Infragistics.Win.Misc.UltraButton ultraButton2;
- private Infragistics.Win.Misc.UltraExpandableGroupBox ultraExpandableGroupBox1;
- private Infragistics.Win.Misc.UltraExpandableGroupBoxPanel ultraExpandableGroupBoxPanel1;
- private System.Windows.Forms.Panel panel3;
- private Infragistics.Win.UltraWinEditors.UltraComboEditor ultraComboEditor3;
- private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor4;
- private Infragistics.Win.UltraWinEditors.UltraComboEditor ultraComboEditor2;
- private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor2;
- private Infragistics.Win.Misc.UltraLabel ultraLabel4;
- private Infragistics.Win.Misc.UltraLabel ultraLabel3;
- private Infragistics.Win.Misc.UltraLabel ultraLabel2;
- private Infragistics.Win.Misc.UltraLabel ultraLabel1;
- private System.Windows.Forms.ToolTip toolTip1;
- private Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter ultraGridExcelExporter1;
- private Infragistics.Win.Misc.UltraLabel ultraLabel5;
- private UltraTextEditor ultLoginID;
- private Infragistics.Win.Misc.UltraLabel ultraLabel6;
- private System.ComponentModel.IContainer components;
- public FrmAuthorization()
- {
- //
- // Windows 窗体设计器支持所必需的
- //
- InitializeComponent();
- //
- // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
- //
- }
- /// <summary>
- /// 清理所有正在使用的资源。
- /// </summary>
- protected override void Dispose(bool disposing)
- {
- if (disposing)
- {
- if (components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose(disposing);
- }
- #region Windows 窗体设计器生成的代码
- /// <summary>
- /// 设计器支持所需的方法 - 不要使用代码编辑器修改
- /// 此方法的内容。
- /// </summary>
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- Infragistics.Win.Appearance appearance121 = new Infragistics.Win.Appearance();
- Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar2 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("aubar");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool15 = new Infragistics.Win.UltraWinToolbars.ButtonTool("query");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool16 = new Infragistics.Win.UltraWinToolbars.ButtonTool("add");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool17 = new Infragistics.Win.UltraWinToolbars.ButtonTool("edit");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool18 = new Infragistics.Win.UltraWinToolbars.ButtonTool("del");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool19 = new Infragistics.Win.UltraWinToolbars.ButtonTool("close");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool20 = new Infragistics.Win.UltraWinToolbars.ButtonTool("back");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool21 = new Infragistics.Win.UltraWinToolbars.ButtonTool("leadin");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool22 = new Infragistics.Win.UltraWinToolbars.ButtonTool("add");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool23 = new Infragistics.Win.UltraWinToolbars.ButtonTool("edit");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool24 = new Infragistics.Win.UltraWinToolbars.ButtonTool("del");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool25 = new Infragistics.Win.UltraWinToolbars.ButtonTool("query");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool26 = new Infragistics.Win.UltraWinToolbars.ButtonTool("close");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool27 = new Infragistics.Win.UltraWinToolbars.ButtonTool("back");
- Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool28 = new Infragistics.Win.UltraWinToolbars.ButtonTool("leadin");
- Infragistics.Win.Appearance appearance122 = new Infragistics.Win.Appearance();
- Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand6 = new Infragistics.Win.UltraWinGrid.UltraGridBand("Band 0", -1);
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn36 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("LOGINID");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn37 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("ROLEID");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn38 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("USERID");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn39 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("PASSWD");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn40 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("DEPARTMENTID");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn41 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("WORKPOS");
- Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn42 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("ROLEMEMO");
- Infragistics.Win.Appearance appearance123 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance124 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance125 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance126 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance127 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance128 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance129 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance130 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance131 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance132 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance133 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance134 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance135 = new Infragistics.Win.Appearance();
- Infragistics.Win.UltraWinEditors.EditorButton editorButton16 = new Infragistics.Win.UltraWinEditors.EditorButton("part");
- Infragistics.Win.Appearance appearance136 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance137 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance138 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance139 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance140 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance141 = new Infragistics.Win.Appearance();
- Infragistics.Win.UltraWinEditors.EditorButton editorButton17 = new Infragistics.Win.UltraWinEditors.EditorButton("part");
- Infragistics.Win.Appearance appearance142 = new Infragistics.Win.Appearance();
- Infragistics.Win.UltraWinEditors.EditorButton editorButton18 = new Infragistics.Win.UltraWinEditors.EditorButton("SET");
- Infragistics.Win.Appearance appearance143 = new Infragistics.Win.Appearance();
- Infragistics.Win.Appearance appearance144 = new Infragistics.Win.Appearance();
- this.ultraTextEditor4 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- 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.FrmAuthorization_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.ultraLabel5 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraComboEditor3 = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
- this.ultraComboEditor2 = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
- this.ultraTextEditor2 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- this.ultraLabel4 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraLabel3 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraLabel2 = new Infragistics.Win.Misc.UltraLabel();
- this.ultraLabel1 = new Infragistics.Win.Misc.UltraLabel();
- this.panel2 = new System.Windows.Forms.Panel();
- this.ultraButton2 = new Infragistics.Win.Misc.UltraButton();
- this.ultraButton1 = new Infragistics.Win.Misc.UltraButton();
- this.ultraComboEditor1 = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
- this.ultraCheckEditor2 = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
- this.ultraTextEditor1 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- this.ultraCheckEditor1 = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
- this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
- this.ultraGridExcelExporter1 = new Infragistics.Win.UltraWinGrid.ExcelExport.UltraGridExcelExporter();
- this.ultLoginID = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
- this.ultraLabel6 = new Infragistics.Win.Misc.UltraLabel();
- ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor4)).BeginInit();
- this.panel1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).BeginInit();
- this.FrmAuthorization_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.ultraComboEditor3)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor2)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor2)).BeginInit();
- this.panel2.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor1)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultLoginID)).BeginInit();
- this.SuspendLayout();
- //
- // ultraTextEditor4
- //
- appearance121.BackColor = System.Drawing.Color.LightCyan;
- this.ultraTextEditor4.Appearance = appearance121;
- this.ultraTextEditor4.AutoSize = true;
- this.ultraTextEditor4.BackColor = System.Drawing.Color.LightCyan;
- this.ultraTextEditor4.FlatMode = true;
- this.ultraTextEditor4.Location = new System.Drawing.Point(422, 23);
- this.ultraTextEditor4.Name = "ultraTextEditor4";
- this.ultraTextEditor4.PasswordChar = '*';
- this.ultraTextEditor4.Size = new System.Drawing.Size(224, 19);
- this.ultraTextEditor4.TabIndex = 15;
- //
- // 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(927, 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.FlatMode = true;
- this.ultraToolbarsManager1.ShowQuickCustomizeButton = false;
- this.ultraToolbarsManager1.Style = Infragistics.Win.UltraWinToolbars.ToolbarStyle.VisualStudio2005;
- ultraToolbar2.DockedColumn = 0;
- ultraToolbar2.DockedRow = 0;
- ultraToolbar2.Text = "aubar";
- buttonTool15.InstanceProps.IsFirstInGroup = true;
- buttonTool16.InstanceProps.IsFirstInGroup = true;
- buttonTool17.InstanceProps.IsFirstInGroup = true;
- buttonTool18.InstanceProps.IsFirstInGroup = true;
- buttonTool19.InstanceProps.IsFirstInGroup = true;
- buttonTool20.InstanceProps.IsFirstInGroup = true;
- buttonTool21.InstanceProps.IsFirstInGroup = true;
- ultraToolbar2.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
- buttonTool15,
- buttonTool16,
- buttonTool17,
- buttonTool18,
- buttonTool19,
- buttonTool20,
- buttonTool21});
- this.ultraToolbarsManager1.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
- ultraToolbar2});
- buttonTool22.SharedProps.Caption = "新增(&A)";
- buttonTool22.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool23.SharedProps.Caption = "修改(&U)";
- buttonTool23.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool23.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlU;
- buttonTool24.SharedProps.Caption = "删除(&D)";
- buttonTool24.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool25.SharedProps.Caption = "查询(&Q)";
- buttonTool25.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool26.SharedProps.Caption = "关闭(&E)";
- buttonTool26.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool26.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlE;
- buttonTool27.SharedProps.Caption = "返回(&B)";
- buttonTool27.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- buttonTool27.SharedProps.Visible = false;
- buttonTool28.SharedProps.Caption = "导入Excel";
- buttonTool28.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
- this.ultraToolbarsManager1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
- buttonTool22,
- buttonTool23,
- buttonTool24,
- buttonTool25,
- buttonTool26,
- buttonTool27,
- buttonTool28});
- 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(927, 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(927, 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(927, 0);
- this._panel1_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.ultraToolbarsManager1;
- //
- // FrmAuthorization_Fill_Panel
- //
- this.FrmAuthorization_Fill_Panel.Controls.Add(this.ultraGrid1);
- this.FrmAuthorization_Fill_Panel.Controls.Add(this.ultraExpandableGroupBox1);
- this.FrmAuthorization_Fill_Panel.Controls.Add(this.panel2);
- this.FrmAuthorization_Fill_Panel.Controls.Add(this.panel1);
- this.FrmAuthorization_Fill_Panel.Cursor = System.Windows.Forms.Cursors.Default;
- this.FrmAuthorization_Fill_Panel.Dock = System.Windows.Forms.DockStyle.Fill;
- this.FrmAuthorization_Fill_Panel.Location = new System.Drawing.Point(0, 0);
- this.FrmAuthorization_Fill_Panel.Name = "FrmAuthorization_Fill_Panel";
- this.FrmAuthorization_Fill_Panel.Size = new System.Drawing.Size(927, 509);
- this.FrmAuthorization_Fill_Panel.TabIndex = 0;
- //
- // ultraGrid1
- //
- appearance122.BackColor = System.Drawing.SystemColors.Window;
- appearance122.BorderColor = System.Drawing.SystemColors.InactiveCaption;
- this.ultraGrid1.DisplayLayout.Appearance = appearance122;
- ultraGridColumn36.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn36.Header.Caption = "登录帐号";
- ultraGridColumn36.Header.VisiblePosition = 0;
- ultraGridColumn36.Width = 80;
- ultraGridColumn37.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn37.Header.Caption = "角色";
- ultraGridColumn37.Header.VisiblePosition = 5;
- ultraGridColumn37.Width = 150;
- ultraGridColumn38.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn38.Header.Caption = "员工";
- ultraGridColumn38.Header.VisiblePosition = 2;
- ultraGridColumn38.Width = 100;
- ultraGridColumn39.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn39.EditorControl = this.ultraTextEditor4;
- ultraGridColumn39.Format = "*";
- ultraGridColumn39.Header.Caption = "登录密码";
- ultraGridColumn39.Header.VisiblePosition = 1;
- ultraGridColumn39.Width = 80;
- ultraGridColumn40.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn40.Header.Caption = "部门";
- ultraGridColumn40.Header.VisiblePosition = 3;
- ultraGridColumn40.Width = 150;
- ultraGridColumn41.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn41.Header.Caption = "岗位";
- ultraGridColumn41.Header.VisiblePosition = 4;
- ultraGridColumn41.Width = 100;
- ultraGridColumn42.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
- ultraGridColumn42.Header.Caption = "角色描述";
- ultraGridColumn42.Header.VisiblePosition = 6;
- ultraGridColumn42.Width = 300;
- ultraGridBand6.Columns.AddRange(new object[] {
- ultraGridColumn36,
- ultraGridColumn37,
- ultraGridColumn38,
- ultraGridColumn39,
- ultraGridColumn40,
- ultraGridColumn41,
- ultraGridColumn42});
- this.ultraGrid1.DisplayLayout.BandsSerializer.Add(ultraGridBand6);
- this.ultraGrid1.DisplayLayout.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- this.ultraGrid1.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.False;
- appearance123.BackColor = System.Drawing.SystemColors.ActiveBorder;
- appearance123.BackColor2 = System.Drawing.SystemColors.ControlDark;
- appearance123.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical;
- appearance123.BorderColor = System.Drawing.SystemColors.Window;
- this.ultraGrid1.DisplayLayout.GroupByBox.Appearance = appearance123;
- appearance124.ForeColor = System.Drawing.SystemColors.GrayText;
- this.ultraGrid1.DisplayLayout.GroupByBox.BandLabelAppearance = appearance124;
- this.ultraGrid1.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
- this.ultraGrid1.DisplayLayout.GroupByBox.Hidden = true;
- appearance125.BackColor = System.Drawing.SystemColors.ControlLightLight;
- appearance125.BackColor2 = System.Drawing.SystemColors.Control;
- appearance125.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
- appearance125.ForeColor = System.Drawing.SystemColors.GrayText;
- this.ultraGrid1.DisplayLayout.GroupByBox.PromptAppearance = appearance125;
- this.ultraGrid1.DisplayLayout.MaxColScrollRegions = 1;
- this.ultraGrid1.DisplayLayout.MaxRowScrollRegions = 1;
- appearance126.BackColor = System.Drawing.SystemColors.Window;
- appearance126.ForeColor = System.Drawing.SystemColors.ControlText;
- this.ultraGrid1.DisplayLayout.Override.ActiveCellAppearance = appearance126;
- appearance127.BackColor = System.Drawing.SystemColors.Highlight;
- appearance127.ForeColor = System.Drawing.SystemColors.HighlightText;
- this.ultraGrid1.DisplayLayout.Override.ActiveRowAppearance = appearance127;
- this.ultraGrid1.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.RaisedSoft;
- this.ultraGrid1.DisplayLayout.Override.BorderStyleRow = Infragistics.Win.UIElementBorderStyle.Dotted;
- appearance128.BackColor = System.Drawing.SystemColors.Window;
- this.ultraGrid1.DisplayLayout.Override.CardAreaAppearance = appearance128;
- appearance129.BorderColor = System.Drawing.Color.Silver;
- appearance129.TextTrimming = Infragistics.Win.TextTrimming.EllipsisCharacter;
- this.ultraGrid1.DisplayLayout.Override.CellAppearance = appearance129;
- this.ultraGrid1.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText;
- this.ultraGrid1.DisplayLayout.Override.CellPadding = 0;
- appearance130.BackColor = System.Drawing.SystemColors.Control;
- appearance130.BackColor2 = System.Drawing.SystemColors.ControlDark;
- appearance130.BackGradientAlignment = Infragistics.Win.GradientAlignment.Element;
- appearance130.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
- appearance130.BorderColor = System.Drawing.SystemColors.Window;
- this.ultraGrid1.DisplayLayout.Override.GroupByRowAppearance = appearance130;
- appearance131.BackColor = System.Drawing.Color.LightSteelBlue;
- appearance131.TextHAlign = Infragistics.Win.HAlign.Center;
- this.ultraGrid1.DisplayLayout.Override.HeaderAppearance = appearance131;
- 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;
- appearance132.BackColor = System.Drawing.SystemColors.Window;
- appearance132.BorderColor = System.Drawing.Color.Silver;
- this.ultraGrid1.DisplayLayout.Override.RowAppearance = appearance132;
- appearance133.BackColor = System.Drawing.Color.LightSteelBlue;
- this.ultraGrid1.DisplayLayout.Override.RowSelectorAppearance = appearance133;
- 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;
- appearance134.BackColor = System.Drawing.SystemColors.ControlLight;
- this.ultraGrid1.DisplayLayout.Override.TemplateAddRowAppearance = appearance134;
- 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, 80);
- this.ultraGrid1.Name = "ultraGrid1";
- this.ultraGrid1.Size = new System.Drawing.Size(927, 317);
- this.ultraGrid1.TabIndex = 1;
- this.ultraGrid1.Text = "ultraGrid1";
- this.ultraGrid1.AfterRowActivate += new System.EventHandler(this.ultraGrid1_AfterRowActivate);
- //
- // ultraExpandableGroupBox1
- //
- this.ultraExpandableGroupBox1.BackColor = System.Drawing.Color.Gainsboro;
- this.ultraExpandableGroupBox1.Controls.Add(this.ultraExpandableGroupBoxPanel1);
- this.ultraExpandableGroupBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.ultraExpandableGroupBox1.ExpandedSize = new System.Drawing.Size(704, 112);
- this.ultraExpandableGroupBox1.Location = new System.Drawing.Point(0, 397);
- this.ultraExpandableGroupBox1.Name = "ultraExpandableGroupBox1";
- this.ultraExpandableGroupBox1.Size = new System.Drawing.Size(927, 112);
- 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(923, 88);
- this.ultraExpandableGroupBoxPanel1.TabIndex = 0;
- //
- // panel3
- //
- this.panel3.Controls.Add(this.ultraLabel5);
- this.panel3.Controls.Add(this.ultraComboEditor3);
- this.panel3.Controls.Add(this.ultraTextEditor4);
- this.panel3.Controls.Add(this.ultraComboEditor2);
- this.panel3.Controls.Add(this.ultraTextEditor2);
- this.panel3.Controls.Add(this.ultraLabel4);
- this.panel3.Controls.Add(this.ultraLabel3);
- this.panel3.Controls.Add(this.ultraLabel2);
- this.panel3.Controls.Add(this.ultraLabel1);
- this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel3.Location = new System.Drawing.Point(0, 0);
- this.panel3.Name = "panel3";
- this.panel3.Size = new System.Drawing.Size(923, 88);
- this.panel3.TabIndex = 0;
- //
- // ultraLabel5
- //
- this.ultraLabel5.Location = new System.Drawing.Point(665, 28);
- this.ultraLabel5.Name = "ultraLabel5";
- this.ultraLabel5.Size = new System.Drawing.Size(54, 16);
- this.ultraLabel5.TabIndex = 17;
- this.ultraLabel5.Text = "登录密码";
- this.ultraLabel5.Visible = false;
- //
- // ultraComboEditor3
- //
- appearance135.BackColor = System.Drawing.Color.LightCyan;
- this.ultraComboEditor3.Appearance = appearance135;
- this.ultraComboEditor3.AutoSize = true;
- editorButton16.Key = "part";
- editorButton16.Text = "...";
- this.ultraComboEditor3.ButtonsRight.Add(editorButton16);
- this.ultraComboEditor3.DropDownButtonDisplayStyle = Infragistics.Win.ButtonDisplayStyle.Never;
- this.ultraComboEditor3.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
- this.ultraComboEditor3.FlatMode = true;
- this.ultraComboEditor3.Location = new System.Drawing.Point(168, 56);
- this.ultraComboEditor3.Name = "ultraComboEditor3";
- this.ultraComboEditor3.Size = new System.Drawing.Size(152, 19);
- this.ultraComboEditor3.TabIndex = 16;
- this.ultraComboEditor3.SelectionChanged += new System.EventHandler(this.ultraComboEditor3_SelectionChanged);
- this.ultraComboEditor3.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.ultraComboEditor3_EditorButtonClick_1);
- //
- // ultraComboEditor2
- //
- appearance136.BackColor = System.Drawing.Color.LightCyan;
- this.ultraComboEditor2.Appearance = appearance136;
- this.ultraComboEditor2.AutoSize = true;
- this.ultraComboEditor2.FlatMode = true;
- this.ultraComboEditor2.Location = new System.Drawing.Point(422, 56);
- this.ultraComboEditor2.Name = "ultraComboEditor2";
- this.ultraComboEditor2.Size = new System.Drawing.Size(224, 19);
- this.ultraComboEditor2.TabIndex = 14;
- //
- // ultraTextEditor2
- //
- appearance137.BackColor = System.Drawing.Color.LightCyan;
- this.ultraTextEditor2.Appearance = appearance137;
- this.ultraTextEditor2.AutoSize = true;
- this.ultraTextEditor2.BackColor = System.Drawing.Color.LightCyan;
- this.ultraTextEditor2.FlatMode = true;
- this.ultraTextEditor2.Location = new System.Drawing.Point(168, 23);
- this.ultraTextEditor2.Name = "ultraTextEditor2";
- this.ultraTextEditor2.Size = new System.Drawing.Size(152, 19);
- this.ultraTextEditor2.TabIndex = 13;
- //
- // ultraLabel4
- //
- this.ultraLabel4.Location = new System.Drawing.Point(364, 24);
- this.ultraLabel4.Name = "ultraLabel4";
- this.ultraLabel4.Size = new System.Drawing.Size(54, 16);
- this.ultraLabel4.TabIndex = 12;
- this.ultraLabel4.Text = "登录密码";
- //
- // ultraLabel3
- //
- this.ultraLabel3.Location = new System.Drawing.Point(110, 57);
- this.ultraLabel3.Name = "ultraLabel3";
- this.ultraLabel3.Size = new System.Drawing.Size(54, 16);
- this.ultraLabel3.TabIndex = 11;
- this.ultraLabel3.Text = "用户姓名";
- //
- // ultraLabel2
- //
- appearance138.BackColor = System.Drawing.Color.Gainsboro;
- this.ultraLabel2.Appearance = appearance138;
- this.ultraLabel2.Location = new System.Drawing.Point(389, 57);
- this.ultraLabel2.Name = "ultraLabel2";
- this.ultraLabel2.Size = new System.Drawing.Size(29, 16);
- this.ultraLabel2.TabIndex = 10;
- this.ultraLabel2.Text = "角色";
- //
- // ultraLabel1
- //
- appearance139.BackColor = System.Drawing.Color.Gainsboro;
- this.ultraLabel1.Appearance = appearance139;
- this.ultraLabel1.Location = new System.Drawing.Point(110, 24);
- this.ultraLabel1.Name = "ultraLabel1";
- this.ultraLabel1.Size = new System.Drawing.Size(54, 16);
- this.ultraLabel1.TabIndex = 9;
- this.ultraLabel1.Text = "登录帐号";
- //
- // panel2
- //
- this.panel2.BackColor = System.Drawing.Color.Gainsboro;
- this.panel2.Controls.Add(this.ultLoginID);
- this.panel2.Controls.Add(this.ultraLabel6);
- this.panel2.Controls.Add(this.ultraButton2);
- this.panel2.Controls.Add(this.ultraButton1);
- this.panel2.Controls.Add(this.ultraComboEditor1);
- this.panel2.Controls.Add(this.ultraCheckEditor2);
- this.panel2.Controls.Add(this.ultraTextEditor1);
- this.panel2.Controls.Add(this.ultraCheckEditor1);
- 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(927, 48);
- this.panel2.TabIndex = 2;
- //
- // ultraButton2
- //
- this.ultraButton2.Location = new System.Drawing.Point(571, 17);
- this.ultraButton2.Name = "ultraButton2";
- this.ultraButton2.Size = new System.Drawing.Size(29, 19);
- this.ultraButton2.TabIndex = 5;
- this.ultraButton2.Text = ">>";
- this.toolTip1.SetToolTip(this.ultraButton2, "角色维护");
- this.ultraButton2.Click += new System.EventHandler(this.ultraButton2_Click);
- //
- // ultraButton1
- //
- this.ultraButton1.Location = new System.Drawing.Point(272, 17);
- this.ultraButton1.Name = "ultraButton1";
- this.ultraButton1.Size = new System.Drawing.Size(29, 19);
- 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);
- //
- // ultraComboEditor1
- //
- appearance140.BackColor = System.Drawing.Color.LightCyan;
- this.ultraComboEditor1.Appearance = appearance140;
- this.ultraComboEditor1.AutoSize = true;
- this.ultraComboEditor1.Enabled = false;
- this.ultraComboEditor1.FlatMode = true;
- this.ultraComboEditor1.Location = new System.Drawing.Point(387, 17);
- this.ultraComboEditor1.Name = "ultraComboEditor1";
- this.ultraComboEditor1.Size = new System.Drawing.Size(182, 19);
- this.ultraComboEditor1.TabIndex = 4;
- //
- // ultraCheckEditor2
- //
- this.ultraCheckEditor2.Location = new System.Drawing.Point(331, 17);
- this.ultraCheckEditor2.Name = "ultraCheckEditor2";
- this.ultraCheckEditor2.Size = new System.Drawing.Size(48, 20);
- this.ultraCheckEditor2.TabIndex = 3;
- this.ultraCheckEditor2.Text = "角色";
- this.ultraCheckEditor2.CheckedChanged += new System.EventHandler(this.ultraCheckEditor2_CheckedChanged);
- //
- // ultraTextEditor1
- //
- appearance141.BackColor = System.Drawing.Color.LightCyan;
- this.ultraTextEditor1.Appearance = appearance141;
- this.ultraTextEditor1.AutoSize = true;
- this.ultraTextEditor1.BackColor = System.Drawing.Color.LightCyan;
- editorButton17.ButtonStyle = Infragistics.Win.UIElementButtonStyle.VisualStudio2005Button;
- editorButton17.Key = "part";
- editorButton17.Text = "…";
- this.ultraTextEditor1.ButtonsRight.Add(editorButton17);
- this.ultraTextEditor1.Enabled = false;
- this.ultraTextEditor1.FlatMode = true;
- this.ultraTextEditor1.Location = new System.Drawing.Point(88, 17);
- this.ultraTextEditor1.Name = "ultraTextEditor1";
- this.ultraTextEditor1.ReadOnly = true;
- this.ultraTextEditor1.Size = new System.Drawing.Size(182, 19);
- this.ultraTextEditor1.TabIndex = 1;
- this.ultraTextEditor1.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.ultraTextEditor1_EditorButtonClick_1);
- //
- // ultraCheckEditor1
- //
- this.ultraCheckEditor1.Location = new System.Drawing.Point(32, 17);
- 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);
- //
- // ultLoginID
- //
- appearance142.BackColor = System.Drawing.Color.LightCyan;
- this.ultLoginID.Appearance = appearance142;
- this.ultLoginID.AutoSize = true;
- this.ultLoginID.BackColor = System.Drawing.Color.LightCyan;
- appearance143.TextHAlign = Infragistics.Win.HAlign.Center;
- appearance143.TextVAlign = Infragistics.Win.VAlign.Middle;
- editorButton18.Appearance = appearance143;
- editorButton18.ButtonStyle = Infragistics.Win.UIElementButtonStyle.VisualStudio2005Button;
- editorButton18.Key = "SET";
- editorButton18.Text = "";
- this.ultLoginID.ButtonsRight.Add(editorButton18);
- this.ultLoginID.FlatMode = true;
- this.ultLoginID.Location = new System.Drawing.Point(688, 17);
- this.ultLoginID.Name = "ultLoginID";
- this.ultLoginID.Size = new System.Drawing.Size(152, 19);
- this.ultLoginID.TabIndex = 6;
- this.ultLoginID.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.ultLoginID_EditorButtonClick);
- //
- // ultraLabel6
- //
- appearance144.BackColor = System.Drawing.Color.Gainsboro;
- this.ultraLabel6.Appearance = appearance144;
- this.ultraLabel6.Location = new System.Drawing.Point(630, 21);
- this.ultraLabel6.Name = "ultraLabel6";
- this.ultraLabel6.Size = new System.Drawing.Size(54, 16);
- this.ultraLabel6.TabIndex = 0;
- this.ultraLabel6.Text = "登录帐号";
- //
- // FrmAuthorization
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
- this.ClientSize = new System.Drawing.Size(927, 509);
- this.Controls.Add(this.FrmAuthorization_Fill_Panel);
- this.Name = "FrmAuthorization";
- this.Text = "FrmAuthorization";
- this.Load += new System.EventHandler(this.FrmAuthorization_Load);
- ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor4)).EndInit();
- this.panel1.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).EndInit();
- this.FrmAuthorization_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.ultraComboEditor3)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor2)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor2)).EndInit();
- this.panel2.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor1)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.ultLoginID)).EndInit();
- this.ResumeLayout(false);
- }
- #endregion
- #region " Variable "
- private DataSet _departmentData;
- public TreeView _departmentTree;
- private string _selectPartSQL;
- private DataSet _roleData;
- private string _selectRoleSQL;
- private DataSet _auData;
- private string _selectAuSQL;
- private DataSet _userData;
- DataSet _validUserData;
- private DataSet _fitRole;
- private string userid;
- private string roleid;
- private bool IsAdminFlag = false;
- public string StrUser = "";
- public string operDepart = "";
- public string operDepartname = "";
- public string allDept = "";
- public string selDept = "";
- public string SelComboDept = "";
- #endregion
- private void FrmAuthorization_Load(object sender, System.EventArgs e)
- {
- try
- {
- StrUser = Core.Mes.ClientFrameWork.ClientCommon._UserInfo.UserName;
- GetUserData();
- GetDepartmentData();
- GetOperDepart();
- GetChildDept();
- GetFitRole();
- GetValidUserData();
- GetRoleDataSet();
- InitCombo();
- GetAuData();
- ultraCheckEditor1.CheckedValue = true;
- ultraTextEditor1.Enabled = true;
- ultraTextEditor1.Text = operDepartname;
- ultraTextEditor1.Tag = allDept;
- InitGrid();
- //InitRoleCombo();
- // GetCombo3Dept();
- IsAdminFlag = CheckRoleID();
- if (operDepart == "ROOT")
- {
- ultraButton1.Visible = true;
- ultraButton2.Visible = true;
- }
- }
- catch(System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private DataSet GetUserData()
- {
- try
- {
- string str = "";
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "SelectUAM_USER";
- par.args = new object[] { str };
- string strOut = "";
- _userData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
- return _userData;
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- return null;
- }
- }
- private DataSet GetValidUserData()
- {
- try
- {
- string str = "";
- if (operDepart != "ROOT")
- str = " where DEPARTMENTID in (" + allDept + ") order by 1";
- else
- str = " order by 1";
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "SelectUAM_USER";
- par.args = new object[] { str };
- string strOut = "";
- _validUserData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
- return _validUserData;
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- return null;
- }
- }
- 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[] { "" };
- string strOut = "";
- _departmentData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
- _selectPartSQL = strOut;
- }
- catch(System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void GetRoleDataSet()
- {
- try
- {
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "SelectUAM_ROLE";
- par.args = new object[] { " order by roleid" };
- string strOut = "";
- _roleData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
- _selectRoleSQL = strOut;
- }
- catch(System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void GetCombo3Dept()
- {
- 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() == this.ultraComboEditor3.Text.ToString())
- {
- SelComboDept = dr["DEPARTMENTID"].ToString();
- }
- }
- }
- }
- catch(System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- SelComboDept = "";
- }
- }
- private void GetFitRole()
- {
- try
- {
- string str = "";
- if (operDepart != "ROOT")
- str = " where DEPARTMENTID in (" + allDept + ") order by roleid";
- else
- str = " order by roleid";
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "SelectUAM_ROLE";
- par.args = new object[] { str };
- string strOut = "";
- _fitRole = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
- }
- catch(System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void InitCombo()
- {
- if (_validUserData != null && _validUserData.Tables.Count > 0)
- {
- ultraComboEditor3.Items.Clear();
- foreach (DataRow arow in (_validUserData).Tables[0].Rows)
- ultraComboEditor3.Items.Add(arow[0], arow[2].ToString());
- }
- if (_fitRole != null && _fitRole.Tables.Count > 0)
- {
- ultraComboEditor1.Items.Clear();
- ultraComboEditor2.Items.Clear();
- foreach (DataRow arow in (_fitRole).Tables[0].Rows)
- {
- ultraComboEditor1.Items.Add(arow[0], arow[1].ToString());
- ultraComboEditor2.Items.Add(arow[0], arow[1].ToString());
- }
- }
- }
- 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();
- DataTable dn = this._departmentData.Tables[0].Copy();
- foreach (DataRow dm in dn.Rows)
- {
- if (dm["DEPARTMENTID"].ToString() == operDepart)
- {
- operDepartname = dm["DEPARTMENTNAME"].ToString();
- }
- }
- }
- }
- }
- }
- catch(System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void InitGrid()
- {
- // InitRoleCombo();
- GetPartData();
- GetUserDataInGrid();
- this.ultraCheckEditor1.CheckedValue = true;
- this.ultraTextEditor1.Enabled = true;
- this.ultraTextEditor1.Text = operDepartname;
- this.ultraTextEditor1.Tag = allDept;
- Query();
- // this.ultraGrid1.DataSource =this.ultraDataSource1 ;
- // ultraGrid1.DataSource = ((DataSet)_auData).Tables[0];
- this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].ValueList = ultraGrid1.DisplayLayout.ValueLists["name"];
- this.ultraGrid1.DisplayLayout.Bands[0].Columns["ROLEID"].ValueList = ultraGrid1.DisplayLayout.ValueLists["role"];
- ultraGrid1.DisplayLayout.Bands[0].Columns["DEPARTMENTID"].ValueList = ultraGrid1.DisplayLayout.ValueLists["department"];
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["LOGINID"].Header.Caption = "登录帐号";
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["LOGINID"].Width = 80;
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["LOGINID"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["LOGINID"].CellActivation = Activation.NoEdit;
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["LOGINID"].CellAppearance.BackColor = Color.LightGoldenrodYellow;
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["ROLEID"].Header.Caption = "角色";
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["ROLEID"].Width = 200;
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["ROLEID"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["ROLEID"].CellActivation = Activation.NoEdit;
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Default;
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Default;
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Default;
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Default;
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].Header.Caption = "用户姓名";
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].Width = 100;
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].CellActivation = Activation.NoEdit;
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["USERID"].CellAppearance.BackColor = Color.LightGoldenrodYellow;
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["PASSWD"].Header.Caption = "登录密码";
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["PASSWD"].Width = 100;
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["PASSWD"].CellAppearance.TextHAlign = Infragistics.Win.HAlign.Left;
- //this.ultraGrid1.DisplayLayout.Bands[0].Columns["PASSWD"].CellActivation = Activation.NoEdit;
- }
- private void InitRoleCombo()
- {
- if (_userData != null && _userData.Tables.Count > 0)
- {
- DataTable dt = _userData.Tables[0].Copy();
- foreach (DataRow dr in dt.Rows)
- {
- try
- {
- this.ultraComboEditor3.Items.Add(dr["USERID"], dr["NAME"].ToString());
- }
- catch(System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- }
- }
- private void GetAuData()
- {
- try
- {
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "SelectUAM_AUTHORIZATION";
- par.args = new object[] { " order by loginID" };
- string strOut = "";
- _auData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
- _selectAuSQL = strOut;
- }
- catch(System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void GetPartData()
- {
- if (ultraGrid1.DisplayLayout.ValueLists.Exists("role"))
- {
- ultraGrid1.DisplayLayout.ValueLists["role"].ValueListItems.Clear();
- }
- else
- {
- ultraGrid1.DisplayLayout.ValueLists.Add("role");
- }
- foreach (DataRow dr in this._roleData.Tables[0].Rows)
- {
- Infragistics.Win.ValueListItem vli = new Infragistics.Win.ValueListItem();
- vli.DisplayText = dr["ROLENAME"].ToString();
- vli.DataValue = dr["ROLEID"];
- ultraGrid1.DisplayLayout.ValueLists["role"].ValueListItems.Add(vli);
- }
- if (ultraGrid1.DisplayLayout.ValueLists.Exists("department"))
- {
- ultraGrid1.DisplayLayout.ValueLists["department"].ValueListItems.Clear();
- }
- else
- {
- ultraGrid1.DisplayLayout.ValueLists.Add("department");
- }
- foreach (DataRow dr in this._departmentData.Tables[0].Rows)
- {
- Infragistics.Win.ValueListItem vli = new Infragistics.Win.ValueListItem();
- vli.DisplayText = dr["DEPARTMENTNAME"].ToString();
- vli.DataValue = dr["DEPARTMENTID"];
- ultraGrid1.DisplayLayout.ValueLists["department"].ValueListItems.Add(vli);
- }
- }
- private void GetUserDataInGrid()
- {
- if (ultraGrid1.DisplayLayout.ValueLists.Exists("name"))
- {
- ultraGrid1.DisplayLayout.ValueLists["name"].ValueListItems.Clear();
- }
- else
- {
- ultraGrid1.DisplayLayout.ValueLists.Add("name");
- }
- foreach (DataRow dr in this._userData.Tables[0].Rows)
- {
- Infragistics.Win.ValueListItem vli = new Infragistics.Win.ValueListItem();
- vli.DisplayText = dr["NAME"].ToString();
- vli.DataValue = dr["USERID"];
- ultraGrid1.DisplayLayout.ValueLists["name"].ValueListItems.Add(vli);
- }
- }
- private void ultraGrid1_AfterRowActivate(object sender, System.EventArgs e)
- {
- try
- {
- if (this.ultraGrid1.ActiveRow == null) return;
- UltraGridRow ugr = this.ultraGrid1.ActiveRow;
- this.ultraTextEditor2.Text = ugr.Cells[0].Value.ToString();
- this.ultraTextEditor4.Text = ugr.Cells[3].Value.ToString();
- //Usering();
- //Roleing();
- ultraComboEditor3.Value = ugr.Cells[2].Value.ToString();
- ultraComboEditor2.Value = ugr.Cells[1].Value.ToString();
- }
- catch (Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void Usering()
- {
- UltraGridRow ugr = this.ultraGrid1.ActiveRow;
- if (_userData != null && _userData.Tables.Count > 0)
- {
- for (int i = 0; i < _userData.Tables[0].Rows.Count; i++)
- {
- if (_userData.Tables[0].Rows[i][0].ToString() == ugr.Cells[2].Value.ToString())
- {
- this.ultraComboEditor3.Value = (_userData).Tables[0].Rows[i][2];
- return;
- }
- }
- }
- }
- private void Userid()
- {
- if (_userData != null && _userData.Tables.Count > 0)
- {
- for (int i = 0; i < _userData.Tables[0].Rows.Count; i++)
- {
- if (_userData.Tables[0].Rows[i]["NAME"].ToString() == this.ultraComboEditor3.Text.ToString())
- {
- userid = (_userData).Tables[0].Rows[i]["USERID"].ToString();
- return;
- }
- }
- }
- }
- private void Roleing()
- {
- UltraGridRow ugr = this.ultraGrid1.ActiveRow;
- if (_roleData != null && _roleData.Tables.Count > 0)
- {
- for (int i = 0; i < _roleData.Tables[0].Rows.Count; i++)
- {
- if (_roleData.Tables[0].Rows[i]["ROLEID"].ToString() == ugr.Cells[1].Value.ToString())
- {
- this.ultraComboEditor2.Value = (_roleData).Tables[0].Rows[i]["ROLENAME"];
- return;
- }
- }
- }
- }
- private void Roleid()
- {
- if (_roleData != null && _roleData.Tables.Count > 0)
- {
- for (int i = 0; i < _roleData.Tables[0].Rows.Count; i++)
- {
- if (_roleData.Tables[0].Rows[i]["ROLENAME"].ToString() == this.ultraComboEditor2.Value.ToString())
- {
- roleid = (_roleData).Tables[0].Rows[i]["ROLEID"].ToString();
- return;
- }
- }
- }
- }
- #region 工具栏操作
- private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
- {
- switch (e.Tool.Key)
- {
- case "add":
- Add();
- break;
- case "del":
- Del();
- break;
- case "edit":
- Edit();
- break;
- case "query":
- Query();
- break;
- case "close":
- this.Close();
- break;
- case "back":
- this.ultraToolbarsManager1.Toolbars[0].Tools["back"].SharedProps.Visible = false;
- // RefreshData1("");
- // ultraCheckEditor1.Checked = false;
- // ultraTextEditor1.Text = "";
- // ultraCheckEditor2.Checked = false;
- // ultraComboEditor1.Text = "";
- this.ultraCheckEditor1.CheckedValue = true;
- this.ultraCheckEditor2.CheckedValue = false;
- if (ultLoginID.Text.Trim().Length > 0)
- {
- ultLoginID.Tag = ultLoginID.Text.Trim();
- ultLoginID.Text = "";
- }
- this.ultraTextEditor1.Enabled = true;
- this.ultraTextEditor1.Text = operDepartname;
- this.ultraTextEditor1.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()
- {
- // try
- // {
- if (this.ultraTextEditor2.Text.Trim() == "")
- {
- MessageBox.Show("请输入登录帐号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (this.ultraComboEditor2.Value == null)
- {
- MessageBox.Show("请选择角色!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (this.ultraComboEditor3.Value == null)
- {
- MessageBox.Show("请选择用户!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- GetCombo3Dept();
- if (operDepart != "ROOT")
- {
- if (allDept.IndexOf("'" + SelComboDept + "'") < 0)
- {
- MessageBox.Show("你没有配置该用户的权限,请重新选择!");
- return;
- }
- }
- if (this.ultraTextEditor4.Text.Trim() == "")
- {
- MessageBox.Show("请输入登录密码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- Roleid();
- Userid();
- ArrayList al = new ArrayList();
- al.Add(this.ultraTextEditor2.Text.Trim());
- al.Add(ultraComboEditor2.Value.ToString().Trim());
- al.Add(ultraComboEditor3.Value.ToString().Trim());
- // al.Add(this.ultraComboEditor3 .Value .ToString ());
- al.Add(this.ultraTextEditor4.Text.Trim());
- try
- {
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- // par.AssemblyName = "Core.Mes.PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "InsertUAM_AUTHORIZATION";
- par.args = new object[] { al };
- par.ServerType = MesServerType.MesSystemBaseServer;
- 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(System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- return;
- }
- this.GetDepartmentData();
- UltraGridRow ugr = this.ultraGrid1.DisplayLayout.Bands[0].AddNew();
- ugr.Cells["LOGINID"].Value = al[0];
- ugr.Cells["ROLEID"].Value = al[1];
- ugr.Cells["USERID"].Value = al[2];
- ugr.Cells["PASSWD"].Value = al[3];
- foreach (DataRow drow in _userData.Tables[0].Rows)
- {
- if (drow["USERID"].ToString() == al[2].ToString())
- {
- ugr.Cells["DEPARTMENTID"].Value = drow["DEPARTMENTID"].ToString();
- ugr.Cells["WORKPOS"].Value = drow["WORKPOS"].ToString();
- break;
- }
- }
- foreach (DataRow drow in _roleData.Tables[0].Rows)
- {
- if (drow["ROLEID"].ToString() == al[1].ToString())
- {
- ugr.Cells["ROLEMEMO"].Value = drow["MEMO"].ToString();
- break;
- }
- }
- this.ultraGrid1.Update();
- // }
- // catch
- // {}
- }
- private void Del()
- {
- int i = 0;
- UltraGridRow ugr = this.ultraGrid1.ActiveRow;
- if (ugr == null)
- {
- MessageBox.Show("请选择要删除的帐户!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- GetCombo3Dept();
- if (operDepart != "ROOT")
- {
- if (allDept.IndexOf("'" + SelComboDept + "'") < 0)
- {
- MessageBox.Show("你没有删除该帐户的权限,请重新选择!");
- return;
- }
- }
- if (MessageBox.Show("是否确认删除选中的帐户?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
- {
- return;
- }
- try
- {
- i = ugr.Index;
- string strWhere = " where LOGINID = '" + ugr.Cells[0].Value.ToString() + "'";
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "DeleteUAM_AUTHORIZATION";
- par.args = new object[] { strWhere };
- 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(System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- return;
- }
- ultraGrid1.ActiveRow.Delete(false);
- ultraGrid1.UpdateData();
- try
- {
- ultraGrid1.Rows[i].Activate();
- }
- catch
- {
- int count = ultraGrid1.Rows.Count;
- if (count > 0)
- ultraGrid1.Rows[count - 1].Activate();
- }
- }
- private void Edit()
- {
- try
- {
- UltraGridRow ugr = this.ultraGrid1.ActiveRow;
- if (ugr == null)
- {
- MessageBox.Show("请选择要修改的用户!");
- return;
- }
- if (this.ultraTextEditor2.Text.Trim() != ugr.Cells["LOGINID"].Text.Trim())
- {
- MessageBox.Show("不能修改登录帐号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (this.ultraComboEditor2.Value == null)
- {
- MessageBox.Show("请选择角色!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (this.ultraComboEditor3.Value == null)
- {
- MessageBox.Show("请选择用户!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- if (this.ultraTextEditor4.Text.Trim() == "")
- {
- MessageBox.Show("请输入登录密码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- return;
- }
- GetCombo3Dept();
- if (allDept.IndexOf("'" + SelComboDept + "'") < 0 && operDepart != "ROOT")
- {
- MessageBox.Show("你没有配置这一部门用户的权限,请重新选择!");
- return;
- }
- Roleid();
- Userid();
- ArrayList al = new ArrayList();
- al.Add(this.ultraTextEditor2.Text.Trim());
- al.Add(ultraComboEditor2.Value.ToString());
- al.Add(userid.Trim());
- al.Add(this.ultraTextEditor4.Text.Trim());
- try
- {
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "UpdateUAM_AUTHORIZATION";
- 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(System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- return;
- }
- ugr.Cells["LOGINID"].Value = al[0];
- ugr.Cells["ROLEID"].Value = al[1];
- ugr.Cells["USERID"].Value = al[2];
- ugr.Cells["PASSWD"].Value = al[3];
- foreach (DataRow drow in _userData.Tables[0].Rows)
- {
- if (drow["USERID"].ToString() == al[2].ToString())
- {
- ugr.Cells["DEPARTMENTID"].Value = drow["DEPARTMENTID"].ToString();
- ugr.Cells["WORKPOS"].Value = drow["WORKPOS"].ToString();
- break;
- }
- }
- foreach (DataRow drow in _roleData.Tables[0].Rows)
- {
- if (drow["ROLEID"].ToString() == al[1].ToString())
- {
- ugr.Cells["ROLEMEMO"].Value = drow["MEMO"].ToString();
- break;
- }
- }
- ultraGrid1.UpdateData();
- }
- catch(System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void Query()
- {
- if ((this.ultraCheckEditor1.Checked && this.ultraTextEditor1.Text != "") ||
- (this.ultraCheckEditor2.Checked && this.ultraComboEditor1.Text != "") ||
- (this.ultLoginID.Text.Trim().Length > 0))
- {
- if (this.ultraCheckEditor1.Checked && this.ultraTextEditor1.Text != "")
- {
- GetSelDept();
- if (selDept == "ROOT")
- {
- if (operDepart != "ROOT")
- {
- MessageBox.Show("你没有查看整个公司的权限,请重新选择!");
- return;
- }
- }
- if (operDepart != "ROOT" && allDept.IndexOf("'" + selDept + "'") < 0)
- {
- MessageBox.Show("你没有查看这一部门的权限,请重新选择!");
- return;
- }
- }
- RefreshGrid();
- this.ultraToolbarsManager1.Toolbars[0].Tools["back"].SharedProps.Visible = true;
- }
- else
- MessageBox.Show("请选择要查询的部门、角色或帐号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
- }
- //private void RefreshData1(string str)
- //{
- // try
- // {
- // CallingMessage par = new CallingMessage();
- // par.ServerName = "PurviewManager";
- // par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- // par.MethodName = "SelectUAM_AUTHORIZATION";
- // par.args = new object[]{str};
- // string strOut = "";
- // _auData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
- // _selectAuSQL = strOut;
- // }
- // catch
- // {
- // }
- // this.ultraGrid1.DataSource=_auData.Tables[0];
- // ultraGrid1.UpdateData();
- //}
- private void RefreshGrid()
- {
- string str = "";
- str = GetRefreshWhere();
- //str = " where " + str + " order by loginID";
- try
- {
- CallingMessage par = new CallingMessage();
- par.ServerName = "PurviewManager";
- par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
- par.MethodName = "GetUAM_AUTHORIZATION";
- par.args = new object[] { str };
- string strOut = "";
- _auData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
- _selectAuSQL = strOut;
- }
- catch(System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- /* try
- {
- this._auData.Tables[0].DefaultView.RowFilter = GetRefreshWhere();
- }
- catch
- {
- this._auData.Tables[0].DefaultView.RowFilter = "1=2";
- }
- */
- this.ultraGrid1.DataSource = _auData.Tables[0];
- ultraGrid1.UpdateData();
- }
- private string GetRefreshWhere()
- {
- string sqlstr = "";
- if (this.ultraTextEditor1.Enabled && this.ultraCheckEditor1.Checked && this.ultraTextEditor1.Text != "" && ultraTextEditor1.Tag.ToString().Length>0)
- {
- sqlstr += "AND B.DEPARTMENTID IN (" + this.ultraTextEditor1.Tag + ")";
- //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.ultraComboEditor1.Enabled && this.ultraCheckEditor2.Checked && this.ultraComboEditor1.Text != "")
- {
- sqlstr += " AND A.ROLEID = '" + this.ultraComboEditor1.Value.ToString() + "'";
- }
- if (this.ultLoginID.Text.Trim().Length > 0)
- {
- sqlstr += " AND A.LOGINID = '" + this.ultLoginID.Text.Trim() + "'";
- }
- return sqlstr;
- }
- private void roling_c1()
- {
- if (_roleData != null && _roleData.Tables.Count > 0)
- {
- for (int i = 0; i < _roleData.Tables[0].Rows.Count; i++)
- {
- if (_roleData.Tables[0].Rows[i]["ROLENAME"].ToString() == this.ultraComboEditor1.Value.ToString())
- {
- this.ultraComboEditor1.Value = (_roleData).Tables[0].Rows[i]["ROLEID"];
- return;
- }
- }
- }
- }
- private ArrayList GetUserID()
- {
- ArrayList al = new ArrayList();
- DataTable dt = null;
- if (this._userData == null && this.GetUserData() == null)
- dt = null;
- else
- dt = this._userData.Tables[0];
- if (dt != null)
- {
- if (this.ultraTextEditor1.Enabled && this.ultraTextEditor1.Tag != null)
- {
- string partid = this.ultraTextEditor1.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;
- }
- #endregion
- private bool CheckRoleID()
- {
- try
- {
- string userid = Core.Mes.ClientFrameWork.ClientCommon._UserInfo.LoginID;
- DataRow[] drs = this._auData.Tables[0].Select("LOGINID = '" + userid + "'");
- if (drs.Length > 0)
- {
- if (drs[0]["ROLEID"].ToString() == "001")
- {
- return true;
- }
- }
- }
- catch(System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- return false;
- }
- 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 ultraComboEditor3_EditorButtonClick_1(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- FrmSelUserID frm = new FrmSelUserID();
- frm._departmentData = this._departmentData;
- frm._userData = this._userData;
- frm.Location = this.GetChildWindowLocation(frm.Size);
- frm.ShowDialog();
- if (frm._changFlag)
- {
- this.ultraComboEditor3.Value = frm._currSelectID;
- }
- // if (_userData != null && _userData.Tables.Count > 0)
- // {
- // DataTable dt = this._userData.Tables[0].Copy();
- //
- // foreach (DataRow dr in dt.Rows)
- // {
- // if(dr["NAME"].ToString ()==this.ultraComboEditor3.Text .ToString ())
- // {
- // SelComboDept=dr["DEPARTMENTID"];
- // }
- // }
- // }
- GetCombo3Dept();
- if (operDepart != "ROOT")
- {
- if (allDept.IndexOf("'" + SelComboDept + "'") < 0)
- {
- this.ultraComboEditor3.Text = "";
- MessageBox.Show("你没有配置该用户的权限,请重新选择!");
- return;
- }
- }
- }
- private void ultraTextEditor1_EditorButtonClick_1(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
- {
- FrmSetDepart frm = new FrmSetDepart();
- frm.Location = GetChildWindowLocation(frm.Size);
- frm.ShowDialog();
- if (frm.SelectedID != "" && frm.SelectedName != "")
- {
- this.ultraTextEditor1.Text = frm.SelectedName;
- this.ultraTextEditor1.Tag = frm.SelectedID;
- if (this.ultraTextEditor1.Text != "" && this.ultraCheckEditor1.Checked)
- {
- GetSelDept();
- if (operDepart != "ROOT" && allDept.IndexOf("'" + selDept + "'") < 0)
- {
- MessageBox.Show("你没有查看这一部门的权限,请重新选择!");
- }
- }
- }
- }
- 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.Location = GetChildWindowLocation(frmpart.Size);
- frmpart.MdiParent = this.ParentForm;
- frmpart.Show();
- }
- private void ultraButton2_Click(object sender, System.EventArgs e)
- {
- FrmRole frmRole = new FrmRole();
- frmRole._roleData = this._roleData;
- frmRole._selectSQL = this._selectRoleSQL;
- frmRole.IsAdminFlag = IsAdminFlag;
- //frmRole.ShowDialog(this);
- frmRole.Location = GetChildWindowLocation(frmRole.Size);
- frmRole.ShowDialog(this);
- GetFitRole();
- InitCombo();
- //this._roleData = frmRole._roleData ;
- //this.InitRoleCombo();
- }
- private void ultraCheckEditor1_CheckedChanged(object sender, System.EventArgs e)
- {
- ultraTextEditor1.Enabled = ultraCheckEditor1.Checked;
- }
- private void ultraCheckEditor2_CheckedChanged(object sender, System.EventArgs e)
- {
- ultraComboEditor1.Enabled = ultraCheckEditor2.Checked;
- }
- 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(System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void GetSelDept()
- {
- try
- {
- if (this.ultraTextEditor1.Text != "" && ultraCheckEditor1.Checked)
- {
- DataTable dt = this._departmentData.Tables[0].Copy();
- foreach (DataRow dr in dt.Rows)
- {
- if (dr["DEPARTMENTNAME"].ToString() == this.ultraTextEditor1.Text)
- {
- selDept = dr["DEPARTMENTID"].ToString();
- return;
- }
- }
- }
- }
- catch(System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- private void ultraComboEditor3_SelectionChanged(object sender, System.EventArgs e)
- {
- GetCombo3Dept();
- if (operDepart != "ROOT")
- {
- if (allDept.IndexOf("'" + SelComboDept + "'") < 0)
- {
- this.ultraComboEditor3.Text = "";
- MessageBox.Show("你没有配置该用户的权限,请重新选择!");
- return;
- }
- }
- }
- 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(System.Exception ex)
- {
- System.Diagnostics.Debug.WriteLine(ex.ToString());
- }
- }
- }
- }
|