章政 8 vuotta sitten
vanhempi
commit
81faee76dd

+ 1 - 0
.gitignore

@@ -211,3 +211,4 @@ GeneratedArtifacts/
 _Pvt_Extensions/
 ModelManifest.xml
 *.rar
+/MES接口/MES接口.csproj

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

@@ -145,6 +145,7 @@ namespace UAS_MES.CustomControl.AccordionMenu
                     lsvi.Tag = dt.Rows[i]["sn_classname"].ToString();
                     lsvi.Text = dt.Rows[i]["sn_displayname"].ToString();
                     lsvi.ToolTipText = dt.Rows[i]["sn_caller"].ToString();
+                    lsvi.Name = dt.Rows[i]["sn_id"].ToString();
                     lsv.Items.Add(lsvi);
                 }
                 else
@@ -286,7 +287,7 @@ namespace UAS_MES.CustomControl.AccordionMenu
             //如果窗体不存在进行打开,item.ToolTip是Caller
             if (!OpenedFormName.ContainsKey(item.ToolTipText))
             {
-                TabPage tb = new TabPage { Name = "UAS_MES." + item.Tag, Tag= item.ToolTipText, Text = OpenForm.Text };
+                TabPage tb = new TabPage { Name = item.Name, Tag = item.ToolTipText, Text = OpenForm.Text };
                 OpenForm.TopLevel = false;
                 tc.TabPages.Add(tb);
                 //直接选中新打开的界面
@@ -300,7 +301,7 @@ namespace UAS_MES.CustomControl.AccordionMenu
             }
             //如果窗体已存在展示该窗体
             else
-                tc.SelectedTab = (TabPage)this.Parent.Parent.Controls["MainTabControl"].Controls["UAS_MES." + item.Tag];
+                 tc.SelectTab(item.Name);
         }
     }
 }

+ 4 - 4
UAS-MES/FunctionCode/Employee/Employee_Group.cs

@@ -98,13 +98,13 @@ namespace UAS_MES.Employee
         {
             if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
             {
-                string CallerUser = "Employee!LookData";
-                string CallerPower = "Employee!PowerSetting";
+                string CallerUser = "Employee!DataGroup";
+                string CallerPower = "Employee!PowerGroup";
                 if (UserGroupDGV.Columns[e.ColumnIndex].Name == "UserSetting" && !AccordionMenu.OpenedFormName.ContainsKey(CallerUser))
                 {
                     AccordionMenu.OpenedFormName.Add(CallerUser, 101);
                     TabControl tc = (TabControl)this.Parent.Parent;
-                    TabPage tb = new TabPage { Name = CallerUser,Tag= CallerUser, Text = "人员查看" };
+                    TabPage tb = new TabPage { Name = CallerUser, Tag = CallerUser, Text = "人员查看" };
                     tc.TabPages.Add(tb);
                     string ug_code = UserGroupDGV.Rows[e.RowIndex].Cells["ug_code"].Value.ToString();
                     string ug_name = UserGroupDGV.Rows[e.RowIndex].Cells["ug_name"].Value.ToString();
@@ -120,7 +120,7 @@ namespace UAS_MES.Employee
                     AccordionMenu.OpenedFormName.Add(CallerPower, 101);
                     TabControl tc = (TabControl)this.Parent.Parent;
                     //如果窗体不存在进行打开
-                    TabPage tb = new TabPage { Name = CallerPower,Tag= CallerPower, Text = "权限控制" };
+                    TabPage tb = new TabPage { Tag = CallerPower, Name = CallerPower, Text = "权限控制" };
                     tc.TabPages.Add(tb);
                     string ug_code = UserGroupDGV.Rows[e.RowIndex].Cells["ug_code"].Value.ToString();
                     string ug_name = UserGroupDGV.Rows[e.RowIndex].Cells["ug_name"].Value.ToString();