Browse Source

Merge branch 'master' of ssh://10.10.101.21/source/mes-client

Hcsy 8 years ago
parent
commit
69606bd100

+ 1 - 1
UAS-MES/CustomControl/CustomCheckBox/LockCheckBox.Designer.cs

@@ -33,7 +33,7 @@
             // LockCheckBox
             // 
             this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CheckedChanged += new System.EventHandler(this.LockCheckBox_CheckedChanged);
+            this.CheckStateChanged += new System.EventHandler(this.LockCheckBox_CheckStateChanged);
             this.ResumeLayout(false);
 
         }

+ 21 - 5
UAS-MES/CustomControl/CustomCheckBox/LockCheckBox.cs

@@ -7,6 +7,7 @@ using System.Linq;
 using System.Text;
 using System.Windows.Forms;
 using UAS_MES.PublicMethod;
+using UAS_MES.CustomControl.TextBoxWithIcon;
 
 namespace UAS_MES.CustomControl.CustomCheckBox
 {
@@ -15,21 +16,35 @@ namespace UAS_MES.CustomControl.CustomCheckBox
         /// <summary>
         /// 存放工单的控件
         /// </summary>
-        Control MaCtl;
+        MaCodeSearchTextBox MaCtl;
+
+        bool LeaveEvent1;
+
+        public bool LeaveEvent
+        {
+            get
+            {
+                return LeaveEvent1;
+            }
+
+            set
+            {
+                LeaveEvent1 = value;
+            }
+        }
 
         public LockCheckBox()
         {
             InitializeComponent();
         }
 
-        public void GetMakeCodeCtl(Control ctl)
+        public void GetMakeCodeCtl(MaCodeSearchTextBox ctl)
         {
             MaCtl = ctl;
         }
 
-        public void LockCheckBox_CheckedChanged(object sender, EventArgs e)
+        private void LockCheckBox_CheckStateChanged(object sender, EventArgs e)
         {
-            Console.WriteLine(Checked);
             if (Checked)
             {
                 if (MaCtl.Text != "")
@@ -49,7 +64,8 @@ namespace UAS_MES.CustomControl.CustomCheckBox
                     BaseUtil.ShowError("工单号不能为空");
                 }
             }
-            else {
+            else
+            {
                 MaCtl.Enabled = true;
                 MaCtl.Focus();
             }

+ 1 - 2
UAS-MES/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.Designer.cs

@@ -63,7 +63,6 @@
             this.TextBox.Str2 = null;
             this.TextBox.TabIndex = 0;
             this.TextBox.TextChanged += new System.EventHandler(this.TextBox_TextChanged);
-            this.TextBox.Enter += new System.EventHandler(this.TextBox_Enter);
             this.TextBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TextBox_KeyDown);
             this.TextBox.Leave += new System.EventHandler(this.TextBox_Leave);
             // 
@@ -84,6 +83,6 @@
         #endregion
 
         private ClickPicBox.ClickPicBox Search_Icon;
-        private MaCodeTextBox TextBox;
+        public MaCodeTextBox TextBox;
     }
 }

+ 3 - 22
UAS-MES/CustomControl/TextBoxWithIcon/MaCodeSearchTextBox.cs

@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Data;
 using System.Windows.Forms;
+using UAS_MES.CustomControl.CustomCheckBox;
 using UAS_MES.DataOperate;
 using UAS_MES.PublicMethod;
 
@@ -60,7 +61,7 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
         /// <summary>
         /// 设置绑定的CheckBox
         /// </summary>
-        CheckBox LockCheckBox;
+        LockCheckBox LockCheckBox;
 
         DbFind db;
 
@@ -91,7 +92,6 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
             }
         }
 
-
         public string Caller
         {
             get
@@ -220,7 +220,6 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
         /// 图标点击事件
         /// </summary>
         public event Icon_Click SearchIconClick;
-
         #endregion
         //定义委托
 
@@ -239,12 +238,10 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
         private void TextBox_KeyDown(object sender, KeyEventArgs e)
         {
             if (e.KeyCode == Keys.Enter)
-            {
                 GetData();
-            }
         }
 
-        public void SetLockCheckBox(CheckBox ctl)
+        public void SetLockCheckBox(LockCheckBox ctl)
         {
             LockCheckBox = ctl;
         }
@@ -309,24 +306,8 @@ namespace UAS_MES.CustomControl.TextBoxWithIcon
             }
         }
 
-        private void TextBox_Enter(object sender, EventArgs e)
-        {
-            TextBox.BackColor = System.Drawing.Color.GreenYellow;
-        }
-
-        /// <summary>
-        /// 重新刷新数据
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        public void RefreshDB(object sender, EventArgs e)
-        {
-            TextBox_Leave(sender, e);
-        }
-
         public void TextBox_Leave(object sender, EventArgs e)
         {
-            TextBox.BackColor = System.Drawing.Color.White;
             GetData();
         }
 

+ 11 - 1
UAS-MES/DataOperate/DataHelper.cs

@@ -121,6 +121,7 @@ namespace UAS_MES.DataOperate
             string sql = "select count(1) from " + TableName + " where " + Condition;
             Console.WriteLine(sql);
             command = new OracleCommand(sql, connection);
+            Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
             ad.Fill(dt);
             ad.Dispose();
@@ -138,6 +139,7 @@ namespace UAS_MES.DataOperate
             DataTable dt = new DataTable();
             string sql = "select count(1) from " + TableName;
             command = new OracleCommand(sql, connection);
+            Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
             Console.WriteLine(sql);
             ad.Fill(dt);
@@ -211,6 +213,7 @@ namespace UAS_MES.DataOperate
             }
             Console.WriteLine(sql.ToString());
             command = new OracleCommand(sql.ToString(), connection);
+            Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
             ad.Fill(dt);
             ad.Dispose();
@@ -662,6 +665,7 @@ namespace UAS_MES.DataOperate
             string sql = "select distinct count('" + Field + "') from " + TableName;
             Console.WriteLine(sql);
             command = new OracleCommand(sql, connection);
+            Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
             ad.Fill(dt);
             ad.Dispose();
@@ -692,6 +696,7 @@ namespace UAS_MES.DataOperate
             string sql = "delete from " + TableName + " where " + ID + " =:DeleteID";
             Console.WriteLine(sql);
             command = new OracleCommand(sql, connection);
+            Reconnect(command);
             command.ArrayBindCount = DeleteID.Length;
             command.Parameters.Add(new OracleParameter("DeleteID", OracleDbType.Long, DeleteID, ParameterDirection.Input));
             command.ExecuteNonQuery();
@@ -817,6 +822,7 @@ namespace UAS_MES.DataOperate
         public void BatchInsert(string sql, params object[][] names)
         {
             command = new OracleCommand(sql, connection);
+            Reconnect(command);
             command.ArrayBindCount = names[1].Length;
             Console.WriteLine(sql);
             //因为第一个数组保存的是参数的名称,所以循环从1而不是0开始
@@ -832,6 +838,7 @@ namespace UAS_MES.DataOperate
         public void BatchInsertDataTable(string sql, string[] param, params object[][] param1)
         {
             command = new OracleCommand(sql, connection);
+            Reconnect(command);
             command.ArrayBindCount = param1[0].Length;
             //因为第一个数组保存的是参数的名称,所以循环从1而不是0开始
             //将第一个数组的下标固定为0作为循环添加的参数的名称
@@ -855,6 +862,7 @@ namespace UAS_MES.DataOperate
             DataTable dt = new DataTable();
             string SQL = " select listagg(dld_field,',') within group (order by dld_id)  from datalistdetail where dld_caller='" + Caller + "'";
             command = new OracleCommand(SQL, connection);
+            Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter(command);
             ad.Fill(dt);
             ad.Dispose();
@@ -929,6 +937,7 @@ namespace UAS_MES.DataOperate
             string sql = "update " + TableName + " set " + update + " where " + condition;
             Console.WriteLine(sql);
             command = new OracleCommand(sql, connection);
+            Reconnect(command);
             command.ExecuteNonQuery();
             command.Dispose();
             return sql;
@@ -943,7 +952,7 @@ namespace UAS_MES.DataOperate
         {
             command = new OracleCommand(ProcedureName);
             command.Connection = connection;
-            //Reconnect(command);
+            Reconnect(command);
             command.CommandText = ProcedureName;
             command.CommandType = CommandType.StoredProcedure;
             for (int i = 0; i < param.Length; i++)
@@ -1033,6 +1042,7 @@ namespace UAS_MES.DataOperate
         {
             DataTable dt = new DataTable();
             command = new OracleCommand(sql, connection);
+            Reconnect(command);
             OracleDataAdapter ad = new OracleDataAdapter();
             ad.SelectCommand = command;
             ad.Fill(dt);

+ 1 - 1
UAS-MES/DbFind.cs

@@ -208,7 +208,7 @@ namespace UAS_MES
                 if (MainControl is MaCodeSearchTextBox)
                 {
                     MaCodeSearchTextBox ctl = (MainControl as MaCodeSearchTextBox);
-                    ctl.GetData();
+                    ctl.GetData(true);
                 }
                 if (MainControl is SearchTextBox)
                 {

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

@@ -191,10 +191,9 @@ namespace UAS_MES.Make
                         {
                             dt = (DataTable)dh.ExecuteSql("select ms_nextstepcode,ms_stepcode,ms_status,nvl(st_ifrepair,0) st_ifrepair from makeserial left join step on ms_stepcode=st_code where ms_id='" + oMSID + "'", "select");
                             string status = dt.Rows[0]["ms_status"].ToString();
-                            string nextstepcode = dt.Rows[0]["ms_nextstepcode"].ToString();
                             string stepcode = dt.Rows[0]["ms_stepcode"].ToString();
                             string ifrepair = dt.Rows[0]["st_ifrepair"].ToString();
-                            if (nextstepcode == User.CurrentStepCode && (status == "1" || status == "2") && ifrepair == "0")
+                            if (stepcode == User.CurrentStepCode && (status == "1" || status == "2") && ifrepair == "0")
                             {
                                 OperateResult.AppendText(">>" + ms_sncode.Text + " 序列号已执行过" + User.CurrentStepCode + "工序,采集结果为良品\n", Color.Red, ms_sncode);
                                 return;

+ 1 - 1
UAS-MES/UAS-MES.csproj

@@ -41,7 +41,7 @@
     <MinimumRequiredVersion>1.0.0.201</MinimumRequiredVersion>
     <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
     <WebPage>publish.htm</WebPage>
-    <ApplicationRevision>224</ApplicationRevision>
+    <ApplicationRevision>227</ApplicationRevision>
     <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
     <UseApplicationTrust>true</UseApplicationTrust>
     <CreateDesktopShortcut>true</CreateDesktopShortcut>

File diff suppressed because it is too large
+ 193 - 211
UAS-出货标签管理/UAS_出货标签管理.Designer.cs


+ 1 - 1
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -1826,7 +1826,7 @@ namespace UAS_LabelMachine
             else
             {
                 sql.Clear();
-                sql.Append("select pd_pocode,pib_id,pib_pdid,pib_piid,pib_pdno,pib_prodcode,pr_brand,pr_vendprodcode,");
+                sql.Append("select pd_custprodcode,pd_custprodspec,pd_pocode,pib_id,pib_pdid,pib_piid,pib_pdno,pib_prodcode,pr_brand,pr_vendprodcode,");
                 sql.Append("pib_lotno,pib_datecode,pib_qty,pib_barcode,pib_outboxcode1,pib_outboxcode2,pib_ifpick,pib_ifprint");
                 sql.Append(",sa_pocode from prodiobarcode left join prodiodetail on pib_piid=pd_piid and pd_pdno=pib_pdno and ");
                 sql.Append(" pd_prodcode=pib_prodcode left join product on pr_code=pib_prodcode left join sale on sa_code=pib_ordercode ");

+ 3 - 0
UAS-出货标签管理/UAS_出货标签管理.resx

@@ -156,6 +156,9 @@
   <metadata name="pd_custprodcode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="pd_custprodspec.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>

Some files were not shown because too many files changed in this diff