Эх сурвалжийг харах

修改权限界面,添加ID关联,测试采集优先显示维护数据

章政 8 жил өмнө
parent
commit
6bcac99902

+ 48 - 38
UAS-MES/FunctionCode/Employee/Employee_ChooseUserToGroup.Designer.cs

@@ -46,10 +46,6 @@
             this.ScreenOutGroup = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.ScreenInGroup = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.OutGroupUser = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
-            this.em_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.em_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.em_depart = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.em_position = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.UserOut = new UAS_MES.CustomControl.ButtonUtil.ArrowRightButton();
             this.UserIn = new UAS_MES.CustomControl.ButtonUtil.ArrowLeftButton();
             this.InGroupUser = new UAS_MES.CustomControl.DataGrid_View.DataGridViewWithSerialNum();
@@ -58,6 +54,11 @@
             this.em_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.em_indate = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.em_recorder = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.em_code1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.em_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.em_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.em_depart = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.em_position = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.OutGroupUser)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.InGroupUser)).BeginInit();
             this.SuspendLayout();
@@ -288,6 +289,7 @@
             this.OutGroupUser.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.OutGroupUser.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
             this.em_code1,
+            this.em_id,
             this.em_name1,
             this.em_depart,
             this.em_position});
@@ -298,36 +300,6 @@
             this.OutGroupUser.Size = new System.Drawing.Size(500, 555);
             this.OutGroupUser.TabIndex = 243;
             // 
-            // em_code1
-            // 
-            this.em_code1.DataPropertyName = "em_code";
-            this.em_code1.HeaderText = "用户编号";
-            this.em_code1.Name = "em_code1";
-            this.em_code1.ReadOnly = true;
-            this.em_code1.Width = 96;
-            // 
-            // em_name1
-            // 
-            this.em_name1.DataPropertyName = "em_name";
-            this.em_name1.HeaderText = "用户名称";
-            this.em_name1.Name = "em_name1";
-            this.em_name1.ReadOnly = true;
-            // 
-            // em_depart
-            // 
-            this.em_depart.DataPropertyName = "em_depart";
-            this.em_depart.HeaderText = "部门";
-            this.em_depart.Name = "em_depart";
-            this.em_depart.ReadOnly = true;
-            this.em_depart.Width = 66;
-            // 
-            // em_position
-            // 
-            this.em_position.DataPropertyName = "em_position";
-            this.em_position.HeaderText = "岗位";
-            this.em_position.Name = "em_position";
-            this.em_position.ReadOnly = true;
-            // 
             // UserOut
             // 
             this.UserOut.Image = ((System.Drawing.Image)(resources.GetObject("UserOut.Image")));
@@ -406,6 +378,43 @@
             this.em_recorder.ReadOnly = true;
             this.em_recorder.Width = 81;
             // 
+            // em_code1
+            // 
+            this.em_code1.DataPropertyName = "em_code";
+            this.em_code1.HeaderText = "用户编号";
+            this.em_code1.Name = "em_code1";
+            this.em_code1.ReadOnly = true;
+            this.em_code1.Width = 96;
+            // 
+            // em_id
+            // 
+            this.em_id.DataPropertyName = "em_id";
+            this.em_id.HeaderText = "em_id";
+            this.em_id.Name = "em_id";
+            this.em_id.Visible = false;
+            // 
+            // em_name1
+            // 
+            this.em_name1.DataPropertyName = "em_name";
+            this.em_name1.HeaderText = "用户名称";
+            this.em_name1.Name = "em_name1";
+            this.em_name1.ReadOnly = true;
+            // 
+            // em_depart
+            // 
+            this.em_depart.DataPropertyName = "em_depart";
+            this.em_depart.HeaderText = "部门";
+            this.em_depart.Name = "em_depart";
+            this.em_depart.ReadOnly = true;
+            this.em_depart.Width = 66;
+            // 
+            // em_position
+            // 
+            this.em_position.DataPropertyName = "em_position";
+            this.em_position.HeaderText = "岗位";
+            this.em_position.Name = "em_position";
+            this.em_position.ReadOnly = true;
+            // 
             // Employee_ChooseUserToGroup
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -465,10 +474,6 @@
         private CustomControl.TextBoxWithIcon.EnterTextBox em_name2;
         private CustomControl.TextBoxWithIcon.EnterTextBox em_name3;
         private System.Windows.Forms.Label ug_name_title_label;
-        private System.Windows.Forms.DataGridViewTextBoxColumn em_code1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn em_name1;
-        private System.Windows.Forms.DataGridViewTextBoxColumn em_depart;
-        private System.Windows.Forms.DataGridViewTextBoxColumn em_position;
         private System.Windows.Forms.DataGridViewTextBoxColumn em_code;
         private System.Windows.Forms.DataGridViewTextBoxColumn eg_id;
         private System.Windows.Forms.DataGridViewTextBoxColumn em_name;
@@ -476,5 +481,10 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn em_recorder;
         private CustomControl.TextBoxWithIcon.SearchTextBox em_code3;
         private CustomControl.TextBoxWithIcon.SearchTextBox em_code2;
+        private System.Windows.Forms.DataGridViewTextBoxColumn em_code1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn em_id;
+        private System.Windows.Forms.DataGridViewTextBoxColumn em_name1;
+        private System.Windows.Forms.DataGridViewTextBoxColumn em_depart;
+        private System.Windows.Forms.DataGridViewTextBoxColumn em_position;
     }
 }

+ 4 - 3
UAS-MES/FunctionCode/Employee/Employee_ChooseUserToGroup.cs

@@ -96,9 +96,10 @@ namespace UAS_MES.Employee
                 string ConfirmAdd = MessageBox.Show(this.ParentForm, "确认添加所选人员到分组?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
                 if (ConfirmAdd == "Yes")
                 {
+                    string ug_id = dh.getFieldDataByCondition("CS$USERGROUP", "ug_id", "ug_code='"+ ug_code_title.Text + "'").ToString();
                     sql.Clear();
-                    sql.Append("insert into cs$empgroup (eg_id,eg_emcode,eg_groupcode,eg_name)");
-                    sql.Append("values (cs$empgroup_seq.nextval,:em_code,'" + ug_code_title.Text + "','" + em_name3.Text + "')");
+                    sql.Append("insert into cs$empgroup (eg_id,eg_emcode,eg_groupcode,eg_name,eg_groupid)");
+                    sql.Append("values (cs$empgroup_seq.nextval,:em_code,'" + ug_code_title.Text + "','" + em_name3.Text + "','"+ ug_id + "')");
                     dh.BatchInsert(sql.GetString(), new string[] { "em_code", }, MoveInUserCode.ToArray());
                     ScreenInGroup.PerformClick();
                     ScreenOutGroup.PerformClick();
@@ -154,7 +155,7 @@ namespace UAS_MES.Employee
         private void ScreenOutGroup_Click(object sender, EventArgs e)
         {
             sql.Clear();
-            sql.Append("select distinct em_code,em_name,em_position,em_depart from employee left join ");
+            sql.Append("select distinct em_code,em_name,em_position,em_depart,em_id from employee left join ");
             sql.Append("cs$empgroup on eg_emcode=em_code and eg_groupcode='" + ug_code_title.Text + "'");
             if (ug_code_title.Text != "" || ug_name_title.Text != "")
             {

+ 3 - 0
UAS-MES/FunctionCode/Employee/Employee_ChooseUserToGroup.resx

@@ -197,6 +197,9 @@
   <metadata name="em_code1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="em_id.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="em_name1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

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

@@ -25,6 +25,7 @@ namespace UAS_MES.Employee
 
         private void 人员分组_Load(object sender, EventArgs e)
         {
+            asc.controllInitializeSize(this);
             dh = new DataHelper();
             //手动加入第一列全选列
             DataGridViewCheckBoxColumn dgvc = new DataGridViewCheckBoxColumn();
@@ -47,7 +48,6 @@ namespace UAS_MES.Employee
 
             ug_code1.KeyDown += KeyDownEvent;
             ug_name1.KeyDown += KeyDownEvent;
-            asc.controllInitializeSize(this);
         }
 
         private void 人员分组_SizeChanged(object sender, EventArgs e)

+ 2 - 1
UAS-MES/FunctionCode/Employee/Employee_Power.cs

@@ -46,6 +46,7 @@ namespace UAS_MES.Employee
         private void 权限控制_Load(object sender, EventArgs e)
         {
             //不检测进程
+            asc.controllInitializeSize(this);
             CheckForIllegalCrossThreadCalls = false;
             //界面加载时设置保存按钮不可见
             if (ug_code.Text == "")
@@ -81,7 +82,7 @@ namespace UAS_MES.Employee
             //如果页面加载的时候通过传参的构造函数
             if (ug_code.Text != "")
                 Screen.PerformClick();
-            asc.controllInitializeSize(this);
+          
         }
 
         private void Screen_Click(object sender, EventArgs e)

+ 1 - 1
UAS-MES/FunctionCode/Make/Make_TestCollection.cs

@@ -220,7 +220,7 @@ namespace UAS_MES.Make
             sql.Append("select bg_code||':'||bg_name bg_name,bg_code from badgroup left join (select pb_badgroup,pr_kind ");
             sql.Append("from product left join productkind on pk_name=pr_kind ");
             sql.Append("left join productbadgroup on pk_code=PB_KINDCODE where pr_code='" + ma_prodcode.Text + "')");
-            sql.Append("on pb_badgroup=bg_code order by pr_kind desc");
+            sql.Append("on pb_badgroup=bg_code order by pr_kind ");
             DataTable dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
             bc_groupcode.DisplayMember = "bg_name";
             bc_groupcode.ValueMember = "bg_code";