e0152813783ba3c28247768b2a8cb0f2589f07b5.svn-base 57 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313
  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 Core.Mes.ClientFrameWork;
  8. using Core.Mes.IBaseInterface;
  9. //using Core.Mes.ServerFrameWork;
  10. using Infragistics.Win.UltraWinGrid;
  11. namespace Core.Mes.ClientPurviewManager
  12. {
  13. /// <summary>
  14. /// FrmRole 的摘要说明。
  15. /// </summary>
  16. public class FrmRole : Core.Mes.ClientFrameWork.FrmBase
  17. {
  18. private Infragistics.Win.UltraWinToolbars.UltraToolbarsManager ultraToolbarsManager1;
  19. private System.Windows.Forms.Panel FrmRole_Fill_Panel;
  20. private System.Windows.Forms.Panel panel1;
  21. private Infragistics.Win.Misc.UltraExpandableGroupBox ultraExpandableGroupBox1;
  22. private Infragistics.Win.Misc.UltraExpandableGroupBoxPanel ultraExpandableGroupBoxPanel1;
  23. private Infragistics.Win.Misc.UltraLabel ultraLabel1;
  24. private Infragistics.Win.Misc.UltraLabel ultraLabel2;
  25. private Infragistics.Win.Misc.UltraLabel ultraLabel3;
  26. private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor1;
  27. private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor2;
  28. private Infragistics.Win.UltraWinEditors.UltraComboEditor ultraComboEditor1;
  29. // private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor3;
  30. private System.ComponentModel.IContainer components;
  31. public DataSet _roleData;
  32. public string _selectSQL;
  33. public bool _saveFlag = false;
  34. public bool IsAdminFlag = false;
  35. private System.Windows.Forms.Panel panel2;
  36. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Left;
  37. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Right;
  38. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Top;
  39. private Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea _panel1_Toolbars_Dock_Area_Bottom;
  40. private System.Windows.Forms.Panel panel3;
  41. private Infragistics.Win.UltraWinEditors.UltraCheckEditor ultraCheckEditor1;
  42. private Infragistics.Win.UltraWinGrid.UltraGrid ultraGrid1;
  43. private Infragistics.Win.UltraWinEditors.UltraComboEditor ultraComboEditor4;
  44. private Infragistics.Win.Misc.UltraLabel ultraLabel8;
  45. private string[] _fileNames;
  46. private DataSet _departmentData;
  47. private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor3;
  48. string operDepart = "";
  49. string allDept = "";
  50. private Infragistics.Win.UltraWinEditors.UltraTextEditor ultraTextEditor4;
  51. private Infragistics.Win.Misc.UltraLabel ultraLabel4;
  52. string selDept = "";
  53. public FrmRole()
  54. {
  55. //
  56. // Windows 窗体设计器支持所必需的
  57. //
  58. InitializeComponent();
  59. //
  60. // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
  61. //
  62. }
  63. /// <summary>
  64. /// 清理所有正在使用的资源。
  65. /// </summary>
  66. protected override void Dispose(bool disposing)
  67. {
  68. if (disposing)
  69. {
  70. if (components != null)
  71. {
  72. components.Dispose();
  73. }
  74. }
  75. base.Dispose(disposing);
  76. }
  77. #region Windows 窗体设计器生成的代码
  78. /// <summary>
  79. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  80. /// 此方法的内容。
  81. /// </summary>
  82. private void InitializeComponent()
  83. {
  84. this.components = new System.ComponentModel.Container();
  85. Infragistics.Win.UltraWinToolbars.UltraToolbar ultraToolbar1 = new Infragistics.Win.UltraWinToolbars.UltraToolbar("Toolbar1");
  86. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool1 = new Infragistics.Win.UltraWinToolbars.ButtonTool("query");
  87. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool2 = new Infragistics.Win.UltraWinToolbars.ButtonTool("add");
  88. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool3 = new Infragistics.Win.UltraWinToolbars.ButtonTool("edit");
  89. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool4 = new Infragistics.Win.UltraWinToolbars.ButtonTool("del");
  90. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool5 = new Infragistics.Win.UltraWinToolbars.ButtonTool("close");
  91. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool6 = new Infragistics.Win.UltraWinToolbars.ButtonTool("back");
  92. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool7 = new Infragistics.Win.UltraWinToolbars.ButtonTool("add");
  93. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool8 = new Infragistics.Win.UltraWinToolbars.ButtonTool("edit");
  94. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool9 = new Infragistics.Win.UltraWinToolbars.ButtonTool("del");
  95. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool10 = new Infragistics.Win.UltraWinToolbars.ButtonTool("query");
  96. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool11 = new Infragistics.Win.UltraWinToolbars.ButtonTool("close");
  97. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool12 = new Infragistics.Win.UltraWinToolbars.ButtonTool("purset");
  98. Infragistics.Win.UltraWinToolbars.ButtonTool buttonTool13 = new Infragistics.Win.UltraWinToolbars.ButtonTool("back");
  99. Infragistics.Win.Appearance appearance1 = new Infragistics.Win.Appearance();
  100. Infragistics.Win.UltraWinGrid.UltraGridBand ultraGridBand1 = new Infragistics.Win.UltraWinGrid.UltraGridBand("Band 0", -1);
  101. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn1 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("Column 0");
  102. Infragistics.Win.Appearance appearance2 = new Infragistics.Win.Appearance();
  103. Infragistics.Win.Appearance appearance3 = new Infragistics.Win.Appearance();
  104. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn2 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("Column 1");
  105. Infragistics.Win.UltraWinGrid.UltraGridColumn ultraGridColumn3 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("Column 2");
  106. Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
  107. Infragistics.Win.Appearance appearance5 = new Infragistics.Win.Appearance();
  108. Infragistics.Win.Appearance appearance6 = new Infragistics.Win.Appearance();
  109. Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
  110. Infragistics.Win.Appearance appearance8 = new Infragistics.Win.Appearance();
  111. Infragistics.Win.Appearance appearance9 = new Infragistics.Win.Appearance();
  112. Infragistics.Win.Appearance appearance10 = new Infragistics.Win.Appearance();
  113. Infragistics.Win.Appearance appearance11 = new Infragistics.Win.Appearance();
  114. Infragistics.Win.Appearance appearance12 = new Infragistics.Win.Appearance();
  115. Infragistics.Win.Appearance appearance13 = new Infragistics.Win.Appearance();
  116. Infragistics.Win.Appearance appearance14 = new Infragistics.Win.Appearance();
  117. Infragistics.Win.Appearance appearance15 = new Infragistics.Win.Appearance();
  118. Infragistics.Win.Appearance appearance16 = new Infragistics.Win.Appearance();
  119. Infragistics.Win.Appearance appearance17 = new Infragistics.Win.Appearance();
  120. Infragistics.Win.Appearance appearance18 = new Infragistics.Win.Appearance();
  121. Infragistics.Win.Appearance appearance19 = new Infragistics.Win.Appearance();
  122. Infragistics.Win.UltraWinEditors.EditorButton editorButton1 = new Infragistics.Win.UltraWinEditors.EditorButton();
  123. Infragistics.Win.Appearance appearance20 = new Infragistics.Win.Appearance();
  124. Infragistics.Win.Appearance appearance21 = new Infragistics.Win.Appearance();
  125. Infragistics.Win.Appearance appearance22 = new Infragistics.Win.Appearance();
  126. Infragistics.Win.Appearance appearance23 = new Infragistics.Win.Appearance();
  127. Infragistics.Win.UltraWinEditors.EditorButton editorButton2 = new Infragistics.Win.UltraWinEditors.EditorButton("part");
  128. this.ultraToolbarsManager1 = new Infragistics.Win.UltraWinToolbars.UltraToolbarsManager(this.components);
  129. this.panel1 = new System.Windows.Forms.Panel();
  130. this._panel1_Toolbars_Dock_Area_Left = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  131. this._panel1_Toolbars_Dock_Area_Right = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  132. this._panel1_Toolbars_Dock_Area_Top = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  133. this._panel1_Toolbars_Dock_Area_Bottom = new Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea();
  134. this.FrmRole_Fill_Panel = new System.Windows.Forms.Panel();
  135. this.ultraGrid1 = new Infragistics.Win.UltraWinGrid.UltraGrid();
  136. this.ultraExpandableGroupBox1 = new Infragistics.Win.Misc.UltraExpandableGroupBox();
  137. this.ultraExpandableGroupBoxPanel1 = new Infragistics.Win.Misc.UltraExpandableGroupBoxPanel();
  138. this.panel3 = new System.Windows.Forms.Panel();
  139. this.ultraTextEditor4 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
  140. this.ultraLabel4 = new Infragistics.Win.Misc.UltraLabel();
  141. this.ultraComboEditor4 = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
  142. this.ultraLabel8 = new Infragistics.Win.Misc.UltraLabel();
  143. this.ultraTextEditor2 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
  144. this.ultraLabel2 = new Infragistics.Win.Misc.UltraLabel();
  145. this.ultraTextEditor1 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
  146. this.ultraLabel1 = new Infragistics.Win.Misc.UltraLabel();
  147. this.ultraLabel3 = new Infragistics.Win.Misc.UltraLabel();
  148. this.ultraComboEditor1 = new Infragistics.Win.UltraWinEditors.UltraComboEditor();
  149. this.panel2 = new System.Windows.Forms.Panel();
  150. this.ultraTextEditor3 = new Infragistics.Win.UltraWinEditors.UltraTextEditor();
  151. this.ultraCheckEditor1 = new Infragistics.Win.UltraWinEditors.UltraCheckEditor();
  152. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).BeginInit();
  153. this.panel1.SuspendLayout();
  154. this.FrmRole_Fill_Panel.SuspendLayout();
  155. ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).BeginInit();
  156. ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).BeginInit();
  157. this.ultraExpandableGroupBox1.SuspendLayout();
  158. this.ultraExpandableGroupBoxPanel1.SuspendLayout();
  159. this.panel3.SuspendLayout();
  160. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor4)).BeginInit();
  161. ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor4)).BeginInit();
  162. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor2)).BeginInit();
  163. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor1)).BeginInit();
  164. ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor1)).BeginInit();
  165. this.panel2.SuspendLayout();
  166. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor3)).BeginInit();
  167. this.SuspendLayout();
  168. //
  169. // ultraToolbarsManager1
  170. //
  171. this.ultraToolbarsManager1.DesignerFlags = 1;
  172. this.ultraToolbarsManager1.DockWithinContainer = this.panel1;
  173. this.ultraToolbarsManager1.ShowFullMenusDelay = 500;
  174. this.ultraToolbarsManager1.ShowQuickCustomizeButton = false;
  175. this.ultraToolbarsManager1.Style = Infragistics.Win.UltraWinToolbars.ToolbarStyle.VisualStudio2005;
  176. ultraToolbar1.DockedColumn = 0;
  177. ultraToolbar1.DockedRow = 0;
  178. ultraToolbar1.Text = "Toolbar1";
  179. buttonTool1.InstanceProps.IsFirstInGroup = true;
  180. buttonTool2.InstanceProps.IsFirstInGroup = true;
  181. buttonTool3.InstanceProps.IsFirstInGroup = true;
  182. buttonTool4.InstanceProps.IsFirstInGroup = true;
  183. buttonTool5.InstanceProps.IsFirstInGroup = true;
  184. buttonTool6.InstanceProps.IsFirstInGroup = true;
  185. ultraToolbar1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
  186. buttonTool1,
  187. buttonTool2,
  188. buttonTool3,
  189. buttonTool4,
  190. buttonTool5,
  191. buttonTool6});
  192. this.ultraToolbarsManager1.Toolbars.AddRange(new Infragistics.Win.UltraWinToolbars.UltraToolbar[] {
  193. ultraToolbar1});
  194. buttonTool7.SharedProps.Caption = "新增(&A)";
  195. buttonTool7.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  196. buttonTool8.SharedProps.Caption = "修改(&U)";
  197. buttonTool8.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  198. buttonTool8.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlU;
  199. buttonTool9.SharedProps.Caption = "删除(&D)";
  200. buttonTool9.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  201. buttonTool10.SharedProps.Caption = "查询(&Q)";
  202. buttonTool10.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  203. buttonTool11.SharedProps.Caption = "关闭(&E)";
  204. buttonTool11.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  205. buttonTool11.SharedProps.Shortcut = System.Windows.Forms.Shortcut.CtrlE;
  206. buttonTool12.SharedProps.Caption = "权限设置(&P)";
  207. buttonTool12.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  208. buttonTool13.SharedProps.Caption = "返回(&B)";
  209. buttonTool13.SharedProps.DisplayStyle = Infragistics.Win.UltraWinToolbars.ToolDisplayStyle.ImageAndText;
  210. buttonTool13.SharedProps.Visible = false;
  211. this.ultraToolbarsManager1.Tools.AddRange(new Infragistics.Win.UltraWinToolbars.ToolBase[] {
  212. buttonTool7,
  213. buttonTool8,
  214. buttonTool9,
  215. buttonTool10,
  216. buttonTool11,
  217. buttonTool12,
  218. buttonTool13});
  219. this.ultraToolbarsManager1.ToolClick += new Infragistics.Win.UltraWinToolbars.ToolClickEventHandler(this.ultraToolbarsManager1_ToolClick);
  220. //
  221. // panel1
  222. //
  223. this.panel1.BackColor = System.Drawing.Color.Gainsboro;
  224. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Left);
  225. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Right);
  226. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Top);
  227. this.panel1.Controls.Add(this._panel1_Toolbars_Dock_Area_Bottom);
  228. this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
  229. this.panel1.Location = new System.Drawing.Point(0, 0);
  230. this.panel1.Name = "panel1";
  231. this.panel1.Size = new System.Drawing.Size(656, 32);
  232. this.panel1.TabIndex = 1;
  233. //
  234. // _panel1_Toolbars_Dock_Area_Left
  235. //
  236. this._panel1_Toolbars_Dock_Area_Left.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  237. this._panel1_Toolbars_Dock_Area_Left.BackColor = System.Drawing.SystemColors.Control;
  238. this._panel1_Toolbars_Dock_Area_Left.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Left;
  239. this._panel1_Toolbars_Dock_Area_Left.ForeColor = System.Drawing.SystemColors.ControlText;
  240. this._panel1_Toolbars_Dock_Area_Left.Location = new System.Drawing.Point(0, 27);
  241. this._panel1_Toolbars_Dock_Area_Left.Name = "_panel1_Toolbars_Dock_Area_Left";
  242. this._panel1_Toolbars_Dock_Area_Left.Size = new System.Drawing.Size(0, 5);
  243. this._panel1_Toolbars_Dock_Area_Left.ToolbarsManager = this.ultraToolbarsManager1;
  244. //
  245. // _panel1_Toolbars_Dock_Area_Right
  246. //
  247. this._panel1_Toolbars_Dock_Area_Right.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  248. this._panel1_Toolbars_Dock_Area_Right.BackColor = System.Drawing.SystemColors.Control;
  249. this._panel1_Toolbars_Dock_Area_Right.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Right;
  250. this._panel1_Toolbars_Dock_Area_Right.ForeColor = System.Drawing.SystemColors.ControlText;
  251. this._panel1_Toolbars_Dock_Area_Right.Location = new System.Drawing.Point(656, 27);
  252. this._panel1_Toolbars_Dock_Area_Right.Name = "_panel1_Toolbars_Dock_Area_Right";
  253. this._panel1_Toolbars_Dock_Area_Right.Size = new System.Drawing.Size(0, 5);
  254. this._panel1_Toolbars_Dock_Area_Right.ToolbarsManager = this.ultraToolbarsManager1;
  255. //
  256. // _panel1_Toolbars_Dock_Area_Top
  257. //
  258. this._panel1_Toolbars_Dock_Area_Top.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  259. this._panel1_Toolbars_Dock_Area_Top.BackColor = System.Drawing.SystemColors.Control;
  260. this._panel1_Toolbars_Dock_Area_Top.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Top;
  261. this._panel1_Toolbars_Dock_Area_Top.ForeColor = System.Drawing.SystemColors.ControlText;
  262. this._panel1_Toolbars_Dock_Area_Top.Location = new System.Drawing.Point(0, 0);
  263. this._panel1_Toolbars_Dock_Area_Top.Name = "_panel1_Toolbars_Dock_Area_Top";
  264. this._panel1_Toolbars_Dock_Area_Top.Size = new System.Drawing.Size(656, 27);
  265. this._panel1_Toolbars_Dock_Area_Top.ToolbarsManager = this.ultraToolbarsManager1;
  266. //
  267. // _panel1_Toolbars_Dock_Area_Bottom
  268. //
  269. this._panel1_Toolbars_Dock_Area_Bottom.AccessibleRole = System.Windows.Forms.AccessibleRole.Grouping;
  270. this._panel1_Toolbars_Dock_Area_Bottom.BackColor = System.Drawing.SystemColors.Control;
  271. this._panel1_Toolbars_Dock_Area_Bottom.DockedPosition = Infragistics.Win.UltraWinToolbars.DockedPosition.Bottom;
  272. this._panel1_Toolbars_Dock_Area_Bottom.ForeColor = System.Drawing.SystemColors.ControlText;
  273. this._panel1_Toolbars_Dock_Area_Bottom.Location = new System.Drawing.Point(0, 32);
  274. this._panel1_Toolbars_Dock_Area_Bottom.Name = "_panel1_Toolbars_Dock_Area_Bottom";
  275. this._panel1_Toolbars_Dock_Area_Bottom.Size = new System.Drawing.Size(656, 0);
  276. this._panel1_Toolbars_Dock_Area_Bottom.ToolbarsManager = this.ultraToolbarsManager1;
  277. //
  278. // FrmRole_Fill_Panel
  279. //
  280. this.FrmRole_Fill_Panel.Controls.Add(this.ultraGrid1);
  281. this.FrmRole_Fill_Panel.Controls.Add(this.ultraExpandableGroupBox1);
  282. this.FrmRole_Fill_Panel.Controls.Add(this.panel2);
  283. this.FrmRole_Fill_Panel.Controls.Add(this.panel1);
  284. this.FrmRole_Fill_Panel.Cursor = System.Windows.Forms.Cursors.Default;
  285. this.FrmRole_Fill_Panel.Dock = System.Windows.Forms.DockStyle.Fill;
  286. this.FrmRole_Fill_Panel.Location = new System.Drawing.Point(0, 0);
  287. this.FrmRole_Fill_Panel.Name = "FrmRole_Fill_Panel";
  288. this.FrmRole_Fill_Panel.Size = new System.Drawing.Size(656, 470);
  289. this.FrmRole_Fill_Panel.TabIndex = 0;
  290. //
  291. // ultraGrid1
  292. //
  293. appearance1.BackColor = System.Drawing.SystemColors.Window;
  294. appearance1.BorderColor = System.Drawing.SystemColors.InactiveCaption;
  295. this.ultraGrid1.DisplayLayout.Appearance = appearance1;
  296. appearance2.BackColor = System.Drawing.Color.LightGoldenrodYellow;
  297. ultraGridColumn1.CellAppearance = appearance2;
  298. appearance3.BackColor = System.Drawing.Color.LightSteelBlue;
  299. ultraGridColumn1.Header.Appearance = appearance3;
  300. ultraGridColumn1.Header.VisiblePosition = 0;
  301. ultraGridColumn2.Header.VisiblePosition = 1;
  302. appearance4.BackColor = System.Drawing.Color.LightGoldenrodYellow;
  303. ultraGridColumn3.CellAppearance = appearance4;
  304. appearance5.BackColor = System.Drawing.Color.LightSteelBlue;
  305. ultraGridColumn3.Header.Appearance = appearance5;
  306. ultraGridColumn3.Header.VisiblePosition = 2;
  307. ultraGridBand1.Columns.AddRange(new object[] {
  308. ultraGridColumn1,
  309. ultraGridColumn2,
  310. ultraGridColumn3});
  311. this.ultraGrid1.DisplayLayout.BandsSerializer.Add(ultraGridBand1);
  312. this.ultraGrid1.DisplayLayout.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  313. this.ultraGrid1.DisplayLayout.CaptionVisible = Infragistics.Win.DefaultableBoolean.False;
  314. appearance6.BackColor = System.Drawing.SystemColors.ActiveBorder;
  315. appearance6.BackColor2 = System.Drawing.SystemColors.ControlDark;
  316. appearance6.BackGradientStyle = Infragistics.Win.GradientStyle.Vertical;
  317. appearance6.BorderColor = System.Drawing.SystemColors.Window;
  318. this.ultraGrid1.DisplayLayout.GroupByBox.Appearance = appearance6;
  319. appearance7.ForeColor = System.Drawing.SystemColors.GrayText;
  320. this.ultraGrid1.DisplayLayout.GroupByBox.BandLabelAppearance = appearance7;
  321. this.ultraGrid1.DisplayLayout.GroupByBox.BorderStyle = Infragistics.Win.UIElementBorderStyle.Solid;
  322. this.ultraGrid1.DisplayLayout.GroupByBox.Hidden = true;
  323. appearance8.BackColor = System.Drawing.SystemColors.ControlLightLight;
  324. appearance8.BackColor2 = System.Drawing.SystemColors.Control;
  325. appearance8.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
  326. appearance8.ForeColor = System.Drawing.SystemColors.GrayText;
  327. this.ultraGrid1.DisplayLayout.GroupByBox.PromptAppearance = appearance8;
  328. this.ultraGrid1.DisplayLayout.MaxColScrollRegions = 1;
  329. this.ultraGrid1.DisplayLayout.MaxRowScrollRegions = 1;
  330. appearance9.BackColor = System.Drawing.SystemColors.Window;
  331. appearance9.ForeColor = System.Drawing.SystemColors.ControlText;
  332. this.ultraGrid1.DisplayLayout.Override.ActiveCellAppearance = appearance9;
  333. appearance10.BackColor = System.Drawing.SystemColors.Highlight;
  334. appearance10.ForeColor = System.Drawing.SystemColors.HighlightText;
  335. this.ultraGrid1.DisplayLayout.Override.ActiveRowAppearance = appearance10;
  336. this.ultraGrid1.DisplayLayout.Override.BorderStyleCell = Infragistics.Win.UIElementBorderStyle.RaisedSoft;
  337. this.ultraGrid1.DisplayLayout.Override.BorderStyleRow = Infragistics.Win.UIElementBorderStyle.Dotted;
  338. appearance11.BackColor = System.Drawing.SystemColors.Window;
  339. this.ultraGrid1.DisplayLayout.Override.CardAreaAppearance = appearance11;
  340. appearance12.BorderColor = System.Drawing.Color.Silver;
  341. appearance12.TextTrimming = Infragistics.Win.TextTrimming.EllipsisCharacter;
  342. this.ultraGrid1.DisplayLayout.Override.CellAppearance = appearance12;
  343. this.ultraGrid1.DisplayLayout.Override.CellClickAction = Infragistics.Win.UltraWinGrid.CellClickAction.EditAndSelectText;
  344. this.ultraGrid1.DisplayLayout.Override.CellPadding = 0;
  345. appearance13.BackColor = System.Drawing.SystemColors.Control;
  346. appearance13.BackColor2 = System.Drawing.SystemColors.ControlDark;
  347. appearance13.BackGradientAlignment = Infragistics.Win.GradientAlignment.Element;
  348. appearance13.BackGradientStyle = Infragistics.Win.GradientStyle.Horizontal;
  349. appearance13.BorderColor = System.Drawing.SystemColors.Window;
  350. this.ultraGrid1.DisplayLayout.Override.GroupByRowAppearance = appearance13;
  351. appearance14.BackColor = System.Drawing.Color.LightSteelBlue;
  352. appearance14.ImageHAlign = Infragistics.Win.HAlign.Center;
  353. appearance14.TextHAlign = Infragistics.Win.HAlign.Center;
  354. this.ultraGrid1.DisplayLayout.Override.HeaderAppearance = appearance14;
  355. this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.SortMulti;
  356. this.ultraGrid1.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.Standard;
  357. this.ultraGrid1.DisplayLayout.Override.MinRowHeight = 21;
  358. appearance15.BackColor = System.Drawing.SystemColors.Window;
  359. appearance15.BorderColor = System.Drawing.Color.Silver;
  360. this.ultraGrid1.DisplayLayout.Override.RowAppearance = appearance15;
  361. appearance16.BackColor = System.Drawing.Color.LightSteelBlue;
  362. this.ultraGrid1.DisplayLayout.Override.RowSelectorAppearance = appearance16;
  363. this.ultraGrid1.DisplayLayout.Override.RowSelectorHeaderStyle = Infragistics.Win.UltraWinGrid.RowSelectorHeaderStyle.SeparateElement;
  364. this.ultraGrid1.DisplayLayout.Override.RowSelectorNumberStyle = Infragistics.Win.UltraWinGrid.RowSelectorNumberStyle.RowIndex;
  365. this.ultraGrid1.DisplayLayout.Override.RowSelectors = Infragistics.Win.DefaultableBoolean.True;
  366. appearance17.BackColor = System.Drawing.SystemColors.ControlLight;
  367. this.ultraGrid1.DisplayLayout.Override.TemplateAddRowAppearance = appearance17;
  368. this.ultraGrid1.DisplayLayout.ScrollBounds = Infragistics.Win.UltraWinGrid.ScrollBounds.ScrollToFill;
  369. this.ultraGrid1.DisplayLayout.ScrollStyle = Infragistics.Win.UltraWinGrid.ScrollStyle.Immediate;
  370. this.ultraGrid1.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy;
  371. this.ultraGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
  372. this.ultraGrid1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
  373. this.ultraGrid1.Location = new System.Drawing.Point(0, 80);
  374. this.ultraGrid1.Name = "ultraGrid1";
  375. this.ultraGrid1.Size = new System.Drawing.Size(656, 278);
  376. this.ultraGrid1.TabIndex = 4;
  377. this.ultraGrid1.Text = "ultraGrid1";
  378. this.ultraGrid1.AfterRowActivate += new System.EventHandler(this.ultraGrid1_AfterRowActivate);
  379. //
  380. // ultraExpandableGroupBox1
  381. //
  382. this.ultraExpandableGroupBox1.Controls.Add(this.ultraExpandableGroupBoxPanel1);
  383. this.ultraExpandableGroupBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
  384. this.ultraExpandableGroupBox1.ExpandedSize = new System.Drawing.Size(648, 80);
  385. this.ultraExpandableGroupBox1.Location = new System.Drawing.Point(0, 358);
  386. this.ultraExpandableGroupBox1.Name = "ultraExpandableGroupBox1";
  387. this.ultraExpandableGroupBox1.Size = new System.Drawing.Size(656, 112);
  388. this.ultraExpandableGroupBox1.SupportThemes = false;
  389. this.ultraExpandableGroupBox1.TabIndex = 2;
  390. this.ultraExpandableGroupBox1.Text = " 编辑区域";
  391. this.ultraExpandableGroupBox1.ViewStyle = Infragistics.Win.Misc.GroupBoxViewStyle.Office2003;
  392. //
  393. // ultraExpandableGroupBoxPanel1
  394. //
  395. this.ultraExpandableGroupBoxPanel1.Controls.Add(this.panel3);
  396. this.ultraExpandableGroupBoxPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
  397. this.ultraExpandableGroupBoxPanel1.Location = new System.Drawing.Point(2, 22);
  398. this.ultraExpandableGroupBoxPanel1.Name = "ultraExpandableGroupBoxPanel1";
  399. this.ultraExpandableGroupBoxPanel1.Size = new System.Drawing.Size(652, 88);
  400. this.ultraExpandableGroupBoxPanel1.TabIndex = 0;
  401. //
  402. // panel3
  403. //
  404. this.panel3.BackColor = System.Drawing.Color.Gainsboro;
  405. this.panel3.Controls.Add(this.ultraTextEditor4);
  406. this.panel3.Controls.Add(this.ultraLabel4);
  407. this.panel3.Controls.Add(this.ultraComboEditor4);
  408. this.panel3.Controls.Add(this.ultraLabel8);
  409. this.panel3.Controls.Add(this.ultraTextEditor2);
  410. this.panel3.Controls.Add(this.ultraLabel2);
  411. this.panel3.Controls.Add(this.ultraTextEditor1);
  412. this.panel3.Controls.Add(this.ultraLabel1);
  413. this.panel3.Controls.Add(this.ultraLabel3);
  414. this.panel3.Controls.Add(this.ultraComboEditor1);
  415. this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
  416. this.panel3.Location = new System.Drawing.Point(0, 0);
  417. this.panel3.Name = "panel3";
  418. this.panel3.Size = new System.Drawing.Size(652, 88);
  419. this.panel3.TabIndex = 6;
  420. //
  421. // ultraTextEditor4
  422. //
  423. appearance18.BackColor = System.Drawing.Color.LightCyan;
  424. this.ultraTextEditor4.Appearance = appearance18;
  425. this.ultraTextEditor4.AutoSize = true;
  426. this.ultraTextEditor4.BackColor = System.Drawing.Color.LightCyan;
  427. this.ultraTextEditor4.Location = new System.Drawing.Point(73, 56);
  428. this.ultraTextEditor4.Name = "ultraTextEditor4";
  429. this.ultraTextEditor4.Size = new System.Drawing.Size(569, 21);
  430. this.ultraTextEditor4.TabIndex = 25;
  431. //
  432. // ultraLabel4
  433. //
  434. this.ultraLabel4.Location = new System.Drawing.Point(16, 59);
  435. this.ultraLabel4.Name = "ultraLabel4";
  436. this.ultraLabel4.Size = new System.Drawing.Size(54, 16);
  437. this.ultraLabel4.TabIndex = 24;
  438. this.ultraLabel4.Text = "角色描述";
  439. //
  440. // ultraComboEditor4
  441. //
  442. appearance19.BackColor = System.Drawing.Color.LightCyan;
  443. this.ultraComboEditor4.Appearance = appearance19;
  444. this.ultraComboEditor4.AutoSize = true;
  445. this.ultraComboEditor4.ButtonsRight.Add(editorButton1);
  446. this.ultraComboEditor4.DropDownButtonDisplayStyle = Infragistics.Win.ButtonDisplayStyle.Never;
  447. this.ultraComboEditor4.DropDownStyle = Infragistics.Win.DropDownStyle.DropDownList;
  448. this.ultraComboEditor4.Location = new System.Drawing.Point(482, 16);
  449. this.ultraComboEditor4.Name = "ultraComboEditor4";
  450. this.ultraComboEditor4.Size = new System.Drawing.Size(160, 21);
  451. this.ultraComboEditor4.TabIndex = 23;
  452. this.ultraComboEditor4.SelectionChanged += new System.EventHandler(this.ultraComboEditor4_SelectionChanged);
  453. this.ultraComboEditor4.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.ultraComboEditor4_EditorButtonClick);
  454. //
  455. // ultraLabel8
  456. //
  457. this.ultraLabel8.Location = new System.Drawing.Point(450, 16);
  458. this.ultraLabel8.Name = "ultraLabel8";
  459. this.ultraLabel8.Size = new System.Drawing.Size(29, 16);
  460. this.ultraLabel8.TabIndex = 22;
  461. this.ultraLabel8.Text = "部门";
  462. //
  463. // ultraTextEditor2
  464. //
  465. appearance20.BackColor = System.Drawing.Color.LightCyan;
  466. this.ultraTextEditor2.Appearance = appearance20;
  467. this.ultraTextEditor2.AutoSize = true;
  468. this.ultraTextEditor2.BackColor = System.Drawing.Color.LightCyan;
  469. this.ultraTextEditor2.Location = new System.Drawing.Point(259, 16);
  470. this.ultraTextEditor2.Name = "ultraTextEditor2";
  471. this.ultraTextEditor2.Size = new System.Drawing.Size(160, 21);
  472. this.ultraTextEditor2.TabIndex = 4;
  473. //
  474. // ultraLabel2
  475. //
  476. this.ultraLabel2.Location = new System.Drawing.Point(202, 16);
  477. this.ultraLabel2.Name = "ultraLabel2";
  478. this.ultraLabel2.Size = new System.Drawing.Size(54, 16);
  479. this.ultraLabel2.TabIndex = 1;
  480. this.ultraLabel2.Text = "角色名称";
  481. //
  482. // ultraTextEditor1
  483. //
  484. appearance21.BackColor = System.Drawing.Color.LightCyan;
  485. this.ultraTextEditor1.Appearance = appearance21;
  486. this.ultraTextEditor1.AutoSize = true;
  487. this.ultraTextEditor1.BackColor = System.Drawing.Color.LightCyan;
  488. this.ultraTextEditor1.Location = new System.Drawing.Point(73, 16);
  489. this.ultraTextEditor1.Name = "ultraTextEditor1";
  490. this.ultraTextEditor1.Size = new System.Drawing.Size(92, 21);
  491. this.ultraTextEditor1.TabIndex = 3;
  492. //
  493. // ultraLabel1
  494. //
  495. this.ultraLabel1.Location = new System.Drawing.Point(16, 16);
  496. this.ultraLabel1.Name = "ultraLabel1";
  497. this.ultraLabel1.Size = new System.Drawing.Size(54, 16);
  498. this.ultraLabel1.TabIndex = 0;
  499. this.ultraLabel1.Text = "角色编码";
  500. //
  501. // ultraLabel3
  502. //
  503. this.ultraLabel3.Location = new System.Drawing.Point(16, 41);
  504. this.ultraLabel3.Name = "ultraLabel3";
  505. this.ultraLabel3.Size = new System.Drawing.Size(54, 16);
  506. this.ultraLabel3.TabIndex = 2;
  507. this.ultraLabel3.Text = "权限文件";
  508. this.ultraLabel3.Visible = false;
  509. //
  510. // ultraComboEditor1
  511. //
  512. appearance22.BackColor = System.Drawing.Color.LightCyan;
  513. this.ultraComboEditor1.Appearance = appearance22;
  514. this.ultraComboEditor1.AutoSize = true;
  515. this.ultraComboEditor1.Location = new System.Drawing.Point(73, 41);
  516. this.ultraComboEditor1.Name = "ultraComboEditor1";
  517. this.ultraComboEditor1.Size = new System.Drawing.Size(109, 21);
  518. this.ultraComboEditor1.TabIndex = 5;
  519. this.ultraComboEditor1.Visible = false;
  520. //
  521. // panel2
  522. //
  523. this.panel2.Controls.Add(this.ultraTextEditor3);
  524. this.panel2.Controls.Add(this.ultraCheckEditor1);
  525. this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
  526. this.panel2.Location = new System.Drawing.Point(0, 32);
  527. this.panel2.Name = "panel2";
  528. this.panel2.Size = new System.Drawing.Size(656, 48);
  529. this.panel2.TabIndex = 3;
  530. //
  531. // ultraTextEditor3
  532. //
  533. appearance23.BackColor = System.Drawing.Color.LightCyan;
  534. this.ultraTextEditor3.Appearance = appearance23;
  535. this.ultraTextEditor3.AutoSize = true;
  536. this.ultraTextEditor3.BackColor = System.Drawing.Color.LightCyan;
  537. editorButton2.Key = "part";
  538. editorButton2.Text = "...";
  539. this.ultraTextEditor3.ButtonsRight.Add(editorButton2);
  540. this.ultraTextEditor3.Enabled = false;
  541. this.ultraTextEditor3.Location = new System.Drawing.Point(88, 8);
  542. this.ultraTextEditor3.Name = "ultraTextEditor3";
  543. this.ultraTextEditor3.ReadOnly = true;
  544. this.ultraTextEditor3.Size = new System.Drawing.Size(168, 21);
  545. this.ultraTextEditor3.TabIndex = 5;
  546. this.ultraTextEditor3.EditorButtonClick += new Infragistics.Win.UltraWinEditors.EditorButtonEventHandler(this.ultraTextEditor3_EditorButtonClick);
  547. //
  548. // ultraCheckEditor1
  549. //
  550. this.ultraCheckEditor1.Location = new System.Drawing.Point(40, 8);
  551. this.ultraCheckEditor1.Name = "ultraCheckEditor1";
  552. this.ultraCheckEditor1.Size = new System.Drawing.Size(48, 20);
  553. this.ultraCheckEditor1.TabIndex = 4;
  554. this.ultraCheckEditor1.Text = "部门";
  555. this.ultraCheckEditor1.CheckedChanged += new System.EventHandler(this.ultraCheckEditor1_CheckedChanged);
  556. //
  557. // FrmRole
  558. //
  559. this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
  560. this.ClientSize = new System.Drawing.Size(656, 470);
  561. this.Controls.Add(this.FrmRole_Fill_Panel);
  562. this.Name = "FrmRole";
  563. this.ShowInTaskbar = false;
  564. this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
  565. this.Text = "角色管理";
  566. this.WindowState = System.Windows.Forms.FormWindowState.Normal;
  567. this.Load += new System.EventHandler(this.FrmRole_Load);
  568. ((System.ComponentModel.ISupportInitialize)(this.ultraToolbarsManager1)).EndInit();
  569. this.panel1.ResumeLayout(false);
  570. this.FrmRole_Fill_Panel.ResumeLayout(false);
  571. ((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).EndInit();
  572. ((System.ComponentModel.ISupportInitialize)(this.ultraExpandableGroupBox1)).EndInit();
  573. this.ultraExpandableGroupBox1.ResumeLayout(false);
  574. this.ultraExpandableGroupBoxPanel1.ResumeLayout(false);
  575. this.panel3.ResumeLayout(false);
  576. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor4)).EndInit();
  577. ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor4)).EndInit();
  578. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor2)).EndInit();
  579. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor1)).EndInit();
  580. ((System.ComponentModel.ISupportInitialize)(this.ultraComboEditor1)).EndInit();
  581. this.panel2.ResumeLayout(false);
  582. ((System.ComponentModel.ISupportInitialize)(this.ultraTextEditor3)).EndInit();
  583. this.ResumeLayout(false);
  584. }
  585. #endregion
  586. #region "显示窗体"
  587. private void GetChildDept()
  588. {
  589. try
  590. {
  591. string strOut = "";
  592. DataSet ds = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("PurviewManager", "Core.Mes.PurviewManager.UAM_USER", "SelectChildDept", new object[] { operDepart }, out strOut) as DataSet;
  593. if (ds.Tables[0].Rows[0][0].ToString() != "")
  594. {
  595. allDept = "'" + ds.Tables[0].Rows[0][0].ToString() + "'" + operDepart + "'";
  596. }
  597. else
  598. allDept = "'" + operDepart + "'";
  599. }
  600. catch(System.Exception ex)
  601. {
  602. System.Diagnostics.Debug.WriteLine(ex.ToString());
  603. }
  604. }
  605. private void FrmRole_Load(object sender, System.EventArgs e)
  606. {
  607. try
  608. {
  609. operDepart = ClientCommon._UserInfo.UserDepID;
  610. GetChildDept();
  611. ultraCheckEditor1.Checked = true;
  612. ultraTextEditor3.Text = ClientCommon._UserInfo.UserDepName;
  613. ultraTextEditor3.Tag = allDept;
  614. if (!IsAdminFlag)
  615. this.ultraToolbarsManager1.Tools["purset"].SharedProps.Visible = false;
  616. GetDepartmentData();
  617. Getroledata("");
  618. Query();
  619. GetFileNames();
  620. InitGrid();
  621. InitCombo();
  622. }
  623. catch //(Exception ex)
  624. {
  625. // Core.Mes.ServerFrameWork.CoreMesLogger.log(this.GetType()).Error(ex.Message);
  626. }
  627. }
  628. private void InitCombo()
  629. {
  630. // if (_roleData != null && _roleData.Tables.Count >0)
  631. // {
  632. // foreach(DataRow arow in (_roleData).Tables[0].Rows)
  633. // this.ultraComboEditor3.Items.Add(arow[1]);
  634. // if(!this.ultraComboEditor3.Items.Contains(System.DBNull.Value)) this.ultraComboEditor3.Items.Add(System.DBNull.Value);
  635. // }
  636. if (_departmentData != null && _departmentData.Tables.Count > 0)
  637. {
  638. DataTable dt = this._departmentData.Tables[0].Copy();
  639. this.ultraComboEditor4.Items.Clear();
  640. foreach (DataRow dr in dt.Rows)
  641. {
  642. if (dr["DEPARTMENTID"].ToString() == "ROOT" && operDepart != "ROOT") continue;
  643. try
  644. {
  645. this.ultraComboEditor4.Items.Add(dr["DEPARTMENTID"], dr["DEPARTMENTNAME"].ToString());
  646. }
  647. catch
  648. { }
  649. }
  650. }
  651. }
  652. private void InitGrid()
  653. {
  654. //SetFileValueList();
  655. GetPartData();
  656. //this.ultraGrid1.DataSource = _roleData.Tables[0];
  657. this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Header.Caption = "角色编码";
  658. this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Width = 100;
  659. this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Activation.NoEdit;
  660. this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = Color.LightGoldenrodYellow;
  661. this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Header.Caption = "角色名称";
  662. this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Width = 200;
  663. this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Activation.NoEdit;
  664. this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Header.Caption = "角色描述";
  665. this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Width = 300;
  666. this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Activation.NoEdit;
  667. //this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].ValueList = ultraGrid1.DisplayLayout.ValueLists["file"];
  668. this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellAppearance.BackColor = Color.LightGoldenrodYellow;
  669. this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Header.Caption = "部门";
  670. this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Width = 200;
  671. this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Activation.NoEdit;
  672. this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].ValueList = ultraGrid1.DisplayLayout.ValueLists["part"];
  673. }
  674. private void Getroledata(string str)
  675. {
  676. try
  677. {
  678. CallingMessage par = new CallingMessage();
  679. par.ServerName = "PurviewManager";
  680. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  681. par.MethodName = "SelectUAM_ROLE";
  682. par.args = new object[] { str };
  683. string strOut = "";
  684. _roleData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  685. }
  686. catch (Exception ex)
  687. {
  688. Console.WriteLine(ex.Message);
  689. }
  690. }
  691. private void SetFileValueList()
  692. {
  693. if (ultraGrid1.DisplayLayout.ValueLists.Exists("file"))
  694. ultraGrid1.DisplayLayout.ValueLists["file"].ValueListItems.Clear();
  695. else
  696. ultraGrid1.DisplayLayout.ValueLists.Add("file");
  697. //try
  698. //{
  699. // ultraGrid1.DisplayLayout.ValueLists["file"].ValueListItems.Clear();
  700. //}
  701. //catch
  702. //{
  703. // ultraGrid1.DisplayLayout.ValueLists.Add("file");
  704. //}
  705. foreach (string str in this._fileNames)
  706. {
  707. Infragistics.Win.ValueListItem vli = new Infragistics.Win.ValueListItem();
  708. vli.DisplayText = str.Split((char)92)[1];
  709. vli.DataValue = str.Split((char)92)[1];
  710. ultraGrid1.DisplayLayout.ValueLists["file"].ValueListItems.Add(vli);
  711. this.ultraComboEditor1.Items.Add(vli.DataValue, vli.DisplayText);
  712. // this.ultraComboEditor2.Items.Add(vli);
  713. }
  714. }
  715. private void GetFileNames()
  716. {
  717. try
  718. {
  719. CallingMessage par = new CallingMessage();
  720. par.ServerName = "PurviewManager";
  721. //par.AssemblyName = "Core.Mes.PurviewManager";
  722. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  723. par.MethodName = "GetFiles";
  724. par.args = null;
  725. par.ServerType = MesServerType.MesSystemBaseServer;
  726. string strOut = "";
  727. _fileNames = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as string[];
  728. }
  729. catch //(Exception ex)
  730. {
  731. // CoreMesLogger.log(this.GetType()).Error(ex.Message);
  732. }
  733. }
  734. private void GetPartData()
  735. {
  736. if (ultraGrid1.DisplayLayout.ValueLists.Exists("part"))
  737. ultraGrid1.DisplayLayout.ValueLists["part"].ValueListItems.Clear();
  738. else
  739. ultraGrid1.DisplayLayout.ValueLists.Add("part");
  740. //try
  741. //{
  742. // ultraGrid1.DisplayLayout.ValueLists["part"].ValueListItems.Clear();
  743. //}
  744. //catch
  745. //{
  746. // ultraGrid1.DisplayLayout.ValueLists.Add("part");
  747. //}
  748. DataTable dt = this._departmentData.Tables[0].Copy();
  749. foreach (DataRow dr in dt.Rows)
  750. {
  751. Infragistics.Win.ValueListItem vli = new Infragistics.Win.ValueListItem();
  752. vli.DisplayText = dr["DEPARTMENTNAME"].ToString();
  753. vli.DataValue = dr["DEPARTMENTID"];
  754. ultraGrid1.DisplayLayout.ValueLists["part"].ValueListItems.Add(vli);
  755. }
  756. }
  757. #endregion
  758. private void ultraToolbarsManager1_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs e)
  759. {
  760. switch (e.Tool.Key)
  761. {
  762. case "purset":
  763. FrmFunction frmFunc = new FrmFunction();
  764. frmFunc.ShowDialog();
  765. break;
  766. case "add":
  767. Add();
  768. break;
  769. case "edit":
  770. Edit();
  771. break;
  772. case "del":
  773. Del();
  774. break;
  775. case "query":
  776. Query();
  777. break;
  778. case "close":
  779. this.Close();
  780. break;
  781. case "back":
  782. this.ultraToolbarsManager1.Toolbars[0].Tools["back"].SharedProps.Visible = false;
  783. ultraCheckEditor1.Checked = true;
  784. ultraTextEditor3.Text = ClientCommon._UserInfo.UserDepName;
  785. ultraTextEditor3.Tag = allDept;
  786. Query();
  787. this.ultraGrid1.DataSource = _roleData.Tables[0];
  788. break;
  789. }
  790. }
  791. private void Add()
  792. {
  793. if (this.ultraTextEditor1.Text.Trim() == "")
  794. {
  795. MessageBox.Show("请录入角色编码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  796. return;
  797. }
  798. if (this.ultraTextEditor2.Text.Trim() == "")
  799. {
  800. MessageBox.Show("请录入角色姓名!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  801. return;
  802. }
  803. //if (this.ultraComboEditor1.Value == null)
  804. //{
  805. // MessageBox.Show("请选择权限文件!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  806. // return;
  807. //}
  808. if (this.ultraComboEditor4.Value == null)
  809. {
  810. MessageBox.Show("请选择角色所属的部门!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  811. return;
  812. }
  813. if (this.ultraComboEditor4.Value.ToString() == "ROOT")
  814. {
  815. this.ultraComboEditor4.Value = null;
  816. MessageBox.Show("必须选择下属部门!");
  817. return;
  818. }
  819. if (allDept.IndexOf("'" + ultraComboEditor4.Value.ToString() + "'") < 0 && operDepart != "ROOT")
  820. {
  821. this.ultraComboEditor4.Value = null;
  822. MessageBox.Show("你没有配置这一部门角色的权限,请重新选择部门!");
  823. return;
  824. }
  825. ArrayList al = new ArrayList();
  826. al.Add(this.ultraTextEditor1.Text.Trim());
  827. al.Add(this.ultraTextEditor2.Text.Trim());
  828. al.Add(ultraTextEditor4.Text.Trim());
  829. al.Add(this.ultraComboEditor4.Value);
  830. try
  831. {
  832. CallingMessage par = new CallingMessage();
  833. par.ServerName = "PurviewManager";
  834. //par.AssemblyName = "Core.Mes.PurviewManager";
  835. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  836. par.MethodName = "InsertUAM_ROLE";
  837. par.args = new object[] { al };
  838. par.ServerType = MesServerType.MesSystemBaseServer;
  839. string strOut = "";
  840. object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
  841. if (strOut != "")
  842. {
  843. MessageBox.Show("新增失败! \n" + strOut);
  844. return;
  845. }
  846. else
  847. {
  848. if ((int)obj != 1)
  849. {
  850. MessageBox.Show("新增失败!");
  851. return;
  852. }
  853. }
  854. }
  855. catch //(Exception ex)
  856. {
  857. // CoreMesLogger.log(this.GetType()).Error(ex.Message);
  858. return;
  859. }
  860. UltraGridRow ugr = this.ultraGrid1.DisplayLayout.Bands[0].AddNew();
  861. ugr.Cells[0].Value = al[0];
  862. ugr.Cells[1].Value = al[1];
  863. ugr.Cells[2].Value = al[2];
  864. this.ultraGrid1.UpdateData();
  865. Query();
  866. }
  867. private void Del()
  868. {
  869. int i = 0;
  870. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  871. if (ugr == null)
  872. {
  873. MessageBox.Show("请选择要删除的角色!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  874. return;
  875. }
  876. if (MessageBox.Show("是否确认删除选中的角色?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
  877. {
  878. return;
  879. }
  880. try
  881. {
  882. i = ugr.Index;
  883. CallingMessage par = new CallingMessage();
  884. par.ServerName = "PurviewManager";
  885. //par.AssemblyName = "Core.Mes.PurviewManager";
  886. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  887. par.MethodName = "DeleteUAM_ROLE";
  888. par.args = new object[] { ugr.Cells[0].Value.ToString() };
  889. par.ServerType = MesServerType.MesSystemBaseServer;
  890. string strOut = "";
  891. object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
  892. if (strOut != "")
  893. {
  894. MessageBox.Show("删除失败! \n" + strOut);
  895. return;
  896. }
  897. else
  898. {
  899. if ((int)obj != 1)
  900. {
  901. MessageBox.Show("删除失败!");
  902. return;
  903. }
  904. }
  905. }
  906. catch //(Exception ex)
  907. {
  908. // CoreMesLogger.log(this.GetType()).Error(ex.Message);
  909. return;
  910. }
  911. ultraGrid1.ActiveRow.Delete(false);
  912. ultraGrid1.UpdateData();
  913. try
  914. {
  915. ultraGrid1.Rows[i].Activate();
  916. }
  917. catch
  918. {
  919. int count = ultraGrid1.Rows.Count;
  920. if (count > 0)
  921. ultraGrid1.Rows[count - 1].Activate();
  922. }
  923. }
  924. private void Edit()
  925. {
  926. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  927. if (ugr == null)
  928. {
  929. MessageBox.Show("请选择要修改的角色!");
  930. return;
  931. }
  932. if (ultraTextEditor1.Text.Trim() != ugr.Cells["ROLEID"].Text.Trim())
  933. {
  934. MessageBox.Show("不能修改角色编码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  935. return;
  936. }
  937. //if (this.ultraComboEditor1.Value == null)
  938. //{
  939. // MessageBox.Show("请选择要修改的权限!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  940. // return;
  941. //}
  942. if (this.ultraTextEditor2.Text.Trim() == "")
  943. {
  944. MessageBox.Show("请选择要修改的角色名称!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  945. return;
  946. }
  947. if (this.ultraComboEditor4.Value == null)
  948. {
  949. MessageBox.Show("请选择修改的角色所属部门!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  950. return;
  951. }
  952. if (this.ultraComboEditor4.Value.ToString() == "ROOT")
  953. {
  954. this.ultraComboEditor4.Value = null;
  955. MessageBox.Show("必须选择下属部门!");
  956. return;
  957. }
  958. if (allDept.IndexOf("'" + ultraComboEditor4.Value.ToString() + "'") < 0 && operDepart != "ROOT")
  959. {
  960. this.ultraComboEditor4.Value = null;
  961. MessageBox.Show("你没有配置这一部门角色的权限,请重新选择部门!");
  962. return;
  963. }
  964. ArrayList al = new ArrayList();
  965. al.Add(this.ultraTextEditor1.Text.Trim());
  966. al.Add(this.ultraTextEditor2.Text.Trim());
  967. al.Add(ultraTextEditor4.Text.Trim());
  968. al.Add(this.ultraComboEditor4.Value);
  969. try
  970. {
  971. CallingMessage par = new CallingMessage();
  972. par.ServerName = "PurviewManager";
  973. //par.AssemblyName = "Core.Mes.PurviewManager";
  974. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  975. par.MethodName = "UpdateUAM_ROLE";
  976. par.args = new object[] { al };
  977. par.ServerType = MesServerType.MesSystemBaseServer;
  978. string strOut = "";
  979. object obj = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut);
  980. if (strOut != "")
  981. {
  982. MessageBox.Show("修改失败 \n" + strOut);
  983. return;
  984. }
  985. else
  986. {
  987. int i = (int)obj;
  988. if (i != 1)
  989. {
  990. MessageBox.Show("修改失败");
  991. return;
  992. }
  993. }
  994. }
  995. catch //(Exception ex)
  996. {
  997. // CoreMesLogger.log(this.GetType()).Error(ex.Message);
  998. return;
  999. }
  1000. ugr.Cells[0].Value = al[0];
  1001. ugr.Cells[1].Value = al[1];
  1002. ugr.Cells[2].Value = al[2];
  1003. ultraGrid1.UpdateData();
  1004. Query();
  1005. }
  1006. private void Query()
  1007. {
  1008. if (this.ultraTextEditor3.Text == null || !this.ultraCheckEditor1.Checked)
  1009. {
  1010. MessageBox.Show("请选择要查询的部门!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
  1011. return;
  1012. }
  1013. GetSelDept();
  1014. if (this.ultraCheckEditor1.Checked && this.ultraTextEditor3.Text != "")
  1015. {
  1016. if (operDepart != "ROOT" && allDept.IndexOf("'" + selDept + "'") < 0)
  1017. {
  1018. MessageBox.Show("你没有查看这一部门的权限,请重新选择!");
  1019. return;
  1020. }
  1021. }
  1022. Getroledata("");
  1023. string sqlExt = " where 1=1 ";
  1024. sqlExt += GetRefreshWhere() + "order by ROLEID";
  1025. try
  1026. {
  1027. CallingMessage par = new CallingMessage();
  1028. par.ServerName = "PurviewManager";
  1029. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  1030. par.MethodName = "SelectUAM_ROLE";
  1031. par.args = new object[] { sqlExt };
  1032. string strOut = "";
  1033. DataSet dset = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  1034. this.ultraGrid1.DataSource = dset.Tables[0];
  1035. ultraGrid1.UpdateData();
  1036. this.ultraToolbarsManager1.Toolbars[0].Tools["back"].SharedProps.Visible = true;
  1037. }
  1038. catch (Exception ex)
  1039. {
  1040. Console.WriteLine(ex.Message);
  1041. }
  1042. }
  1043. private string GetRefreshWhere()
  1044. {
  1045. string sqlstr = "";
  1046. if (this.ultraTextEditor3.Enabled && this.ultraCheckEditor1.Checked && this.ultraTextEditor3.Text != "")
  1047. {
  1048. ArrayList al = this.GetRoleID();
  1049. if (al == null || al.Count == 0)
  1050. {
  1051. sqlstr = "1=2";
  1052. }
  1053. else
  1054. {
  1055. sqlstr += "and ROLEID in ('" + al[0].ToString() + "'";
  1056. for (int i = 1; i < al.Count; i++)
  1057. {
  1058. sqlstr += ", '" + al[i].ToString() + "' ";
  1059. }
  1060. sqlstr += ")";
  1061. }
  1062. }
  1063. return sqlstr;
  1064. }
  1065. private ArrayList GetRoleID()
  1066. {
  1067. ArrayList al = new ArrayList();
  1068. DataTable dt = null;
  1069. if (this._roleData == null)
  1070. dt = null;
  1071. else
  1072. dt = this._roleData.Tables[0];
  1073. if (dt != null)
  1074. {
  1075. if (this.ultraTextEditor3.Enabled && this.ultraTextEditor3.Tag != null)
  1076. {
  1077. string partid = this.ultraTextEditor3.Tag.ToString();
  1078. string strFilter = "DEPARTMENTID in (" + partid + ")";
  1079. dt.DefaultView.RowFilter = strFilter;
  1080. }
  1081. for (int i = 0; i < dt.DefaultView.Count; i++)
  1082. {
  1083. al.Add(dt.DefaultView[i]["ROLEID"].ToString());
  1084. }
  1085. return al;
  1086. }
  1087. else
  1088. return null;
  1089. }
  1090. private void ultraGrid1_AfterRowActivate(object sender, System.EventArgs e)
  1091. {
  1092. try
  1093. {
  1094. if (this.ultraGrid1.ActiveRow == null) return;
  1095. UltraGridRow ugr = this.ultraGrid1.ActiveRow;
  1096. this.ultraTextEditor1.Text = ugr.Cells[0].Value.ToString();
  1097. this.ultraTextEditor2.Text = ugr.Cells[1].Value.ToString();
  1098. //this.ultraComboEditor1.Value=ugr.Cells[2].Value;
  1099. ultraTextEditor4.Text = ugr.Cells[2].Value.ToString();
  1100. this.ultraComboEditor4.Value = ugr.Cells[3].Value;
  1101. }
  1102. catch (Exception ex)
  1103. {
  1104. Console.WriteLine(ex.Message);
  1105. }
  1106. }
  1107. private void ultraCheckEditor1_CheckedChanged(object sender, System.EventArgs e)
  1108. {
  1109. this.ultraTextEditor3.Enabled = this.ultraCheckEditor1.Checked;
  1110. }
  1111. /* private void ultraComboEditor2_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  1112. {
  1113. GetFileNames();
  1114. if (_fileNames != null)
  1115. {
  1116. foreach(string fileNames in _fileNames)
  1117. this.ultraComboEditor2 .Items .Add (fileNames);
  1118. if(!this.ultraComboEditor2.Items.Contains(System.DBNull.Value)) this.ultraComboEditor2.Items.Add(System.DBNull.Value);
  1119. }
  1120. }
  1121. */
  1122. private void ultraComboEditor4_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  1123. {
  1124. try
  1125. {
  1126. FrmSetDepart frm = new FrmSetDepart();
  1127. frm.GetChildIDFlag = false;
  1128. frm.Location = GetChildWindowLocation(frm.Size);
  1129. frm.ShowDialog();
  1130. InitCombo();
  1131. if (frm.SelectedID != "" && frm.SelectedName != "")
  1132. {
  1133. this.ultraComboEditor4.Value = frm.SelectedID;
  1134. if (operDepart != "ROOT" && this.ultraComboEditor4.Value.ToString() == "ROOT")
  1135. {
  1136. this.ultraComboEditor4.Value = null;
  1137. MessageBox.Show("所属权限不允许选择选择整个公司!");
  1138. return;
  1139. }
  1140. if (allDept.IndexOf("'" + ultraComboEditor4.Value.ToString() + "'") < 0 && operDepart != "ROOT")
  1141. {
  1142. this.ultraComboEditor4.Value = null;
  1143. MessageBox.Show("你没有配置这一部门用户的权限,请重新选择部门!");
  1144. return;
  1145. }
  1146. }
  1147. }
  1148. catch
  1149. { }
  1150. }
  1151. private Point GetChildWindowLocation(Size ChildWindowSize)
  1152. {
  1153. int width = Cursor.Position.X + ChildWindowSize.Width - Screen.PrimaryScreen.Bounds.Width;
  1154. int height = Cursor.Position.Y + ChildWindowSize.Height - Screen.PrimaryScreen.Bounds.Height + 30;
  1155. if (width > 0)
  1156. width = Cursor.Position.X - width;
  1157. else
  1158. width = Cursor.Position.X;
  1159. if (height > 0)
  1160. height = Cursor.Position.Y - height + 10;
  1161. else
  1162. height = Cursor.Position.Y + 10;
  1163. return new Point(width, height);
  1164. }
  1165. private void GetDepartmentData()
  1166. {
  1167. try
  1168. {
  1169. CallingMessage par = new CallingMessage();
  1170. par.ServerName = "PurviewManager";
  1171. par.ClassName = "Core.Mes.PurviewManager.PurviewManager";
  1172. par.MethodName = "SelectUAM_DEPARTMENT";
  1173. par.args = new object[] { " order by DEPARTMENTID " };
  1174. string strOut = "";
  1175. _departmentData = Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod(par, out strOut) as DataSet;
  1176. }
  1177. catch
  1178. { }
  1179. }
  1180. private void ultraTextEditor3_EditorButtonClick(object sender, Infragistics.Win.UltraWinEditors.EditorButtonEventArgs e)
  1181. {
  1182. try
  1183. {
  1184. FrmSetDepart frm = new FrmSetDepart();
  1185. frm.Location = GetChildWindowLocation(frm.Size);
  1186. frm.ShowDialog();
  1187. if (frm.SelectedID != "" && frm.SelectedName != "")
  1188. {
  1189. this.ultraTextEditor3.Text = frm.SelectedName;
  1190. this.ultraTextEditor3.Tag = frm.SelectedID;
  1191. GetSelDept();
  1192. if (this.ultraTextEditor3.Text != "" && this.ultraCheckEditor1.Checked)
  1193. {
  1194. if (operDepart != "ROOT" && allDept.IndexOf("'" + selDept + "'") < 0)
  1195. {
  1196. MessageBox.Show("你没有查看这一部门的权限,请重新选择!");
  1197. }
  1198. }
  1199. }
  1200. }
  1201. catch
  1202. { }
  1203. }
  1204. private void ultraComboEditor4_SelectionChanged(object sender, EventArgs e)
  1205. {
  1206. try
  1207. {
  1208. if (operDepart != "ROOT" && ultraComboEditor4.Value.ToString() == "ROOT")
  1209. {
  1210. this.ultraComboEditor4.Value = null;
  1211. MessageBox.Show("所属权限不允许选择选择整个公司!");
  1212. return;
  1213. }
  1214. if (ultraComboEditor4.Value != null && allDept.IndexOf("'" + ultraComboEditor4.Value.ToString() + "'") < 0 && operDepart != "ROOT")
  1215. {
  1216. this.ultraComboEditor4.Value = null;
  1217. MessageBox.Show("你没有配置这一部门用户的权限,请重新选择部门!");
  1218. return;
  1219. }
  1220. }
  1221. catch
  1222. { }
  1223. }
  1224. private void GetSelDept()
  1225. {
  1226. try
  1227. {
  1228. if (this.ultraTextEditor3.Text != "" && this.ultraCheckEditor1.Checked)
  1229. {
  1230. DataTable dt = this._departmentData.Tables[0].Copy();
  1231. foreach (DataRow dr in dt.Rows)
  1232. {
  1233. if (dr["DEPARTMENTNAME"].ToString() == this.ultraTextEditor3.Text)
  1234. {
  1235. selDept = dr["DEPARTMENTID"].ToString();
  1236. return;
  1237. }
  1238. }
  1239. }
  1240. }
  1241. catch
  1242. { }
  1243. }
  1244. }
  1245. }