Browse Source

修改权限关联的导航列表

章政 8 years ago
parent
commit
c13c881c26

+ 12 - 2
UAS-MES/CustomControl/AccordionMenu/AccordionMenu.cs

@@ -100,8 +100,10 @@ namespace UAS_MES.CustomControl.AccordionMenu
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 //在这个Caller范围内的是用户可见的导航
-           
+                if (dt.Rows[i]["UGP_IFDELETE"].ToString() == "1" || dt.Rows[i]["UGP_IFALL"].ToString() == "1")
+                {
                     Callers += "'" + dt.Rows[i]["ugp_caller"].ToString() + "',";
+                }
                 //用一个数组记录所有的模块
                 Module[i] = dt.Rows[i]["sn_module"].ToString();
                 if (!Modules.Contains(dt.Rows[i]["sn_module"].ToString()))
@@ -129,9 +131,17 @@ namespace UAS_MES.CustomControl.AccordionMenu
                     ArrFunListView.Add(this.Controls[dt.Rows[i]["sn_module"].ToString() + "_lsv"]);
                 }
             }
+            if (Callers != "")
+            {
+                Callers = Callers.Substring(0, Callers.Length - 1);
+            }
+            else
+            {
+                Callers = "''";
+            }
             //根据模块的名称查询出所有的子模块
             sql.Clear();
-            sql.Append("select sn_id,sn_displayname,sn_classname,sn_module,sn_modulecode,sn_using,sn_caller,sn_detno from CS$SYSNAVATION where sn_using=1 and sn_caller in(" + Callers.Substring(0, Callers.Length - 1) + ") order by sn_modulecode,sn_detno");
+            sql.Append("select sn_id,sn_displayname,sn_classname,sn_module,sn_modulecode,sn_using,sn_caller,sn_detno from CS$SYSNAVATION where sn_using=1 and sn_caller in(" + Callers + ") order by sn_modulecode,sn_detno");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
             sql.Clear();
             //模块的数量,需要单独控制这个变量的增加

+ 7 - 7
UAS-MES/FunctionCode/Employee/Employee_ChooseUserToGroup.Designer.cs

@@ -180,12 +180,12 @@
             this.em_code2.DBTitle = null;
             this.em_code2.FormName = null;
             this.em_code2.Location = new System.Drawing.Point(772, 90);
-            this.em_code2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.em_code2.Margin = new System.Windows.Forms.Padding(4);
             this.em_code2.Name = "em_code2";
             this.em_code2.Power = null;
             this.em_code2.SelectField = null;
             this.em_code2.SetValueField = null;
-            this.em_code2.Size = new System.Drawing.Size(226, 25);
+            this.em_code2.Size = new System.Drawing.Size(220, 25);
             this.em_code2.TabIndex = 259;
             this.em_code2.TableName = null;
             this.em_code2.Tag = "em_code";
@@ -199,12 +199,12 @@
             this.em_code3.DBTitle = null;
             this.em_code3.FormName = null;
             this.em_code3.Location = new System.Drawing.Point(153, 90);
-            this.em_code3.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.em_code3.Margin = new System.Windows.Forms.Padding(4);
             this.em_code3.Name = "em_code3";
             this.em_code3.Power = null;
             this.em_code3.SelectField = null;
             this.em_code3.SetValueField = null;
-            this.em_code3.Size = new System.Drawing.Size(231, 26);
+            this.em_code3.Size = new System.Drawing.Size(225, 26);
             this.em_code3.TabIndex = 258;
             this.em_code3.TableName = null;
             this.em_code3.Tag = "em_code";
@@ -331,7 +331,7 @@
             // UserOut
             // 
             this.UserOut.Image = ((System.Drawing.Image)(resources.GetObject("UserOut.Image")));
-            this.UserOut.Location = new System.Drawing.Point(544, 521);
+            this.UserOut.Location = new System.Drawing.Point(544, 427);
             this.UserOut.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.UserOut.Name = "UserOut";
             this.UserOut.Size = new System.Drawing.Size(75, 30);
@@ -342,7 +342,7 @@
             // UserIn
             // 
             this.UserIn.Image = ((System.Drawing.Image)(resources.GetObject("UserIn.Image")));
-            this.UserIn.Location = new System.Drawing.Point(544, 445);
+            this.UserIn.Location = new System.Drawing.Point(544, 512);
             this.UserIn.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.UserIn.Name = "UserIn";
             this.UserIn.Size = new System.Drawing.Size(75, 30);
@@ -432,7 +432,7 @@
             this.Controls.Add(this.ug_code_title_label);
             this.Controls.Add(this.ug_code_title);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "Employee_ChooseUserToGroup";
             this.Tag = "ShowDialogWindow";
             this.Text = "人员选择";