FrmPurviewSet.cs 109 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214
  1. using System;
  2. using System.Data;
  3. using System.Drawing;
  4. using System.Collections;
  5. using System.ComponentModel;
  6. using System.Windows.Forms;
  7. using Infragistics.Win;
  8. using Infragistics.Win.UltraWinGrid;
  9. using Infragistics.Win.UltraWinTree;
  10. using Core.Mes.ClientFrameWork;
  11. namespace Core.Mes.ClientPurviewManager
  12. {
  13. /// <summary>
  14. /// FrmPurviewSet 的摘要说明。
  15. /// </summary>
  16. public class FrmPurviewSet : FrmBase
  17. {
  18. #region 成员区
  19. private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ultraToolbarsManager1;
  20. private System.Data.DataSet dataSet1;
  21. private System.Data.DataTable dataTable1;
  22. private System.Data.DataColumn dataColumn1;
  23. private System.Data.DataColumn dataColumn2;
  24. private System.Data.DataColumn dataColumn3;
  25. private System.Data.DataColumn dataColumn4;
  26. private Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid2;
  27. private Infragistics.Win.UltraWinTree.UltraTree ultraTree1;
  28. private System.Data.DataSet dataSet2;
  29. private System.Data.DataTable dataTable2;
  30. private Infragistics.Win.Misc.UltraExpandableGroupBox ultraExpandableGroupBox2;
  31. private Infragistics.Win.Misc.UltraExpandableGroupBoxPanel ultraExpandableGroupBoxPanel2;
  32. private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ultraToolbarsManager2;
  33. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Left;
  34. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Right;
  35. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Top;
  36. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Bottom;
  37. private System.Data.DataColumn dataColumn5;
  38. private System.Data.DataColumn dataColumn6;
  39. private System.Data.DataColumn dataColumn7;
  40. private System.Windows.Forms.Splitter splitter1;
  41. private DataColumn dataColumn8;
  42. private Infragistics.Win.Misc.UltraExpandableGroupBox ultraExpandableGroupBox1;
  43. private Infragistics.Win.Misc.UltraExpandableGroupBoxPanel ultraExpandableGroupBoxPanel1;
  44. private Panel panel1;
  45. private ComboBox comboBox1;
  46. private Infragistics.Win.UltraWinEditors.UltraCheckEditor ultraCheckEditor5;
  47. private Infragistics.Win.UltraWinEditors.UltraCheckEditor ultraCheckEditor4;
  48. private TextBox textBox4;
  49. private Infragistics.Win.UltraWinEditors.UltraCheckEditor ultraCheckEditor3;
  50. private TextBox textBox3;
  51. private Infragistics.Win.UltraWinEditors.UltraCheckEditor ultraCheckEditor2;
  52. private TextBox textBox2;
  53. private Infragistics.Win.UltraWinEditors.UltraCheckEditor ultraCheckEditor1;
  54. private TextBox textBox1;
  55. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _FrmBase_Toolbars_Dock_Area_Left;
  56. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _FrmBase_Toolbars_Dock_Area_Right;
  57. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _FrmBase_Toolbars_Dock_Area_Top;
  58. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _FrmBase_Toolbars_Dock_Area_Bottom;
  59. private UltraGrid ultraGrid1;
  60. private System.ComponentModel.IContainer components;
  61. private DataColumn dataColumn9;
  62. private DataColumn dataColumn10;
  63. private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ultraToolbarsManager3;
  64. private DataSet dstToolBar;
  65. private DataTable Toolbar;
  66. private DataColumn KEY_;
  67. private DataColumn CATEGORY;
  68. private DataColumn CAPTION;
  69. private DataColumn TYPE;
  70. private DataColumn PARENTMENU;
  71. private DataColumn SETINFO;
  72. private DataColumn ROLEID;
  73. private Infragistics.Win.Misc.UltraButton btn_ImportAll;
  74. private Infragistics.Win.UltraWinEditors.UltraTextEditor txt_folder;
  75. private DataSet dataSet3;
  76. private Infragistics.Win.UltraWinEditors.UltraComboEditor cb_LoginID;
  77. private DataColumn dataColumn11;
  78. private Label label1;
  79. DataTable dtMenuPos = null;
  80. #endregion
  81. public FrmPurviewSet()
  82. {
  83. //
  84. // Windows 窗体设计器支持所必需的
  85. //
  86. InitializeComponent();
  87. //
  88. // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
  89. //
  90. UltraTree_DropHightLight_DrawFilter.Invalidate += new EventHandler(this.UltraTree_DropHightLight_DrawFilter_Invalidate);
  91. UltraTree_DropHightLight_DrawFilter.QueryStateAllowedForNode += new UltraTree_DropHightLight_DrawFilter_Class.QueryStateAllowedForNodeEventHandler(this.UltraTree_DropHightLight_DrawFilter_QueryStateAllowedForNode);
  92. }
  93. /// <summary>
  94. /// 清理所有正在使用的资源。
  95. /// </summary>
  96. protected override void Dispose(bool disposing)
  97. {
  98. if (disposing)
  99. {
  100. if (components != null)
  101. {
  102. components.Dispose();
  103. }
  104. }
  105. base.Dispose(disposing);
  106. }
  107. #region Windows 窗体设计器生成的代码
  108. /// <summary>
  109. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  110. /// 此方法的内容。
  111. /// </summary>
  112. private void InitializeComponent()
  113. {
  114. this.components = new System.ComponentModel.Container();
  115. Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar2 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("UltraToolbar1");
  116. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool25 = new Infragistics.Win.UltraWinToolbars.ButtonTool("query");
  117. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool26 = new Infragistics.Win.UltraWinToolbars.ButtonTool("add");
  118. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool27 = new Infragistics.Win.UltraWinToolbars.ButtonTool("del");
  119. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool28 = new Infragistics.Win.UltraWinToolbars.ButtonTool("edit");
  120. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool29 = new Infragistics.Win.UltraWinToolbars.ButtonTool("close");
  121. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool30 = new Infragistics.Win.UltraWinToolbars.ButtonTool("add");
  122. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool31 = new Infragistics.Win.UltraWinToolbars.ButtonTool("del");
  123. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool32 = new Infragistics.Win.UltraWinToolbars.ButtonTool("edit");
  124. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool33 = new Infragistics.Win.UltraWinToolbars.ButtonTool("close");
  125. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool34 = new Infragistics.Win.UltraWinToolbars.ButtonTool("query");
  126. Infragistics.Win.Appearance appearance12 = new Infragistics.Win.Appearance();
  127. Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand2 = new Infragistics.Win.UltraWinGrid.UltraGridBand("Table1", -1);
  128. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn10 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("ROLEID");
  129. Infragistics.Win.Appearance appearance13 = new Infragistics.Win.Appearance();
  130. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn11 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("ROLENAME");
  131. Infragistics.Win.Appearance appearance14 = new Infragistics.Win.Appearance();
  132. Infragistics.Win.Appearance appearance15 = new Infragistics.Win.Appearance();
  133. Infragistics.Win.Appearance appearance16 = new Infragistics.Win.Appearance();
  134. Infragistics.Win.Appearance appearance17 = new Infragistics.Win.Appearance();
  135. Infragistics.Win.Appearance appearance18 = new Infragistics.Win.Appearance();
  136. Infragistics.Win.Appearance appearance19 = new Infragistics.Win.Appearance();
  137. Infragistics.Win.Appearance appearance20 = new Infragistics.Win.Appearance();
  138. Infragistics.Win.UltraWinTree.UltraTreeColumnSet ultraTreeColumnSet1 = new Infragistics.Win.UltraWinTree.UltraTreeColumnSet();
  139. Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("UltraToolbar1");
  140. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool1 = new Infragistics.Win.UltraWinToolbars.ButtonTool("refresh");
  141. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool2 = new Infragistics.Win.UltraWinToolbars.ButtonTool("select");
  142. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("remove");
  143. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("clear");
  144. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool5 = new Infragistics.Win.UltraWinToolbars.ButtonTool("copy");
  145. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("plast");
  146. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("up");
  147. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool8 = new Infragistics.Win.UltraWinToolbars.ButtonTool("down");
  148. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool9 = new Infragistics.Win.UltraWinToolbars.ButtonTool("left");
  149. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("right");
  150. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool11 = new Infragistics.Win.UltraWinToolbars.ButtonTool("save");
  151. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool12 = new Infragistics.Win.UltraWinToolbars.ButtonTool("IMPORT");
  152. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool13 = new Infragistics.Win.UltraWinToolbars.ButtonTool("select");
  153. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool14 = new Infragistics.Win.UltraWinToolbars.ButtonTool("remove");
  154. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool15 = new Infragistics.Win.UltraWinToolbars.ButtonTool("save");
  155. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool16 = new Infragistics.Win.UltraWinToolbars.ButtonTool("copy");
  156. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool17 = new Infragistics.Win.UltraWinToolbars.ButtonTool("up");
  157. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool18 = new Infragistics.Win.UltraWinToolbars.ButtonTool("down");
  158. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool19 = new Infragistics.Win.UltraWinToolbars.ButtonTool("left");
  159. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool20 = new Infragistics.Win.UltraWinToolbars.ButtonTool("right");
  160. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool21 = new Infragistics.Win.UltraWinToolbars.ButtonTool("refresh");
  161. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool22 = new Infragistics.Win.UltraWinToolbars.ButtonTool("clear");
  162. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool23 = new Infragistics.Win.UltraWinToolbars.ButtonTool("plast");
  163. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool24 = new Infragistics.Win.UltraWinToolbars.ButtonTool("IMPORT");
  164. Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
  165. Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand1 = new Infragistics.Win.UltraWinGrid.UltraGridBand("Table1", -1);
  166. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn1 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("ID_");
  167. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn2 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("KEY_");
  168. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn3 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("CATEGORY");
  169. Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
  170. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn4 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("CAPTION");
  171. Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
  172. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn5 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("REMARK");
  173. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn6 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("TYPE");
  174. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn7 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("PARENTID");
  175. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn8 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("XH");
  176. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn9 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("PATH_");
  177. Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
  178. Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
  179. Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
  180. Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
  181. Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
  182. Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
  183. Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance();
  184. Infragistics.Win.Appearance appearance11 = new Infragistics.Win.Appearance();
  185. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool35 = new Infragistics.Win.UltraWinToolbars.ButtonTool("tlbtnUp");
  186. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool36 = new Infragistics.Win.UltraWinToolbars.ButtonTool("tlbtnDown");
  187. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool37 = new Infragistics.Win.UltraWinToolbars.ButtonTool("tlbtnLeft");
  188. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool38 = new Infragistics.Win.UltraWinToolbars.ButtonTool("tlbtnRight");
  189. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool39 = new Infragistics.Win.UltraWinToolbars.ButtonTool("tlbtnSave");
  190. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool40 = new Infragistics.Win.UltraWinToolbars.ButtonTool("tlbtnRefresh");
  191. this.dataSet1 = new System.Data.DataSet();
  192. this.dataTable1 = new System.Data.DataTable();
  193. this.dataColumn1 = new System.Data.DataColumn();
  194. this.dataColumn2 = new System.Data.DataColumn();
  195. this.dataColumn3 = new System.Data.DataColumn();
  196. this.dataColumn4 = new System.Data.DataColumn();
  197. this.dataColumn7 = new System.Data.DataColumn();
  198. this.dataColumn8 = new System.Data.DataColumn();
  199. this.dataColumn9 = new System.Data.DataColumn();
  200. this.dataColumn10 = new System.Data.DataColumn();
  201. this.dataColumn11 = new System.Data.DataColumn();
  202. this.ultraToolbarsManager1 = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
  203. this.ultraGrid2 = new Infragistics.Win.UltraWinGrid.UltraGrid();
  204. this.dataSet2 = new System.Data.DataSet();
  205. this.dataTable2 = new System.Data.DataTable();
  206. this.dataColumn5 = new System.Data.DataColumn();
  207. this.dataColumn6 = new System.Data.DataColumn();
  208. this.ultraTree1 = new Infragistics.Win.UltraWinTree.UltraTree();
  209. this.ultraExpandableGroupBox2 = new Infragistics.Win.Misc.UltraExpandableGroupBox();
  210. this.ultraExpandableGroupBoxPanel2 = new Infragistics.Win.Misc.UltraExpandableGroupBoxPanel();
  211. this.splitter1 = new System.Windows.Forms.Splitter();
  212. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  213. this.ultraToolbarsManager2 = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
  214. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  215. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  216. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  217. this.ultraExpandableGroupBox1 = new Infragistics.Win.Misc.UltraExpandableGroupBox();
  218. this.ultraExpandableGroupBoxPanel1 = new Infragistics.Win.Misc.UltraExpandableGroupBoxPanel();
  219. this.ultraGrid1 = new Infragistics.Win.UltraWinGrid.UltraGrid();
  220. this.panel1 = new System.Windows.Forms.Panel();
  221. this.label1 = new System.Windows.Forms.Label();
  222. this.cb_LoginID = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
  223. this.txt_folder = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
  224. this.btn_ImportAll = new Infragistics.Win.Misc.UltraButton();
  225. this.comboBox1 = new System.Windows.Forms.ComboBox();
  226. this.ultraCheckEditor5 = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  227. this.ultraCheckEditor4 = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  228. this.textBox4 = new System.Windows.Forms.TextBox();
  229. this.ultraCheckEditor3 = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  230. this.textBox3 = new System.Windows.Forms.TextBox();
  231. this.ultraCheckEditor2 = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  232. this.textBox2 = new System.Windows.Forms.TextBox();
  233. this.ultraCheckEditor1 = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  234. this.textBox1 = new System.Windows.Forms.TextBox();
  235. this._FrmBase_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  236. this._FrmBase_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  237. this._FrmBase_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  238. this._FrmBase_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  239. this.ultraToolbarsManager3 = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
  240. this.dstToolBar = new System.Data.DataSet();
  241. this.Toolbar = new System.Data.DataTable();
  242. this.KEY_ = new System.Data.DataColumn();
  243. this.CATEGORY = new System.Data.DataColumn();
  244. this.CAPTION = new System.Data.DataColumn();
  245. this.TYPE = new System.Data.DataColumn();
  246. this.PARENTMENU = new System.Data.DataColumn();
  247. this.SETINFO = new System.Data.DataColumn();
  248. this.ROLEID = new System.Data.DataColumn();
  249. this.dataSet3 = new System.Data.DataSet();
  250. ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).BeginInit();
  251. ((System.ComponentModel.ISupportInitialize)(this.dataTable1)).BeginInit();
  252. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).BeginInit();
  253. ((System.ComponentModel.ISupportInitialize)(this.ultraGrid2)).BeginInit();
  254. ((System.ComponentModel.ISupportInitialize)(this.dataSet2)).BeginInit();
  255. ((System.ComponentModel.ISupportInitialize)(this.dataTable2)).BeginInit();
  256. ((System.ComponentModel.ISupportInitialize)(this.ultraTree1)).BeginInit();
  257. ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox2)).BeginInit();
  258. this.ultraExpandableGroupBox2.SuspendLayout();
  259. this.ultraExpandableGroupBoxPanel2.SuspendLayout();
  260. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager2)).BeginInit();
  261. ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).BeginInit();
  262. this.ultraExpandableGroupBox1.SuspendLayout();
  263. this.ultraExpandableGroupBoxPanel1.SuspendLayout();
  264. ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).BeginInit();
  265. this.panel1.SuspendLayout();
  266. ((System.ComponentModel.ISupportInitialize)(this.cb_LoginID)).BeginInit();
  267. ((System.ComponentModel.ISupportInitialize)(this.txt_folder)).BeginInit();
  268. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager3)).BeginInit();
  269. ((System.ComponentModel.ISupportInitialize)(this.dstToolBar)).BeginInit();
  270. ((System.ComponentModel.ISupportInitialize)(this.Toolbar)).BeginInit();
  271. ((System.ComponentModel.ISupportInitialize)(this.dataSet3)).BeginInit();
  272. this.SuspendLayout();
  273. //
  274. // dataSet1
  275. //
  276. this.dataSet1.DataSetName = "NewDataSet";
  277. this.dataSet1.Locale = new System.Globalization.CultureInfo("zh-CN");
  278. this.dataSet1.Tables.AddRange(new System.Data.DataTable[] {
  279. this.dataTable1});
  280. //
  281. // dataTable1
  282. //
  283. this.dataTable1.Columns.AddRange(new System.Data.DataColumn[] {
  284. this.dataColumn1,
  285. this.dataColumn2,
  286. this.dataColumn3,
  287. this.dataColumn4,
  288. this.dataColumn7,
  289. this.dataColumn8,
  290. this.dataColumn9,
  291. this.dataColumn10,
  292. this.dataColumn11});
  293. this.dataTable1.TableName = "Table1";
  294. //
  295. // dataColumn1
  296. //
  297. this.dataColumn1.ColumnName = "ID_";
  298. //
  299. // dataColumn2
  300. //
  301. this.dataColumn2.ColumnName = "KEY_";
  302. //
  303. // dataColumn3
  304. //
  305. this.dataColumn3.ColumnName = "CATEGORY";
  306. //
  307. // dataColumn4
  308. //
  309. this.dataColumn4.ColumnName = "CAPTION";
  310. //
  311. // dataColumn7
  312. //
  313. this.dataColumn7.ColumnName = "REMARK";
  314. //
  315. // dataColumn8
  316. //
  317. this.dataColumn8.ColumnName = "TYPE";
  318. //
  319. // dataColumn9
  320. //
  321. this.dataColumn9.ColumnName = "PARENTID";
  322. //
  323. // dataColumn10
  324. //
  325. this.dataColumn10.ColumnName = "XH";
  326. this.dataColumn10.DataType = typeof(decimal);
  327. //
  328. // dataColumn11
  329. //
  330. this.dataColumn11.Caption = "路径";
  331. this.dataColumn11.ColumnName = "PATH_";
  332. //
  333. // ultraToolbarsManager1
  334. //
  335. this.ultraToolbarsManager1.DesignerFlags = 1;
  336. this.ultraToolbarsManager1.DockWithinContainer = this;
  337. this.ultraToolbarsManager1.LockToolbars = true;
  338. this.ultraToolbarsManager1.MdiMergeable = false;
  339. this.ultraToolbarsManager1.ShowQuickCustomizeButton = false;
  340. this.ultraToolbarsManager1.Style = Infragistics.Win.UltraWinToolbars.ToolbarStyle.VisualStudio2005;
  341. ultraToolbar2.DockedColumn = 0;
  342. ultraToolbar2.DockedRow = 0;
  343. ultraToolbar2.Text = "UltraToolbar1";
  344. buttonTool26.InstanceProps.IsFirstInGroup = true;
  345. buttonTool27.InstanceProps.IsFirstInGroup = true;
  346. buttonTool28.InstanceProps.IsFirstInGroup = true;
  347. buttonTool29.InstanceProps.IsFirstInGroup = true;
  348. ultraToolbar2.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
  349. buttonTool25,
  350. buttonTool26,
  351. buttonTool27,
  352. buttonTool28,
  353. buttonTool29});
  354. this.ultraToolbarsManager1.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
  355. ultraToolbar2});
  356. buttonTool30.SharedProps.Caption = "新增";
  357. buttonTool30.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  358. buttonTool31.SharedProps.Caption = "删除";
  359. buttonTool31.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  360. buttonTool32.SharedProps.Caption = "修改";
  361. buttonTool32.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  362. buttonTool33.SharedProps.Caption = "关闭";
  363. buttonTool33.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  364. buttonTool34.SharedProps.Caption = "查询";
  365. buttonTool34.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  366. this.ultraToolbarsManager1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
  367. buttonTool30,
  368. buttonTool31,
  369. buttonTool32,
  370. buttonTool33,
  371. buttonTool34});
  372. this.ultraToolbarsManager1.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.ultraToolbarsManager1_ToolClick);
  373. //
  374. // ultraGrid2
  375. //
  376. this.ultraGrid2.DataSource = this.dataSet2;
  377. appearance12.BackColor = System.Drawing.SystemColors.Window;
  378. appearance12.BorderColor = System.Drawing.SystemColors.InactiveCaption;
  379. this.ultraGrid2.DisplayLayout.Appearance = appearance12;
  380. appearance13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
  381. ultraGridColumn10.CellAppearance = appearance13;
  382. ultraGridColumn10.Header.Caption = "角色名";
  383. ultraGridColumn10.Header.VisiblePosition = 0;
  384. ultraGridColumn10.Hidden = true;
  385. ultraGridColumn10.Width = 150;
  386. ultraGridColumn11.Header.Caption = "角色名";
  387. ultraGridColumn11.Header.VisiblePosition = 1;
  388. ultraGridColumn11.Width = 210;
  389. ultraGridBand2.Columns.AddRange(new object[] {
  390. ultraGridColumn10,
  391. ultraGridColumn11});
  392. this.ultraGrid2.DisplayLayout.BandsSerializer.Add(ultraGridBand2);
  393. this.ultraGrid2.DisplayLayout.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  394. this.ultraGrid2.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.False;
  395. appearance14.BackColor = System.Drawing.SystemColors.ActiveBorder;
  396. appearance14.BackColor2 = System.Drawing.SystemColors.ControlDark;
  397. appearance14.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical;
  398. appearance14.BorderColor = System.Drawing.SystemColors.Window;
  399. this.ultraGrid2.DisplayLayout.GroupByBox.Appearance = appearance14;
  400. appearance15.ForeColor = System.Drawing.SystemColors.GrayText;
  401. this.ultraGrid2.DisplayLayout.GroupByBox.BandLabelAppearance = appearance15;
  402. this.ultraGrid2.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  403. this.ultraGrid2.DisplayLayout.GroupByBox.Hidden = true;
  404. appearance16.BackColor = System.Drawing.SystemColors.ControlLightLight;
  405. appearance16.BackColor2 = System.Drawing.SystemColors.Control;
  406. appearance16.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
  407. appearance16.ForeColor = System.Drawing.SystemColors.GrayText;
  408. this.ultraGrid2.DisplayLayout.GroupByBox.PromptAppearance = appearance16;
  409. this.ultraGrid2.DisplayLayout.MaxColScrollRegions = 1;
  410. this.ultraGrid2.DisplayLayout.MaxRowScrollRegions = 1;
  411. appearance17.BackColor = System.Drawing.SystemColors.Window;
  412. appearance17.ForeColor = System.Drawing.SystemColors.ControlText;
  413. this.ultraGrid2.DisplayLayout.Override.ActiveCellAppearance = appearance17;
  414. appearance18.BackColor = System.Drawing.SystemColors.Highlight;
  415. appearance18.ForeColor = System.Drawing.SystemColors.HighlightText;
  416. this.ultraGrid2.DisplayLayout.Override.ActiveRowAppearance = appearance18;
  417. this.ultraGrid2.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.True;
  418. this.ultraGrid2.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.False;
  419. this.ultraGrid2.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText;
  420. this.ultraGrid2.DisplayLayout.Override.CellPadding = 0;
  421. appearance19.BackColor = System.Drawing.Color.LightSteelBlue;
  422. appearance19.TextHAlign = Infragistics.Win.HAlign.Center;
  423. this.ultraGrid2.DisplayLayout.Override.HeaderAppearance = appearance19;
  424. this.ultraGrid2.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.Standard;
  425. this.ultraGrid2.DisplayLayout.Override.MinRowHeight = 21;
  426. appearance20.BackColor = System.Drawing.Color.LightSteelBlue;
  427. this.ultraGrid2.DisplayLayout.Override.RowSelectorAppearance = appearance20;
  428. this.ultraGrid2.DisplayLayout.Override.RowSelectorHeaderStyle = Infragistics.Win.UltraWinGrid.RowSelectorHeaderStyle.SeparateElement;
  429. this.ultraGrid2.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
  430. this.ultraGrid2.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate;
  431. this.ultraGrid2.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy;
  432. this.ultraGrid2.Dock = System.Windows.Forms.DockStyle.Left;
  433. this.ultraGrid2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  434. this.ultraGrid2.Location = new System.Drawing.Point(0, 50);
  435. this.ultraGrid2.Name = "ultraGrid2";
  436. this.ultraGrid2.Size = new System.Drawing.Size(248, 221);
  437. this.ultraGrid2.TabIndex = 5;
  438. this.ultraGrid2.Text = "ultraGrid2";
  439. this.ultraGrid2.AfterRowActivate += new System.EventHandler(this.ultraGrid2_AfterRowActivate);
  440. //
  441. // dataSet2
  442. //
  443. this.dataSet2.DataSetName = "NewDataSet";
  444. this.dataSet2.Locale = new System.Globalization.CultureInfo("zh-CN");
  445. this.dataSet2.Tables.AddRange(new System.Data.DataTable[] {
  446. this.dataTable2});
  447. //
  448. // dataTable2
  449. //
  450. this.dataTable2.Columns.AddRange(new System.Data.DataColumn[] {
  451. this.dataColumn5,
  452. this.dataColumn6});
  453. this.dataTable2.TableName = "Table1";
  454. //
  455. // dataColumn5
  456. //
  457. this.dataColumn5.ColumnName = "ROLEID";
  458. //
  459. // dataColumn6
  460. //
  461. this.dataColumn6.ColumnName = "ROLENAME";
  462. //
  463. // ultraTree1
  464. //
  465. this.ultraTree1.ColumnSettings.RootColumnSet = ultraTreeColumnSet1;
  466. this.ultraTree1.Dock = System.Windows.Forms.DockStyle.Fill;
  467. this.ultraTree1.HideSelection = false;
  468. this.ultraTree1.Location = new System.Drawing.Point(251, 50);
  469. this.ultraTree1.Name = "ultraTree1";
  470. this.ultraTree1.Size = new System.Drawing.Size(991, 221);
  471. this.ultraTree1.TabIndex = 6;
  472. //
  473. // ultraExpandableGroupBox2
  474. //
  475. this.ultraExpandableGroupBox2.Controls.Add(this.ultraExpandableGroupBoxPanel2);
  476. this.ultraExpandableGroupBox2.Dock = System.Windows.Forms.DockStyle.Bottom;
  477. this.ultraExpandableGroupBox2.ExpandedSize = new System.Drawing.Size(1012, 293);
  478. this.ultraExpandableGroupBox2.Location = new System.Drawing.Point(0, 440);
  479. this.ultraExpandableGroupBox2.Name = "ultraExpandableGroupBox2";
  480. this.ultraExpandableGroupBox2.Size = new System.Drawing.Size(1248, 293);
  481. this.ultraExpandableGroupBox2.SupportThemes = false;
  482. this.ultraExpandableGroupBox2.TabIndex = 7;
  483. this.ultraExpandableGroupBox2.Text = "权限设置";
  484. this.ultraExpandableGroupBox2.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2000;
  485. //
  486. // ultraExpandableGroupBoxPanel2
  487. //
  488. this.ultraExpandableGroupBoxPanel2.Controls.Add(this.ultraTree1);
  489. this.ultraExpandableGroupBoxPanel2.Controls.Add(this.splitter1);
  490. this.ultraExpandableGroupBoxPanel2.Controls.Add(this.ultraGrid2);
  491. this.ultraExpandableGroupBoxPanel2.Controls.Add(this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Left);
  492. this.ultraExpandableGroupBoxPanel2.Controls.Add(this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Right);
  493. this.ultraExpandableGroupBoxPanel2.Controls.Add(this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Top);
  494. this.ultraExpandableGroupBoxPanel2.Controls.Add(this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Bottom);
  495. this.ultraExpandableGroupBoxPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
  496. this.ultraExpandableGroupBoxPanel2.Location = new System.Drawing.Point(3, 19);
  497. this.ultraExpandableGroupBoxPanel2.Name = "ultraExpandableGroupBoxPanel2";
  498. this.ultraExpandableGroupBoxPanel2.Size = new System.Drawing.Size(1242, 271);
  499. this.ultraExpandableGroupBoxPanel2.TabIndex = 0;
  500. //
  501. // splitter1
  502. //
  503. this.splitter1.Location = new System.Drawing.Point(248, 50);
  504. this.splitter1.Name = "splitter1";
  505. this.splitter1.Size = new System.Drawing.Size(3, 221);
  506. this.splitter1.TabIndex = 11;
  507. this.splitter1.TabStop = false;
  508. //
  509. // _ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Left
  510. //
  511. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  512. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control;
  513. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
  514. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
  515. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 50);
  516. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Left.Name = "_ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Left";
  517. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 221);
  518. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Left.ToolbarsManager = this.ultraToolbarsManager2;
  519. //
  520. // ultraToolbarsManager2
  521. //
  522. this.ultraToolbarsManager2.DesignerFlags = 1;
  523. this.ultraToolbarsManager2.DockWithinContainer = this.ultraExpandableGroupBoxPanel2;
  524. this.ultraToolbarsManager2.LockToolbars = true;
  525. this.ultraToolbarsManager2.MdiMergeable = false;
  526. this.ultraToolbarsManager2.ShowFullMenusDelay = 500;
  527. this.ultraToolbarsManager2.ShowQuickCustomizeButton = false;
  528. this.ultraToolbarsManager2.Style = Infragistics.Win.UltraWinToolbars.ToolbarStyle.VisualStudio2005;
  529. ultraToolbar1.DockedColumn = 0;
  530. ultraToolbar1.DockedRow = 0;
  531. ultraToolbar1.Text = "UltraToolbar1";
  532. buttonTool2.InstanceProps.IsFirstInGroup = true;
  533. buttonTool4.InstanceProps.IsFirstInGroup = true;
  534. buttonTool5.InstanceProps.IsFirstInGroup = true;
  535. buttonTool7.InstanceProps.IsFirstInGroup = true;
  536. buttonTool11.InstanceProps.IsFirstInGroup = true;
  537. buttonTool12.InstanceProps.IsFirstInGroup = true;
  538. ultraToolbar1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
  539. buttonTool1,
  540. buttonTool2,
  541. buttonTool3,
  542. buttonTool4,
  543. buttonTool5,
  544. buttonTool6,
  545. buttonTool7,
  546. buttonTool8,
  547. buttonTool9,
  548. buttonTool10,
  549. buttonTool11,
  550. buttonTool12});
  551. this.ultraToolbarsManager2.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
  552. ultraToolbar1});
  553. buttonTool13.SharedProps.Caption = "选取";
  554. buttonTool13.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  555. buttonTool14.SharedProps.Caption = "移除";
  556. buttonTool14.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  557. buttonTool15.SharedProps.Caption = "保存";
  558. buttonTool15.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  559. buttonTool16.SharedProps.Caption = "复制";
  560. buttonTool16.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  561. buttonTool17.SharedProps.Caption = "上移";
  562. buttonTool17.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  563. buttonTool18.SharedProps.Caption = "下移";
  564. buttonTool18.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  565. buttonTool19.SharedProps.Caption = "左移";
  566. buttonTool19.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  567. buttonTool20.SharedProps.Caption = "右移";
  568. buttonTool20.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  569. buttonTool21.SharedProps.Caption = "刷新";
  570. buttonTool21.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  571. buttonTool22.SharedProps.Caption = "清空";
  572. buttonTool22.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  573. buttonTool23.SharedProps.Caption = "粘贴";
  574. buttonTool23.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  575. buttonTool24.SharedProps.Caption = "导入";
  576. buttonTool24.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.TextOnlyAlways;
  577. this.ultraToolbarsManager2.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
  578. buttonTool13,
  579. buttonTool14,
  580. buttonTool15,
  581. buttonTool16,
  582. buttonTool17,
  583. buttonTool18,
  584. buttonTool19,
  585. buttonTool20,
  586. buttonTool21,
  587. buttonTool22,
  588. buttonTool23,
  589. buttonTool24});
  590. this.ultraToolbarsManager2.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.ultraToolbarsManager2_ToolClick);
  591. //
  592. // _ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Right
  593. //
  594. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  595. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control;
  596. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
  597. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
  598. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(1242, 50);
  599. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Right.Name = "_ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Right";
  600. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 221);
  601. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Right.ToolbarsManager = this.ultraToolbarsManager2;
  602. //
  603. // _ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Top
  604. //
  605. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  606. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control;
  607. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
  608. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
  609. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
  610. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Top.Name = "_ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Top";
  611. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(1242, 50);
  612. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Top.ToolbarsManager = this.ultraToolbarsManager2;
  613. //
  614. // _ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Bottom
  615. //
  616. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  617. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control;
  618. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
  619. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
  620. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 271);
  621. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Bottom.Name = "_ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Bottom";
  622. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(1242, 0);
  623. this._ultraExpandableGroupBoxPanel2_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.ultraToolbarsManager2;
  624. //
  625. // ultraExpandableGroupBox1
  626. //
  627. this.ultraExpandableGroupBox1.Controls.Add(this.ultraExpandableGroupBoxPanel1);
  628. this.ultraExpandableGroupBox1.Dock = System.Windows.Forms.DockStyle.Fill;
  629. this.ultraExpandableGroupBox1.ExpandedSize = new System.Drawing.Size(1012, 416);
  630. this.ultraExpandableGroupBox1.Location = new System.Drawing.Point(0, 25);
  631. this.ultraExpandableGroupBox1.Name = "ultraExpandableGroupBox1";
  632. this.ultraExpandableGroupBox1.Size = new System.Drawing.Size(1248, 415);
  633. this.ultraExpandableGroupBox1.SupportThemes = false;
  634. this.ultraExpandableGroupBox1.TabIndex = 8;
  635. this.ultraExpandableGroupBox1.Text = "菜单信息设置";
  636. this.ultraExpandableGroupBox1.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2000;
  637. //
  638. // ultraExpandableGroupBoxPanel1
  639. //
  640. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.ultraGrid1);
  641. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.panel1);
  642. this.ultraExpandableGroupBoxPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
  643. this.ultraExpandableGroupBoxPanel1.Location = new System.Drawing.Point(3, 19);
  644. this.ultraExpandableGroupBoxPanel1.Name = "ultraExpandableGroupBoxPanel1";
  645. this.ultraExpandableGroupBoxPanel1.Size = new System.Drawing.Size(1242, 393);
  646. this.ultraExpandableGroupBoxPanel1.TabIndex = 0;
  647. //
  648. // ultraGrid1
  649. //
  650. this.ultraGrid1.DataSource = this.dataSet1;
  651. appearance1.BackColor = System.Drawing.SystemColors.Window;
  652. appearance1.BorderColor = System.Drawing.SystemColors.InactiveCaption;
  653. this.ultraGrid1.DisplayLayout.Appearance = appearance1;
  654. ultraGridColumn1.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  655. ultraGridColumn1.Header.VisiblePosition = 0;
  656. ultraGridColumn1.Hidden = true;
  657. ultraGridColumn2.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  658. ultraGridColumn2.Header.Caption = "键值";
  659. ultraGridColumn2.Header.VisiblePosition = 2;
  660. ultraGridColumn2.Width = 300;
  661. ultraGridColumn3.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  662. appearance2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
  663. ultraGridColumn3.CellAppearance = appearance2;
  664. ultraGridColumn3.Header.Caption = "组名";
  665. ultraGridColumn3.Header.VisiblePosition = 3;
  666. ultraGridColumn3.Width = 200;
  667. ultraGridColumn4.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  668. appearance3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
  669. ultraGridColumn4.CellAppearance = appearance3;
  670. ultraGridColumn4.Header.Caption = "菜单名";
  671. ultraGridColumn4.Header.VisiblePosition = 1;
  672. ultraGridColumn4.Width = 200;
  673. ultraGridColumn5.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  674. ultraGridColumn5.Header.Caption = "备注";
  675. ultraGridColumn5.Header.VisiblePosition = 5;
  676. ultraGridColumn5.Width = 150;
  677. ultraGridColumn6.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  678. ultraGridColumn6.Header.Caption = "类型";
  679. ultraGridColumn6.Header.VisiblePosition = 4;
  680. ultraGridColumn7.Header.VisiblePosition = 6;
  681. ultraGridColumn7.Hidden = true;
  682. ultraGridColumn8.Header.VisiblePosition = 7;
  683. ultraGridColumn8.Hidden = true;
  684. ultraGridColumn9.CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
  685. ultraGridColumn9.Header.Caption = "菜单路径";
  686. ultraGridColumn9.Header.VisiblePosition = 8;
  687. ultraGridColumn9.Width = 332;
  688. ultraGridBand1.Columns.AddRange(new object[] {
  689. ultraGridColumn1,
  690. ultraGridColumn2,
  691. ultraGridColumn3,
  692. ultraGridColumn4,
  693. ultraGridColumn5,
  694. ultraGridColumn6,
  695. ultraGridColumn7,
  696. ultraGridColumn8,
  697. ultraGridColumn9});
  698. this.ultraGrid1.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
  699. this.ultraGrid1.DisplayLayout.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  700. this.ultraGrid1.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.False;
  701. appearance4.BackColor = System.Drawing.SystemColors.ActiveBorder;
  702. appearance4.BackColor2 = System.Drawing.SystemColors.ControlDark;
  703. appearance4.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical;
  704. appearance4.BorderColor = System.Drawing.SystemColors.Window;
  705. this.ultraGrid1.DisplayLayout.GroupByBox.Appearance = appearance4;
  706. appearance5.ForeColor = System.Drawing.SystemColors.GrayText;
  707. this.ultraGrid1.DisplayLayout.GroupByBox.BandLabelAppearance = appearance5;
  708. this.ultraGrid1.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  709. this.ultraGrid1.DisplayLayout.GroupByBox.Hidden = true;
  710. appearance6.BackColor = System.Drawing.SystemColors.ControlLightLight;
  711. appearance6.BackColor2 = System.Drawing.SystemColors.Control;
  712. appearance6.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
  713. appearance6.ForeColor = System.Drawing.SystemColors.GrayText;
  714. this.ultraGrid1.DisplayLayout.GroupByBox.PromptAppearance = appearance6;
  715. this.ultraGrid1.DisplayLayout.MaxColScrollRegions = 1;
  716. this.ultraGrid1.DisplayLayout.MaxRowScrollRegions = 1;
  717. appearance7.BackColor = System.Drawing.SystemColors.Window;
  718. appearance7.ForeColor = System.Drawing.SystemColors.ControlText;
  719. this.ultraGrid1.DisplayLayout.Override.ActiveCellAppearance = appearance7;
  720. appearance8.BackColor = System.Drawing.SystemColors.Highlight;
  721. appearance8.ForeColor = System.Drawing.SystemColors.HighlightText;
  722. this.ultraGrid1.DisplayLayout.Override.ActiveRowAppearance = appearance8;
  723. this.ultraGrid1.DisplayLayout.Override.AllowRowFiltering = Infragistics.Win.DefaultableBoolean.True;
  724. this.ultraGrid1.DisplayLayout.Override.AllowUpdate = Infragistics.Win.DefaultableBoolean.False;
  725. this.ultraGrid1.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText;
  726. this.ultraGrid1.DisplayLayout.Override.CellPadding = 0;
  727. appearance9.BackColor = System.Drawing.Color.LightSteelBlue;
  728. appearance9.TextHAlign = Infragistics.Win.HAlign.Center;
  729. this.ultraGrid1.DisplayLayout.Override.HeaderAppearance = appearance9;
  730. this.ultraGrid1.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.Standard;
  731. this.ultraGrid1.DisplayLayout.Override.MinRowHeight = 21;
  732. appearance10.BackColor = System.Drawing.Color.LightSteelBlue;
  733. this.ultraGrid1.DisplayLayout.Override.RowSelectorAppearance = appearance10;
  734. this.ultraGrid1.DisplayLayout.Override.RowSelectorHeaderStyle = Infragistics.Win.UltraWinGrid.RowSelectorHeaderStyle.SeparateElement;
  735. this.ultraGrid1.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
  736. this.ultraGrid1.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate;
  737. this.ultraGrid1.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy;
  738. this.ultraGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
  739. this.ultraGrid1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  740. this.ultraGrid1.Location = new System.Drawing.Point(0, 64);
  741. this.ultraGrid1.Name = "ultraGrid1";
  742. this.ultraGrid1.Size = new System.Drawing.Size(1242, 329);
  743. this.ultraGrid1.TabIndex = 18;
  744. this.ultraGrid1.Text = "ultraGrid1";
  745. this.ultraGrid1.AfterRowActivate += new System.EventHandler(this.ultraGrid1_AfterRowActivate);
  746. //
  747. // panel1
  748. //
  749. this.panel1.Controls.Add(this.label1);
  750. this.panel1.Controls.Add(this.cb_LoginID);
  751. this.panel1.Controls.Add(this.txt_folder);
  752. this.panel1.Controls.Add(this.btn_ImportAll);
  753. this.panel1.Controls.Add(this.comboBox1);
  754. this.panel1.Controls.Add(this.ultraCheckEditor5);
  755. this.panel1.Controls.Add(this.ultraCheckEditor4);
  756. this.panel1.Controls.Add(this.textBox4);
  757. this.panel1.Controls.Add(this.ultraCheckEditor3);
  758. this.panel1.Controls.Add(this.textBox3);
  759. this.panel1.Controls.Add(this.ultraCheckEditor2);
  760. this.panel1.Controls.Add(this.textBox2);
  761. this.panel1.Controls.Add(this.ultraCheckEditor1);
  762. this.panel1.Controls.Add(this.textBox1);
  763. this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
  764. this.panel1.Location = new System.Drawing.Point(0, 0);
  765. this.panel1.Name = "panel1";
  766. this.panel1.Size = new System.Drawing.Size(1242, 64);
  767. this.panel1.TabIndex = 5;
  768. //
  769. // label1
  770. //
  771. this.label1.AutoSize = true;
  772. this.label1.Location = new System.Drawing.Point(699, 39);
  773. this.label1.Name = "label1";
  774. this.label1.Size = new System.Drawing.Size(41, 12);
  775. this.label1.TabIndex = 15;
  776. this.label1.Text = "登录ID";
  777. //
  778. // cb_LoginID
  779. //
  780. this.cb_LoginID.AlphaBlendMode = Infragistics.Win.AlphaBlendMode.Disabled;
  781. appearance11.BorderColor = System.Drawing.Color.Black;
  782. this.cb_LoginID.Appearance = appearance11;
  783. this.cb_LoginID.AutoSize = true;
  784. this.cb_LoginID.Location = new System.Drawing.Point(754, 31);
  785. this.cb_LoginID.Name = "cb_LoginID";
  786. this.cb_LoginID.Size = new System.Drawing.Size(199, 21);
  787. this.cb_LoginID.TabIndex = 14;
  788. this.cb_LoginID.ValueChanged += new System.EventHandler(this.cb_LoginID_ValueChanged);
  789. //
  790. // txt_folder
  791. //
  792. this.txt_folder.AutoSize = true;
  793. this.txt_folder.FlatMode = true;
  794. this.txt_folder.ImeMode = System.Windows.Forms.ImeMode.NoControl;
  795. this.txt_folder.Location = new System.Drawing.Point(1109, 6);
  796. this.txt_folder.Name = "txt_folder";
  797. this.txt_folder.Size = new System.Drawing.Size(181, 19);
  798. this.txt_folder.TabIndex = 13;
  799. this.txt_folder.Text = "C:\\CA\\";
  800. //
  801. // btn_ImportAll
  802. //
  803. this.btn_ImportAll.Location = new System.Drawing.Point(976, 3);
  804. this.btn_ImportAll.Name = "btn_ImportAll";
  805. this.btn_ImportAll.Size = new System.Drawing.Size(130, 27);
  806. this.btn_ImportAll.TabIndex = 12;
  807. this.btn_ImportAll.Text = "批量导入权限文件";
  808. this.btn_ImportAll.Click += new System.EventHandler(this.btn_ImportAll_Click);
  809. //
  810. // comboBox1
  811. //
  812. this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
  813. this.comboBox1.Enabled = false;
  814. this.comboBox1.FormattingEnabled = true;
  815. this.comboBox1.Items.AddRange(new object[] {
  816. "MENU",
  817. "FORM"});
  818. this.comboBox1.Location = new System.Drawing.Point(80, 33);
  819. this.comboBox1.Name = "comboBox1";
  820. this.comboBox1.Size = new System.Drawing.Size(168, 20);
  821. this.comboBox1.TabIndex = 11;
  822. //
  823. // ultraCheckEditor5
  824. //
  825. this.ultraCheckEditor5.Location = new System.Drawing.Point(9, 33);
  826. this.ultraCheckEditor5.Name = "ultraCheckEditor5";
  827. this.ultraCheckEditor5.Size = new System.Drawing.Size(72, 20);
  828. this.ultraCheckEditor5.TabIndex = 10;
  829. this.ultraCheckEditor5.Tag = "comboBox1";
  830. this.ultraCheckEditor5.Text = "类 型";
  831. this.ultraCheckEditor5.CheckedChanged += new System.EventHandler(this.ultraCheckEditor_CheckedChanged);
  832. //
  833. // ultraCheckEditor4
  834. //
  835. this.ultraCheckEditor4.Location = new System.Drawing.Point(292, 32);
  836. this.ultraCheckEditor4.Name = "ultraCheckEditor4";
  837. this.ultraCheckEditor4.Size = new System.Drawing.Size(72, 20);
  838. this.ultraCheckEditor4.TabIndex = 9;
  839. this.ultraCheckEditor4.Tag = "textBox4";
  840. this.ultraCheckEditor4.Text = "备 注";
  841. this.ultraCheckEditor4.CheckedChanged += new System.EventHandler(this.ultraCheckEditor_CheckedChanged);
  842. //
  843. // textBox4
  844. //
  845. this.textBox4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  846. this.textBox4.Enabled = false;
  847. this.textBox4.Location = new System.Drawing.Point(364, 32);
  848. this.textBox4.Name = "textBox4";
  849. this.textBox4.Size = new System.Drawing.Size(263, 21);
  850. this.textBox4.TabIndex = 8;
  851. //
  852. // ultraCheckEditor3
  853. //
  854. this.ultraCheckEditor3.Location = new System.Drawing.Point(682, 5);
  855. this.ultraCheckEditor3.Name = "ultraCheckEditor3";
  856. this.ultraCheckEditor3.Size = new System.Drawing.Size(72, 20);
  857. this.ultraCheckEditor3.TabIndex = 7;
  858. this.ultraCheckEditor3.Tag = "textBox3";
  859. this.ultraCheckEditor3.Text = "组 名";
  860. this.ultraCheckEditor3.CheckedChanged += new System.EventHandler(this.ultraCheckEditor_CheckedChanged);
  861. //
  862. // textBox3
  863. //
  864. this.textBox3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  865. this.textBox3.Enabled = false;
  866. this.textBox3.Location = new System.Drawing.Point(754, 5);
  867. this.textBox3.Name = "textBox3";
  868. this.textBox3.Size = new System.Drawing.Size(199, 21);
  869. this.textBox3.TabIndex = 6;
  870. //
  871. // ultraCheckEditor2
  872. //
  873. this.ultraCheckEditor2.BackColor = System.Drawing.SystemColors.Control;
  874. this.ultraCheckEditor2.Location = new System.Drawing.Point(292, 5);
  875. this.ultraCheckEditor2.Name = "ultraCheckEditor2";
  876. this.ultraCheckEditor2.Size = new System.Drawing.Size(72, 20);
  877. this.ultraCheckEditor2.TabIndex = 5;
  878. this.ultraCheckEditor2.Tag = "textBox2";
  879. this.ultraCheckEditor2.Text = "键 值";
  880. this.ultraCheckEditor2.CheckedChanged += new System.EventHandler(this.ultraCheckEditor_CheckedChanged);
  881. //
  882. // textBox2
  883. //
  884. this.textBox2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  885. this.textBox2.Enabled = false;
  886. this.textBox2.Location = new System.Drawing.Point(364, 5);
  887. this.textBox2.Name = "textBox2";
  888. this.textBox2.Size = new System.Drawing.Size(263, 21);
  889. this.textBox2.TabIndex = 4;
  890. //
  891. // ultraCheckEditor1
  892. //
  893. this.ultraCheckEditor1.Location = new System.Drawing.Point(8, 5);
  894. this.ultraCheckEditor1.Name = "ultraCheckEditor1";
  895. this.ultraCheckEditor1.Size = new System.Drawing.Size(72, 20);
  896. this.ultraCheckEditor1.TabIndex = 3;
  897. this.ultraCheckEditor1.Tag = "textBox1";
  898. this.ultraCheckEditor1.Text = "菜 单 名";
  899. this.ultraCheckEditor1.CheckedChanged += new System.EventHandler(this.ultraCheckEditor_CheckedChanged);
  900. //
  901. // textBox1
  902. //
  903. this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
  904. this.textBox1.Enabled = false;
  905. this.textBox1.Location = new System.Drawing.Point(80, 5);
  906. this.textBox1.Name = "textBox1";
  907. this.textBox1.Size = new System.Drawing.Size(168, 21);
  908. this.textBox1.TabIndex = 1;
  909. //
  910. // _FrmBase_Toolbars_Dock_Area_Left
  911. //
  912. this._FrmBase_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  913. this._FrmBase_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control;
  914. this._FrmBase_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
  915. this._FrmBase_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
  916. this._FrmBase_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 25);
  917. this._FrmBase_Toolbars_Dock_Area_Left.Name = "_FrmBase_Toolbars_Dock_Area_Left";
  918. this._FrmBase_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 708);
  919. this._FrmBase_Toolbars_Dock_Area_Left.ToolbarsManager = this.ultraToolbarsManager1;
  920. //
  921. // _FrmBase_Toolbars_Dock_Area_Right
  922. //
  923. this._FrmBase_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  924. this._FrmBase_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control;
  925. this._FrmBase_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
  926. this._FrmBase_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
  927. this._FrmBase_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(1248, 25);
  928. this._FrmBase_Toolbars_Dock_Area_Right.Name = "_FrmBase_Toolbars_Dock_Area_Right";
  929. this._FrmBase_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 708);
  930. this._FrmBase_Toolbars_Dock_Area_Right.ToolbarsManager = this.ultraToolbarsManager1;
  931. //
  932. // _FrmBase_Toolbars_Dock_Area_Top
  933. //
  934. this._FrmBase_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  935. this._FrmBase_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control;
  936. this._FrmBase_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
  937. this._FrmBase_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
  938. this._FrmBase_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
  939. this._FrmBase_Toolbars_Dock_Area_Top.Name = "_FrmBase_Toolbars_Dock_Area_Top";
  940. this._FrmBase_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(1248, 25);
  941. this._FrmBase_Toolbars_Dock_Area_Top.ToolbarsManager = this.ultraToolbarsManager1;
  942. //
  943. // _FrmBase_Toolbars_Dock_Area_Bottom
  944. //
  945. this._FrmBase_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  946. this._FrmBase_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control;
  947. this._FrmBase_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
  948. this._FrmBase_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
  949. this._FrmBase_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 733);
  950. this._FrmBase_Toolbars_Dock_Area_Bottom.Name = "_FrmBase_Toolbars_Dock_Area_Bottom";
  951. this._FrmBase_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(1248, 0);
  952. this._FrmBase_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.ultraToolbarsManager1;
  953. //
  954. // ultraToolbarsManager3
  955. //
  956. this.ultraToolbarsManager3.DesignerFlags = 1;
  957. this.ultraToolbarsManager3.LockToolbars = true;
  958. this.ultraToolbarsManager3.MdiMergeable = false;
  959. this.ultraToolbarsManager3.ShowQuickCustomizeButton = false;
  960. this.ultraToolbarsManager3.Style = Infragistics.Win.UltraWinToolbars.ToolbarStyle.Office2000;
  961. buttonTool35.SharedProps.Caption = "上移";
  962. buttonTool35.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  963. buttonTool36.SharedProps.Caption = "下移";
  964. buttonTool36.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  965. buttonTool37.SharedProps.Caption = "左移";
  966. buttonTool37.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  967. buttonTool38.SharedProps.Caption = "右移";
  968. buttonTool38.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  969. buttonTool39.SharedProps.Caption = "保存";
  970. buttonTool39.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  971. buttonTool40.SharedProps.Caption = "刷新";
  972. buttonTool40.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  973. this.ultraToolbarsManager3.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
  974. buttonTool35,
  975. buttonTool36,
  976. buttonTool37,
  977. buttonTool38,
  978. buttonTool39,
  979. buttonTool40});
  980. //
  981. // dstToolBar
  982. //
  983. this.dstToolBar.DataSetName = "dstToolBar";
  984. this.dstToolBar.Tables.AddRange(new System.Data.DataTable[] {
  985. this.Toolbar});
  986. //
  987. // Toolbar
  988. //
  989. this.Toolbar.Columns.AddRange(new System.Data.DataColumn[] {
  990. this.KEY_,
  991. this.CATEGORY,
  992. this.CAPTION,
  993. this.TYPE,
  994. this.PARENTMENU,
  995. this.SETINFO,
  996. this.ROLEID});
  997. this.Toolbar.TableName = "Toolbar";
  998. //
  999. // KEY_
  1000. //
  1001. this.KEY_.Caption = "类";
  1002. this.KEY_.ColumnName = "KEY_";
  1003. //
  1004. // CATEGORY
  1005. //
  1006. this.CATEGORY.Caption = "工程";
  1007. this.CATEGORY.ColumnName = "CATEGORY";
  1008. //
  1009. // CAPTION
  1010. //
  1011. this.CAPTION.Caption = "菜单名";
  1012. this.CAPTION.ColumnName = "CAPTION";
  1013. //
  1014. // TYPE
  1015. //
  1016. this.TYPE.Caption = "类型";
  1017. this.TYPE.ColumnName = "TYPE";
  1018. //
  1019. // PARENTMENU
  1020. //
  1021. this.PARENTMENU.Caption = "父菜单";
  1022. this.PARENTMENU.ColumnName = "PARENTMENU";
  1023. //
  1024. // SETINFO
  1025. //
  1026. this.SETINFO.Caption = "菜单结构";
  1027. this.SETINFO.ColumnName = "SETINFO";
  1028. //
  1029. // ROLEID
  1030. //
  1031. this.ROLEID.Caption = "角色ID";
  1032. this.ROLEID.ColumnName = "ROLEID";
  1033. //
  1034. // dataSet3
  1035. //
  1036. this.dataSet3.DataSetName = "NewDataSet";
  1037. //
  1038. // FrmPurviewSet
  1039. //
  1040. this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
  1041. this.ClientSize = new System.Drawing.Size(1248, 733);
  1042. this.Controls.Add(this.ultraExpandableGroupBox1);
  1043. this.Controls.Add(this.ultraExpandableGroupBox2);
  1044. this.Controls.Add(this._FrmBase_Toolbars_Dock_Area_Left);
  1045. this.Controls.Add(this._FrmBase_Toolbars_Dock_Area_Right);
  1046. this.Controls.Add(this._FrmBase_Toolbars_Dock_Area_Top);
  1047. this.Controls.Add(this._FrmBase_Toolbars_Dock_Area_Bottom);
  1048. this.Name = "FrmPurviewSet";
  1049. this.Text = "权限设置";
  1050. this.Load += new System.EventHandler(this.FrmPurviewSet_Load);
  1051. ((System.ComponentModel.ISupportInitialize)(this.dataSet1)).EndInit();
  1052. ((System.ComponentModel.ISupportInitialize)(this.dataTable1)).EndInit();
  1053. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).EndInit();
  1054. ((System.ComponentModel.ISupportInitialize)(this.ultraGrid2)).EndInit();
  1055. ((System.ComponentModel.ISupportInitialize)(this.dataSet2)).EndInit();
  1056. ((System.ComponentModel.ISupportInitialize)(this.dataTable2)).EndInit();
  1057. ((System.ComponentModel.ISupportInitialize)(this.ultraTree1)).EndInit();
  1058. ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox2)).EndInit();
  1059. this.ultraExpandableGroupBox2.ResumeLayout(false);
  1060. this.ultraExpandableGroupBoxPanel2.ResumeLayout(false);
  1061. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager2)).EndInit();
  1062. ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).EndInit();
  1063. this.ultraExpandableGroupBox1.ResumeLayout(false);
  1064. this.ultraExpandableGroupBoxPanel1.ResumeLayout(false);
  1065. ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).EndInit();
  1066. this.panel1.ResumeLayout(false);
  1067. this.panel1.PerformLayout();
  1068. ((System.ComponentModel.ISupportInitialize)(this.cb_LoginID)).EndInit();
  1069. ((System.ComponentModel.ISupportInitialize)(this.txt_folder)).EndInit();
  1070. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager3)).EndInit();
  1071. ((System.ComponentModel.ISupportInitialize)(this.dstToolBar)).EndInit();
  1072. ((System.ComponentModel.ISupportInitialize)(this.Toolbar)).EndInit();
  1073. ((System.ComponentModel.ISupportInitialize)(this.dataSet3)).EndInit();
  1074. this.ResumeLayout(false);
  1075. }
  1076. #endregion
  1077. void AddMenuNode(UltraTreeNode pNode, DataTable dtab)
  1078. {
  1079. DataView dvw = dtab.Copy().DefaultView;
  1080. if (pNode.Key != "")
  1081. dvw.RowFilter = "PARENTID='" + pNode.Key + "'";
  1082. else
  1083. dvw.RowFilter = "PARENTID is null";
  1084. dvw.Sort = "XH ASC";
  1085. foreach (DataRowView drow in dvw)
  1086. {
  1087. UltraTreeNode tNode = pNode.Nodes.Add(drow["ID_"].ToString(), drow["CAPTION"].ToString());
  1088. AddMenuNode(tNode, dtab);
  1089. }
  1090. }
  1091. private void ultraCheckEditor_CheckedChanged(object sender, System.EventArgs e)
  1092. {
  1093. foreach (Control c in (sender as Infragistics.Win.UltraWinEditors.UltraCheckEditor).Parent.Controls)
  1094. {
  1095. if (c.Name == (sender as Infragistics.Win.UltraWinEditors.UltraCheckEditor).Tag.ToString())
  1096. {
  1097. c.Enabled = (sender as Infragistics.Win.UltraWinEditors.UltraCheckEditor).Checked;
  1098. if (c.Enabled)
  1099. c.BackColor = Color.LightCyan;
  1100. else
  1101. c.BackColor = Color.Silver;
  1102. }
  1103. }
  1104. }
  1105. #region "Menu ToolBar"
  1106. private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
  1107. {
  1108. switch (e.Tool.Key)
  1109. {
  1110. case "query":
  1111. this.DoQuery();
  1112. break;
  1113. case "add":
  1114. this.DoAdd();
  1115. break;
  1116. case "del":
  1117. this.DoDel();
  1118. break;
  1119. case "edit":
  1120. this.DoEdit();
  1121. break;
  1122. case "close":
  1123. this.Close();
  1124. break;
  1125. }
  1126. }
  1127. private void DoQuery()
  1128. {
  1129. string strOut = "";
  1130. DataSet obj = ClientCommon._RemotingHelp.ExecuteMethod("ServerCommon",
  1131. "Core.Mes.ServerCommon.UserInfoManager", "GetPt_menuinfo", new object[] { this.GetStrWhere() }, out strOut) as DataSet;
  1132. if (strOut != "")
  1133. {
  1134. MessageBox.Show(strOut); return;
  1135. }
  1136. obj.Tables[0].TableName = this.dataSet1.Tables[0].TableName;
  1137. this.dataSet1.Clear();
  1138. this.dataSet1.Merge(obj.Tables[0]);
  1139. Fill_Path();
  1140. }
  1141. private void DoAdd()
  1142. {
  1143. if (Core.Mes.ClientFrameWork.ClientCommon._UserInfo.LoginID.ToUpper() != "ROOT" & Core.Mes.ClientFrameWork.ClientCommon._UserInfo.UserRoleID.ToUpper() != "ADMIN001" & !ClientCommon._UserInfo.UserRoleName.ToString().Contains("管理员"))
  1144. {
  1145. MessageBox.Show("权限不够,请与管理员联系", "系统提示");
  1146. return;
  1147. }
  1148. string strOut = "";
  1149. string strCaption = this.textBox1.Text.Trim();
  1150. string strKey = this.textBox2.Text.Trim();
  1151. string strCategory = this.textBox3.Text.Trim();
  1152. string strRemark = this.textBox4.Text.Trim();
  1153. string strType = comboBox1.Text.Trim();
  1154. if (strCaption.Length == 0) strOut = "请输入菜单名!";
  1155. if (strKey.Length == 0) strOut = "请输入键值!";
  1156. if (strCategory.Length == 0) strOut = "请输入组名!";
  1157. if (strOut != "")
  1158. {
  1159. MessageBox.Show(strOut); return;
  1160. }
  1161. object obj = ClientCommon._RemotingHelp.ExecuteMethod("ServerCommon",
  1162. "Core.Mes.ServerCommon.UserInfoManager", "InsertPt_menuinfo", new object[]{ strKey,
  1163. strCategory, strCaption, strRemark, strType}, out strOut);
  1164. if (strOut != "")
  1165. {
  1166. MessageBox.Show(strOut); return;
  1167. }
  1168. string strID = obj.ToString();
  1169. UltraGridRow ugr = this.ultraGrid1.DisplayLayout.Bands[0].AddNew();
  1170. ugr.Cells["ID_"].Value = strID;
  1171. ugr.Cells["KEY_"].Value = strKey;
  1172. ugr.Cells["CATEGORY"].Value = strCategory;
  1173. ugr.Cells["CAPTION"].Value = strCaption;
  1174. ugr.Cells["REMARK"].Value = strRemark;
  1175. ugr.Cells["TYPE"].Value = strType;
  1176. ugr.Update();
  1177. ugr.Activated = true;
  1178. }
  1179. private void DoDel()
  1180. {
  1181. if (Core.Mes.ClientFrameWork.ClientCommon._UserInfo.LoginID.ToUpper() != "ROOT" & Core.Mes.ClientFrameWork.ClientCommon._UserInfo.UserRoleID.ToUpper() != "ADMIN001" & !ClientCommon._UserInfo.UserRoleName.ToString().Contains("管理员"))
  1182. {
  1183. MessageBox.Show("权限不够,请与管理员联系", "系统提示");
  1184. return;
  1185. }
  1186. string strOut = "";
  1187. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  1188. if (ugr == null)
  1189. {
  1190. MessageBox.Show("请选择要删除的行!");
  1191. return;
  1192. }
  1193. if (MessageBox.Show("是否确认删除选择的菜单信息?", "提示", MessageBoxButtons.YesNo) == DialogResult.No)
  1194. {
  1195. return;
  1196. }
  1197. int rowIndex = ugr.Index;
  1198. string strID = ugr.Cells["ID_"].Text;
  1199. object obj = ClientCommon._RemotingHelp.ExecuteMethod("ServerCommon",
  1200. "Core.Mes.ServerCommon.UserInfoManager", "DeletePt_menuinfo", new object[] { strID }, out strOut);
  1201. if (strOut != "")
  1202. {
  1203. MessageBox.Show(strOut); return;
  1204. }
  1205. ugr.Delete(false);
  1206. if (this.ultraGrid1.Rows.Count > 0)
  1207. {
  1208. if (rowIndex <= this.ultraGrid1.Rows.Count - 1)
  1209. this.ultraGrid1.Rows[rowIndex].Activate();
  1210. else
  1211. this.ultraGrid1.Rows[this.ultraGrid1.Rows.Count - 1].Activate();
  1212. }
  1213. MessageBox.Show("删除成功!");
  1214. }
  1215. private void DoEdit()
  1216. {
  1217. if (Core.Mes.ClientFrameWork.ClientCommon._UserInfo.LoginID.ToUpper() != "ROOT" & Core.Mes.ClientFrameWork.ClientCommon._UserInfo.UserRoleID.ToUpper() != "ADMIN001" & !ClientCommon._UserInfo.UserRoleName.ToString().Contains("管理员"))
  1218. {
  1219. MessageBox.Show("权限不够,请与管理员联系", "系统提示");
  1220. return;
  1221. }
  1222. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  1223. if (ugr == null)
  1224. {
  1225. MessageBox.Show("请选择要修改的行!");
  1226. return;
  1227. }
  1228. string strOut = "";
  1229. string strID = ugr.Cells["ID_"].Text;
  1230. string strCaption = this.textBox1.Text.Trim();
  1231. string strKey = this.textBox2.Text.Trim();
  1232. string strCategory = this.textBox3.Text.Trim();
  1233. string strRemark = this.textBox4.Text.Trim();
  1234. string strType = comboBox1.Text.Trim();
  1235. if (strCaption.Length == 0) strOut = "请输入菜单名!";
  1236. if (strKey.Length == 0) strOut = "请输入键值!";
  1237. if (strCategory.Length == 0) strOut = "请输入组名!";
  1238. if (strOut != "")
  1239. {
  1240. MessageBox.Show(strOut); return;
  1241. }
  1242. if (MessageBox.Show("是否确认修改选择的菜单信息?", "提示", MessageBoxButtons.YesNo) == DialogResult.No)
  1243. {
  1244. return;
  1245. }
  1246. object obj = ClientCommon._RemotingHelp.ExecuteMethod("ServerCommon",
  1247. "Core.Mes.ServerCommon.UserInfoManager", "UpdatePt_menuinfo", new object[]{ strID, strKey,
  1248. strCategory, strCaption, strRemark, strType}, out strOut);
  1249. if (strOut != "")
  1250. {
  1251. MessageBox.Show(strOut); return;
  1252. }
  1253. ugr.Cells["KEY_"].Value = strKey;
  1254. ugr.Cells["CATEGORY"].Value = strCategory;
  1255. ugr.Cells["CAPTION"].Value = strCaption;
  1256. ugr.Cells["REMARK"].Value = strRemark;
  1257. ugr.Cells["TYPE"].Value = strType;
  1258. ugr.Update();
  1259. MessageBox.Show("修改成功!");
  1260. }
  1261. #endregion
  1262. #region "Role ToolBar"
  1263. private void ultraToolbarsManager2_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
  1264. {
  1265. switch (e.Tool.Key)
  1266. {
  1267. case "refresh":
  1268. this.DoRefresh();
  1269. break;
  1270. case "select":
  1271. DoSelect();
  1272. break;
  1273. case "remove":
  1274. this.DoRemove();
  1275. break;
  1276. case "clear":
  1277. this.DoClear();
  1278. break;
  1279. case "copy":
  1280. this.DoCopy();
  1281. break;
  1282. case "plast":
  1283. this.DoPlast();
  1284. break;
  1285. case "save":
  1286. this.DoSave();
  1287. break;
  1288. case "left":
  1289. this.DoLeft();
  1290. break;
  1291. case "up":
  1292. this.DoUp();
  1293. break;
  1294. case "right":
  1295. this.DoRight();
  1296. break;
  1297. case "down":
  1298. this.DoDown();
  1299. break;
  1300. case "IMPORT":
  1301. this.Import();
  1302. break;
  1303. }
  1304. }
  1305. private void DoRefresh()
  1306. {
  1307. string strOut = "";
  1308. object obj = null;
  1309. if (Core.Mes.ClientFrameWork.ClientCommon._UserInfo.LoginID.ToUpper() == "ROOT" & Core.Mes.ClientFrameWork.ClientCommon._UserInfo.UserRoleID.ToUpper() == "ADMIN001")
  1310. {
  1311. obj = ClientCommon._RemotingHelp.ExecuteMethod("ServerCommon",
  1312. "Core.Mes.ServerCommon.UserInfoManager", "GetUam_role", null, out strOut);
  1313. }
  1314. else
  1315. {
  1316. obj = ClientCommon._RemotingHelp.ExecuteMethod("ServerCommon",
  1317. "Core.Mes.ServerCommon.UserInfoManager", "GetUser_Uam_Role", new object[] { RightsComm.GetChildDpt() }, out strOut);
  1318. }
  1319. if (strOut != "")
  1320. {
  1321. MessageBox.Show(strOut); return;
  1322. }
  1323. if (obj != null)
  1324. {
  1325. (obj as System.Data.DataSet).Tables[0].TableName = this.dataSet2.Tables[0].TableName;
  1326. this.dataSet2.Clear();
  1327. this.dataSet2.Merge((obj as System.Data.DataSet).Tables[0]);
  1328. }
  1329. }
  1330. private void DoSelect()
  1331. {
  1332. UltraGridRow ugr1 = this.ultraGrid1.ActiveRow;
  1333. UltraGridRow ugr2 = this.ultraGrid2.ActiveRow;
  1334. if (ugr1 == null)
  1335. {
  1336. MessageBox.Show("请选择菜单信息!"); return;
  1337. }
  1338. if (ugr2 == null)
  1339. {
  1340. MessageBox.Show("请选择角色信息!"); return;
  1341. }
  1342. string strID = ugr1.Cells["ID_"].Text;
  1343. string strName = ugr1.Cells["CAPTION"].Text;
  1344. if (CheckIsReKey(strID, ultraTree1.Nodes))
  1345. {
  1346. MessageBox.Show("键值重复!");
  1347. return;
  1348. }
  1349. try
  1350. {
  1351. if (this.ultraTree1.SelectedNodes.Count > 0)
  1352. {
  1353. Infragistics.Win.UltraWinTree.UltraTreeNode utn = new Infragistics.Win.UltraWinTree.UltraTreeNode(strID, strName);
  1354. utn.Tag = ugr1.Cells["ID_"].Text;
  1355. this.ultraTree1.SelectedNodes[0].Nodes.Add(utn);
  1356. }
  1357. else
  1358. {
  1359. Infragistics.Win.UltraWinTree.UltraTreeNode utn = new Infragistics.Win.UltraWinTree.UltraTreeNode(strID, strName);
  1360. utn.Tag = ugr1.Cells["ID_"].Text;
  1361. this.ultraTree1.Nodes.Add(utn);
  1362. }
  1363. }
  1364. catch (Exception ex)
  1365. {
  1366. MessageBox.Show(ex.Message);
  1367. }
  1368. }
  1369. private void DoRemove()
  1370. {
  1371. if (this.ultraTree1.SelectedNodes.Count == 0)
  1372. {
  1373. MessageBox.Show("请选择所要移除的菜单!"); return;
  1374. }
  1375. if (MessageBox.Show("是否确认移除选中的菜单!", "提示", MessageBoxButtons.YesNo) == DialogResult.No)
  1376. {
  1377. return;
  1378. }
  1379. if (this.ultraTree1.SelectedNodes.Count > 0)
  1380. {
  1381. this.ultraTree1.SelectedNodes[0].Remove();
  1382. }
  1383. }
  1384. private void DoClear()
  1385. {
  1386. if (MessageBox.Show("是否确认清除该角色的所要菜单!", "提示", MessageBoxButtons.YesNo) == DialogResult.No)
  1387. {
  1388. return;
  1389. }
  1390. this.ultraTree1.Nodes.Clear();
  1391. }
  1392. private void DoCopy()
  1393. {
  1394. UltraGridRow ugr = this.ultraGrid2.ActiveRow;
  1395. if (ugr == null)
  1396. {
  1397. MessageBox.Show("请选择要复制的角色!"); return;
  1398. }
  1399. foreach (UltraGridRow r in this.ultraGrid2.Rows)
  1400. {
  1401. r.Appearance.ForeColor = Color.Black;
  1402. }
  1403. ugr.Appearance.ForeColor = Color.Red;
  1404. }
  1405. private void DoPlast()
  1406. {
  1407. UltraGridRow nugr = this.ultraGrid2.ActiveRow;
  1408. if (nugr == null)
  1409. {
  1410. MessageBox.Show("请选择复制到角色!"); return;
  1411. }
  1412. if (nugr.Appearance.ForeColor == Color.Red)
  1413. {
  1414. MessageBox.Show("复制到自己?"); return;
  1415. }
  1416. UltraGridRow ugr = null;
  1417. foreach (UltraGridRow r in this.ultraGrid2.Rows)
  1418. {
  1419. if (r.Appearance.ForeColor == Color.Red)
  1420. {
  1421. ugr = r;
  1422. ugr.Appearance.ForeColor = Color.Black;
  1423. continue;
  1424. }
  1425. }
  1426. if (ugr == null)
  1427. {
  1428. MessageBox.Show("请选择要复制的角色!"); return;
  1429. }
  1430. if (MessageBox.Show("是否确认复制选定的配置信息,原信息将被删除!", "提示", MessageBoxButtons.YesNo) == DialogResult.No)
  1431. return;
  1432. string strOut = "";
  1433. object obj = ClientCommon._RemotingHelp.ExecuteMethod("ServerCommon",
  1434. "Core.Mes.ServerCommon.UserInfoManager", "PlastPt_menuinfo", new object[]{ ugr.Cells["ROLEID"].Text,
  1435. nugr.Cells["ROLEID"].Text}, out strOut);
  1436. if (strOut != "")
  1437. {
  1438. MessageBox.Show(strOut); return;
  1439. }
  1440. this.RefreshTreeDate();
  1441. }
  1442. private void DoSave()
  1443. {
  1444. UltraGridRow ugr = this.ultraGrid2.ActiveRow;
  1445. if (ugr == null)
  1446. {
  1447. MessageBox.Show("请选择要保存的角色信息!"); return;
  1448. }
  1449. ArrayList arMenuID = new ArrayList();
  1450. ArrayList arSetInfo = new ArrayList();
  1451. foreach (Infragistics.Win.UltraWinTree.UltraTreeNode utn in this.ultraTree1.Nodes)
  1452. {
  1453. arMenuID.Add(utn.Tag);
  1454. arSetInfo.Add(utn.Index.ToString().PadLeft(3, '0'));
  1455. if (utn.Nodes.Count > 0)
  1456. {
  1457. this.SetChildNodes(utn, utn.Index.ToString().PadLeft(3, '0'), ref arMenuID, ref arSetInfo);
  1458. }
  1459. }
  1460. string strOut = "";
  1461. object obj = ClientCommon._RemotingHelp.ExecuteMethod("ServerCommon",
  1462. "Core.Mes.ServerCommon.UserInfoManager", "SavePt_usermenuinfo", new object[]{ ugr.Cells["ROLEID"].Text,
  1463. arMenuID, arSetInfo}, out strOut);
  1464. if (strOut != "")
  1465. {
  1466. MessageBox.Show(strOut); return;
  1467. }
  1468. MessageBox.Show("保存成功!");
  1469. }
  1470. private void DoLeft()
  1471. {
  1472. Infragistics.Win.UltraWinTree.UltraTreeNode utn = this.ultraTree1.ActiveNode;
  1473. if (utn == null) return;
  1474. if (utn.Level == 0)
  1475. return;
  1476. else if (utn.Level == 1)
  1477. utn.Reposition(this.ultraTree1.Nodes);
  1478. else
  1479. {
  1480. Infragistics.Win.UltraWinTree.UltraTreeNode putn = utn.Parent.Parent;
  1481. utn.Reposition(putn.Nodes);
  1482. }
  1483. }
  1484. private void DoUp()
  1485. {
  1486. Infragistics.Win.UltraWinTree.UltraTreeNode utn = this.ultraTree1.ActiveNode;
  1487. if (utn == null) return;
  1488. int i = utn.Index;
  1489. if (i == 0) return;
  1490. if (utn.Level == 0)
  1491. utn.Reposition(this.ultraTree1.Nodes, i - 1);
  1492. else
  1493. utn.Reposition(utn.Parent.Nodes, i - 1);
  1494. }
  1495. private void DoRight()
  1496. {
  1497. Infragistics.Win.UltraWinTree.UltraTreeNode utn = this.ultraTree1.ActiveNode;
  1498. if (utn == null) return;
  1499. int i = utn.Index;
  1500. if (i == 0) return;
  1501. Infragistics.Win.UltraWinTree.UltraTreeNode putn;
  1502. if (utn.Level == 0)
  1503. putn = this.ultraTree1.Nodes[i - 1];
  1504. else
  1505. putn = utn.Parent.Nodes[i - 1];
  1506. utn.Reposition(putn.Nodes);
  1507. putn.ExpandAll();
  1508. }
  1509. private void DoDown()
  1510. {
  1511. Infragistics.Win.UltraWinTree.UltraTreeNode utn = this.ultraTree1.ActiveNode;
  1512. if (utn == null) return;
  1513. int i = utn.Index;
  1514. if (utn.Level == 0)
  1515. {
  1516. if (i == this.ultraTree1.Nodes.Count - 1) return;
  1517. utn.Reposition(this.ultraTree1.Nodes, i + 1);
  1518. }
  1519. else
  1520. {
  1521. if (i == utn.Parent.Nodes.Count - 1) return;
  1522. utn.Reposition(utn.Parent.Nodes, i + 1);
  1523. }
  1524. }
  1525. private void Import()
  1526. {
  1527. try
  1528. {
  1529. if (this.ultraGrid2.ActiveRow == null)
  1530. {
  1531. MessageBox.Show("请选择你要导入权限文件的角色", "系统提示");
  1532. return;
  1533. }
  1534. string FileName = "";
  1535. System.Windows.Forms.OpenFileDialog openfile = new OpenFileDialog();
  1536. openfile.Filter = "*.xml|";
  1537. openfile.Title = "选择权限文件";
  1538. openfile.ShowDialog();
  1539. if (openfile.FileName.Length > 0)
  1540. {
  1541. FileName = openfile.FileName;
  1542. }
  1543. else
  1544. {
  1545. return;
  1546. }
  1547. string RoleID = this.ultraGrid2.ActiveRow.Cells[0].Text;
  1548. if (ImportRole(FileName, RoleID))
  1549. {
  1550. MessageBox.Show("导入成功", "系统提示");
  1551. RefreshTreeDate();
  1552. }
  1553. else
  1554. {
  1555. MessageBox.Show("导入失败", "系统提示");
  1556. }
  1557. }
  1558. catch (System.Exception ex)
  1559. {
  1560. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1561. }
  1562. }
  1563. #endregion
  1564. private string GetStrWhere()
  1565. {
  1566. string str = "";
  1567. if (this.ultraCheckEditor1.Checked && this.textBox1.Text.Trim().Length > 0)
  1568. {
  1569. str += string.Format(" and caption like '%{0}%' ", this.textBox1.Text.Trim());
  1570. }
  1571. if (this.ultraCheckEditor2.Checked && this.textBox2.Text.Trim().Length > 0)
  1572. {
  1573. str += string.Format(" and upper(key_) like upper('%{0}%') ", this.textBox2.Text.Trim());
  1574. }
  1575. if (this.ultraCheckEditor3.Checked && this.textBox3.Text.Trim().Length > 0)
  1576. {
  1577. str += string.Format(" and upper(category) like upper('%{0}%') ", this.textBox3.Text.Trim());
  1578. }
  1579. if (this.ultraCheckEditor4.Checked && this.textBox4.Text.Trim().Length > 0)
  1580. {
  1581. str += string.Format(" and upper(remark) like upper('%{0}%') ", this.textBox4.Text.Trim());
  1582. }
  1583. if (ultraCheckEditor5.Checked && comboBox1.Text.Trim().Length > 0)
  1584. {
  1585. str += string.Format(" and type='{0}'", comboBox1.Text.Trim());
  1586. }
  1587. return str;
  1588. }
  1589. UltraTreeNode findNode(string sKey, UltraTreeNode pNode)
  1590. {
  1591. for (int i = 0; i < pNode.Nodes.Count; i++)
  1592. {
  1593. if (pNode.Nodes[i].Key == sKey)
  1594. return pNode.Nodes[i];
  1595. else
  1596. {
  1597. UltraTreeNode fNode = findNode(sKey, pNode.Nodes[i]);
  1598. if (fNode != null)
  1599. return fNode;
  1600. }
  1601. }
  1602. return null;
  1603. }
  1604. private void ultraGrid1_AfterRowActivate(object sender, System.EventArgs e)
  1605. {
  1606. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  1607. this.textBox1.Text = ugr.Cells["CAPTION"].Text;
  1608. this.textBox2.Text = ugr.Cells["KEY_"].Text;
  1609. this.textBox3.Text = ugr.Cells["CATEGORY"].Text;
  1610. this.textBox4.Text = ugr.Cells["REMARK"].Text;
  1611. comboBox1.Text = ugr.Cells["TYPE"].Text;
  1612. }
  1613. void fillCheckMenuToRole(TreeNodesCollection pNodes, TreeNodesCollection menuNodes)
  1614. {
  1615. for (int i = 0; i < menuNodes.Count; i++)
  1616. {
  1617. if (menuNodes[i].CheckedState == CheckState.Checked)
  1618. {
  1619. if (CheckIsReKey(menuNodes[i].Key, ultraTree1.Nodes))
  1620. {
  1621. MessageBox.Show("键值重复!");
  1622. return;
  1623. }
  1624. UltraTreeNode nNode = new UltraTreeNode(menuNodes[i].Key, menuNodes[i].Text);
  1625. nNode.Tag = menuNodes[i].Key;
  1626. pNodes.Add(nNode);
  1627. if (menuNodes[i].Nodes.Count > 0)
  1628. fillCheckMenuToRole(nNode.Nodes, menuNodes[i].Nodes);
  1629. }
  1630. }
  1631. }
  1632. private bool CheckIsReKey(string sFindID, TreeNodesCollection uNodes)
  1633. {
  1634. foreach (UltraTreeNode node in uNodes)
  1635. {
  1636. if (node.Tag.ToString() == sFindID) return true;
  1637. if (node.Nodes.Count > 0)
  1638. {
  1639. if (CheckIsReKey(sFindID, node.Nodes))
  1640. return true;
  1641. }
  1642. }
  1643. return false;
  1644. }
  1645. private void SetChildNodes(Infragistics.Win.UltraWinTree.UltraTreeNode putn, string strParent, ref ArrayList ar1, ref ArrayList ar2)
  1646. {
  1647. string strSetInfo = "";
  1648. string strCurr = "";
  1649. foreach (Infragistics.Win.UltraWinTree.UltraTreeNode utn in putn.Nodes)
  1650. {
  1651. strCurr = utn.Index.ToString().PadLeft(3, '0');
  1652. strSetInfo = strParent + strCurr;
  1653. ar1.Add(utn.Tag);
  1654. ar2.Add(strSetInfo);
  1655. if (utn.Nodes.Count > 0)
  1656. {
  1657. this.SetChildNodes(utn, strSetInfo, ref ar1, ref ar2);
  1658. }
  1659. }
  1660. }
  1661. private void FrmPurviewSet_Load(object sender, System.EventArgs e)
  1662. {
  1663. comboBox1.SelectedIndex = 0;
  1664. if (Core.Mes.ClientFrameWork.ClientCommon._UserInfo.UserName == "谢康宏")
  1665. this.btn_ImportAll.Visible = this.txt_folder.Visible = true;
  1666. else
  1667. this.btn_ImportAll.Visible = this.txt_folder.Visible = false;
  1668. //this.btn_ImportAll.Visible = this.txt_folder.Visible = true;
  1669. //获取 用户-角色 对应表
  1670. string strOut = "";
  1671. DataSet obj1 = ClientCommon._RemotingHelp.ExecuteMethod("ServerCommon",
  1672. "Core.Mes.ServerCommon.UserInfoManager", "GetUserRolePairs", new object[] { }, out strOut) as DataSet;
  1673. if (strOut != "")
  1674. {
  1675. MessageBox.Show("获取所有登录ID失败!\n" + strOut); return;
  1676. }
  1677. if (dataSet3.Tables.Contains("UserRole"))
  1678. {
  1679. dataSet3.Tables["UserRole"].Reset();
  1680. }
  1681. else
  1682. {
  1683. dataSet3.Tables.Add(new DataTable("UserRole"));
  1684. }
  1685. dataSet3.Tables["UserRole"].Merge(obj1.Tables[0], true, MissingSchemaAction.Add);
  1686. cb_LoginID.SuspendLayout();
  1687. foreach (DataRow dr in dataSet3.Tables["UserRole"].Rows)
  1688. {
  1689. cb_LoginID.Items.Add(dr["LOGINID"].ToString());
  1690. }
  1691. cb_LoginID.Text = ClientCommon._UserInfo.LoginID.ToString();
  1692. if (ClientCommon._UserInfo.UserRoleName.ToString().Contains("管理员"))
  1693. {
  1694. cb_LoginID.Enabled = true;
  1695. }
  1696. else
  1697. {
  1698. cb_LoginID.Enabled = false;
  1699. }
  1700. cb_LoginID.ResumeLayout();
  1701. }
  1702. private void ultraGrid2_AfterRowActivate(object sender, System.EventArgs e)
  1703. {
  1704. this.RefreshTreeDate();
  1705. }
  1706. private void RefreshTreeDate()
  1707. {
  1708. string strOut = "";
  1709. DataSet obj = ClientCommon._RemotingHelp.ExecuteMethod("ServerCommon",
  1710. "Core.Mes.ServerCommon.UserInfoManager", "GetPurviewTree",
  1711. new object[] { string.Format(" and roleid = '{0}'", this.ultraGrid2.ActiveRow.Cells["ROLEID"].Text) },
  1712. out strOut) as DataSet;
  1713. if (strOut != "")
  1714. {
  1715. MessageBox.Show(strOut); return;
  1716. }
  1717. this.ultraTree1.Nodes.Clear();
  1718. for (int i = 0; i < obj.Tables[0].Rows.Count; i++)
  1719. {
  1720. try
  1721. {
  1722. string strSet = obj.Tables[0].Rows[i]["SETINFO"].ToString();
  1723. string strName = obj.Tables[0].Rows[i]["MENUNAME"].ToString();
  1724. string strKey = obj.Tables[0].Rows[i]["MENUID"].ToString();
  1725. Infragistics.Win.UltraWinTree.UltraTreeNode utn = null;
  1726. utn = new Infragistics.Win.UltraWinTree.UltraTreeNode(strSet, strName);
  1727. utn.Tag = strKey;
  1728. if (strSet.Length == 3)
  1729. {
  1730. this.ultraTree1.Nodes.Add(utn);
  1731. }
  1732. else
  1733. {
  1734. addChildNode(ultraTree1.Nodes, utn);
  1735. //foreach ( Infragistics.Win.UltraWinTree.UltraTreeNode cutn in this.ultraTree1.Nodes )
  1736. //{
  1737. // if (cutn.Key == strSet.Substring(0, cutn.Key.Length))
  1738. // {
  1739. // utn = new Infragistics.Win.UltraWinTree.UltraTreeNode(strSet, strName);
  1740. // utn.Tag = strKey;
  1741. // cutn.Nodes.Add(utn);
  1742. // }
  1743. // if (cutn.Nodes.Count > 0)
  1744. // {
  1745. // this.LoadChileNodes(cutn, strSet, strKey, strName);
  1746. // }
  1747. //}
  1748. }
  1749. }
  1750. catch { }
  1751. }
  1752. }
  1753. private void addChildNode(Infragistics.Win.UltraWinTree.TreeNodesCollection nodeColl, Infragistics.Win.UltraWinTree.UltraTreeNode newNode)
  1754. {
  1755. foreach (Infragistics.Win.UltraWinTree.UltraTreeNode aNode in nodeColl)
  1756. {
  1757. if (aNode.Key == newNode.Key.Substring(0, newNode.Key.Length - 3))
  1758. {
  1759. aNode.Nodes.Add(newNode);
  1760. break;
  1761. }
  1762. else
  1763. {
  1764. addChildNode(aNode.Nodes, newNode);
  1765. }
  1766. }
  1767. }
  1768. void checkParent(UltraTreeNode node)
  1769. {
  1770. if (node.Parent != null)
  1771. {
  1772. node.Parent.CheckedState = CheckState.Checked;
  1773. checkParent(node.Parent);
  1774. }
  1775. }
  1776. void checkChild(UltraTreeNode node, CheckState state)
  1777. {
  1778. foreach (UltraTreeNode cNode in node.Nodes)
  1779. {
  1780. cNode.CheckedState = state;
  1781. checkChild(cNode, state);
  1782. }
  1783. }
  1784. void resetParent(UltraTreeNode node)
  1785. {
  1786. if (node.Parent != null)
  1787. {
  1788. bool NoCheck = true;
  1789. foreach (UltraTreeNode cNode in node.Parent.Nodes)
  1790. {
  1791. if (cNode == node) continue;
  1792. if (cNode.CheckedState == CheckState.Checked)
  1793. {
  1794. NoCheck = false;
  1795. break;
  1796. }
  1797. }
  1798. if (NoCheck)
  1799. {
  1800. node.Parent.CheckedState = CheckState.Unchecked;
  1801. resetParent(node.Parent);
  1802. }
  1803. }
  1804. }
  1805. void menuPosSave()
  1806. {
  1807. string err = "";
  1808. ClientCommon._RemotingHelp.ExecuteMethod("ServerCommon", "Core.Mes.ServerCommon.UserInfoManager", "updatePT_MenuPos",
  1809. new object[] { dtMenuPos }, out err);
  1810. if (err != "")
  1811. {
  1812. MessageBox.Show("保存失败!/n" + err);
  1813. }
  1814. else
  1815. {
  1816. dtMenuPos.AcceptChanges();
  1817. }
  1818. }
  1819. #region ultraTree2 dragdrop
  1820. private UltraTree_DropHightLight_DrawFilter_Class UltraTree_DropHightLight_DrawFilter = new UltraTree_DropHightLight_DrawFilter_Class();
  1821. private void UltraTree_DropHightLight_DrawFilter_Invalidate(object sender, System.EventArgs e)
  1822. {
  1823. }
  1824. private void UltraTree_DropHightLight_DrawFilter_QueryStateAllowedForNode(Object sender, UltraTree_DropHightLight_DrawFilter_Class.QueryStateAllowedForNodeEventArgs e)
  1825. {
  1826. if (e.Node.Level == 0)
  1827. {
  1828. e.StatesAllowed = DropLinePositionEnum.OnNode;
  1829. return;
  1830. }
  1831. if (e.Node.Selected)
  1832. {
  1833. e.StatesAllowed = DropLinePositionEnum.AboveNode | DropLinePositionEnum.BelowNode;
  1834. UltraTree_DropHightLight_DrawFilter.EdgeSensitivity = e.Node.Bounds.Height / 2;
  1835. }
  1836. else
  1837. {
  1838. UltraTree_DropHightLight_DrawFilter.EdgeSensitivity = e.Node.Bounds.Height / 3;
  1839. }
  1840. }
  1841. #endregion
  1842. private bool ImportRole(string FileName, string RoleID)
  1843. {
  1844. try
  1845. {
  1846. if (!System.IO.File.Exists(FileName))
  1847. {
  1848. return false;
  1849. }
  1850. Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ImpToolbar = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager();
  1851. ImpToolbar.LoadFromXml(FileName);
  1852. this.dstToolBar.Tables[0].Clear();
  1853. this.dstToolBar.Tables[0].AcceptChanges();
  1854. string SetInfo = "";
  1855. string ParentSetInfo = "";
  1856. if (ImpToolbar.Toolbars.Count > 0)
  1857. {
  1858. for (int i = 0; i < ImpToolbar.Toolbars.Count; i++)
  1859. {
  1860. for (int j = 0; j < ImpToolbar.Toolbars[i].Tools.Count; j++)
  1861. {
  1862. SetInfo = Convert.ToString(j).PadLeft(3, '0');
  1863. GetMenuInfo(ImpToolbar.Toolbars[i].Tools[j], "ROOT", SetInfo, ParentSetInfo, RoleID);
  1864. }
  1865. }
  1866. if (!CommitImportData())
  1867. {
  1868. return false;
  1869. }
  1870. return true;
  1871. }
  1872. return false;
  1873. }
  1874. catch (System.Exception ex)
  1875. {
  1876. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1877. return false;
  1878. }
  1879. }
  1880. private void GetMenuInfo(Object MenuTool, string ParentMenuKey, string SetInfo, string ParentSetInfo, string RoleID)
  1881. {
  1882. try
  1883. {
  1884. if (MenuTool.GetType() == typeof(Infragistics.Win.UltraWinToolbars.PopupMenuTool))
  1885. {
  1886. Infragistics.Win.UltraWinToolbars.PopupMenuTool tmpPMenu = (MenuTool as Infragistics.Win.UltraWinToolbars.PopupMenuTool);
  1887. System.Data.DataRow nprow = this.dstToolBar.Tables[0].NewRow();
  1888. nprow["KEY_"] = tmpPMenu.Key.ToString();
  1889. nprow["CATEGORY"] = tmpPMenu.SharedProps.Category.ToString();
  1890. nprow["CAPTION"] = tmpPMenu.SharedProps.Caption.ToString();
  1891. nprow["TYPE"] = "MENU";
  1892. nprow["PARENTMENU"] = ParentMenuKey;
  1893. nprow["SETINFO"] = ParentSetInfo + SetInfo;
  1894. nprow["ROLEID"] = RoleID;
  1895. this.dstToolBar.Tables[0].Rows.Add(nprow);
  1896. if (tmpPMenu.Tools.Count > 0)
  1897. {
  1898. ParentSetInfo = ParentSetInfo + SetInfo;
  1899. for (int i = 0; i < tmpPMenu.Tools.Count; i++)
  1900. {
  1901. SetInfo = Convert.ToString(i).PadLeft(3, '0');
  1902. GetMenuInfo(tmpPMenu.Tools[i], tmpPMenu.Key.ToString(), SetInfo, ParentSetInfo, RoleID);
  1903. }
  1904. }
  1905. }
  1906. else
  1907. {
  1908. Infragistics.Win.UltraWinToolbars.ButtonTool tmpMenu = (MenuTool as Infragistics.Win.UltraWinToolbars.ButtonTool);
  1909. System.Data.DataRow nrow = this.dstToolBar.Tables[0].NewRow();
  1910. nrow["KEY_"] = tmpMenu.Key.ToString();
  1911. nrow["CATEGORY"] = tmpMenu.SharedProps.Category.ToString();
  1912. nrow["CAPTION"] = tmpMenu.SharedProps.Caption.ToString();
  1913. nrow["TYPE"] = "FORM";
  1914. nrow["PARENTMENU"] = ParentMenuKey;
  1915. nrow["SETINFO"] = ParentSetInfo + SetInfo;
  1916. nrow["ROLEID"] = RoleID;
  1917. this.dstToolBar.Tables[0].Rows.Add(nrow);
  1918. //this.dstToolBar.AcceptChanges();
  1919. }
  1920. }
  1921. catch (System.Exception ex)
  1922. {
  1923. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1924. }
  1925. }
  1926. private bool CommitImportData()
  1927. {
  1928. try
  1929. {
  1930. if (this.dstToolBar.Tables[0].GetChanges() != null && this.dstToolBar.Tables[0].GetChanges().Rows.Count > 0)
  1931. {
  1932. string err = "";
  1933. object obj = ClientCommon._RemotingHelp.ExecuteMethod("PurviewManager",
  1934. "Core.Mes.PurviewManager.UAM_ROLE", "CommitImportData", new object[] { this.dstToolBar.Tables[0].GetChanges() }, out err);
  1935. if (obj != null && obj.ToString() == "1")
  1936. {
  1937. this.dstToolBar.Tables[0].Clear();
  1938. this.dstToolBar.AcceptChanges();
  1939. return true;
  1940. }
  1941. else if (err.Length > 0)
  1942. {
  1943. return false;
  1944. }
  1945. }
  1946. return true;
  1947. }
  1948. catch (System.Exception ex)
  1949. {
  1950. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1951. return false;
  1952. }
  1953. }
  1954. private void btn_ImportAll_Click(object sender, EventArgs e)
  1955. {
  1956. try
  1957. {
  1958. string err = "";
  1959. string FileName = "";
  1960. string Folder = this.txt_folder.Text;
  1961. string RoleID = "";
  1962. object obj = ClientCommon._RemotingHelp.ExecuteMethod("PurviewManager",
  1963. "Core.Mes.PurviewManager.UAM_ROLE", "GetRoleData", null, out err);
  1964. if (obj != null)
  1965. {
  1966. foreach (System.Data.DataRow row in (obj as System.Data.DataSet).Tables[0].Rows)
  1967. {
  1968. if (row["MEMO"].GetType() != typeof(System.DBNull))
  1969. {
  1970. FileName = row["MEMO"].ToString();
  1971. FileName = @Folder + FileName;
  1972. RoleID = row["ROLEID"].ToString();
  1973. if (ImportRole(FileName, RoleID))
  1974. {
  1975. System.IO.File.Delete(FileName);
  1976. }
  1977. else
  1978. {
  1979. System.Diagnostics.Debug.WriteLine(FileName + " 失败");
  1980. }
  1981. }
  1982. }
  1983. }
  1984. }
  1985. catch (System.Exception ex)
  1986. {
  1987. System.Diagnostics.Debug.WriteLine(ex.ToString());
  1988. }
  1989. }
  1990. private void cb_LoginID_ValueChanged(object sender, EventArgs e)
  1991. {
  1992. Fill_Path();
  1993. }
  1994. private void Fill_Path()
  1995. {
  1996. if (cb_LoginID.Text != "" && dataSet1.Tables[0].Rows.Count > 0)
  1997. {
  1998. string s_Role = "";
  1999. DataRow[] drs = dataSet3.Tables["UserRole"].Select("LoginID='" + cb_LoginID.Text.Trim() + "'");
  2000. if (drs != null && drs.GetLength(0) > 0)
  2001. {
  2002. s_Role = drs[0]["ROLEID"].ToString().Trim();
  2003. if (s_Role == "") return;
  2004. }
  2005. else
  2006. {
  2007. return;
  2008. }
  2009. Load_Role_Menu(s_Role);
  2010. if (dataSet3.Tables["RoleMenu"] == null || dataSet3.Tables["RoleMenu"].Rows.Count <= 0)
  2011. {
  2012. return;
  2013. }
  2014. ultraGrid1.BeginUpdate();
  2015. ultraGrid1.SuspendRowSynchronization();
  2016. try
  2017. {
  2018. DataTable dt = dataSet3.Tables["RoleMenu"];
  2019. foreach (DataRow dr in dataSet1.Tables[0].Rows)
  2020. {
  2021. // T.ROLEID, T.MENUID, T.SETINFO, M.KEY_, M.CATEGORY, M.CAPTION, M.REMARK
  2022. drs = dt.Select(string.Format("ROLEID='{0}' AND MENUID='{1}'", s_Role, dr["ID_"]));
  2023. if (drs == null || drs.GetLength(0) <= 0)
  2024. {
  2025. dr["PATH_"] = "";
  2026. continue;
  2027. }
  2028. else
  2029. {
  2030. string s_path = string.Format("{0}{1}", (((drs[0]["SETINFO"].ToString().Length / 3) <= 1) ? "" : "─"), drs[0]["CAPTION"].ToString());
  2031. string s_setinfo = drs[0]["SETINFO"].ToString();
  2032. for (int idx = (s_setinfo.Length / 3) - 1; idx > 0; idx--)
  2033. {
  2034. DataRow[] dr_menu = dt.Select(string.Format("ROLEID='{0}' AND SETINFO='{1}'", s_Role, s_setinfo.Substring(0, idx * 3)));
  2035. if (dr_menu == null || dr_menu.GetLength(0) <= 0)
  2036. {
  2037. s_path = ((idx <= 1) ? "" : "─") + "(未知路径节点)" + s_path;
  2038. }
  2039. else
  2040. {
  2041. s_path = ((idx <= 1) ? "" : "─") + dr_menu[0]["CAPTION"] + s_path;
  2042. }
  2043. }
  2044. dr["PATH_"] = s_path;
  2045. }
  2046. }
  2047. }
  2048. finally
  2049. {
  2050. ultraGrid1.ResumeRowSynchronization();
  2051. ultraGrid1.EndUpdate();
  2052. }
  2053. }
  2054. }
  2055. //获取 角色-菜单 对应表
  2056. private void Load_Role_Menu(string Role_ID)
  2057. {
  2058. if (Role_ID.Trim() == "")
  2059. {
  2060. dataSet3.Tables["RoleMenu"].Reset();
  2061. }
  2062. else
  2063. {
  2064. if (!dataSet3.Tables.Contains("RoleMenu") || dataSet3.Tables["RoleMenu"].Rows.Count <= 0)
  2065. {
  2066. string strOut = "";
  2067. DataSet obj2 = ClientCommon._RemotingHelp.ExecuteMethod("ServerCommon",
  2068. "Core.Mes.ServerCommon.UserInfoManager", "GetRoleMenuPairs", new object[] { Role_ID }, out strOut) as DataSet;
  2069. if (strOut != "")
  2070. {
  2071. MessageBox.Show(strOut); return;
  2072. }
  2073. if (dataSet3.Tables.Contains("RoleMenu"))
  2074. {
  2075. dataSet3.Tables["RoleMenu"].Reset();
  2076. }
  2077. else
  2078. {
  2079. dataSet3.Tables.Add(new DataTable("RoleMenu"));
  2080. }
  2081. dataSet3.Tables["RoleMenu"].Merge(obj2.Tables[0], true, MissingSchemaAction.Add);
  2082. }
  2083. }
  2084. }
  2085. }//class
  2086. }