Просмотр исходного кода

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

Hcsy 8 лет назад
Родитель
Сommit
be9f509fa3

+ 241 - 0
UAS-MES/FunctionCode/Packing/Packing_CartonSplit.Designer.cs

@@ -0,0 +1,241 @@
+namespace UAS_MES.Packing
+{
+    partial class Packing_CartonSplit
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.label1 = new System.Windows.Forms.Label();
+            this.lock_outbox = new System.Windows.Forms.CheckBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.pa_currentqty = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.pa_prodcode = new System.Windows.Forms.Label();
+            this.label6 = new System.Windows.Forms.Label();
+            this.packtype = new System.Windows.Forms.Label();
+            this.label8 = new System.Windows.Forms.Label();
+            this.label9 = new System.Windows.Forms.Label();
+            this.count = new System.Windows.Forms.Label();
+            this.OperateResult = new UAS_MES.CustomControl.RichText.RichTextAutoBottom();
+            this.sncode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.pa_outboxcode = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.SuspendLayout();
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label1.Location = new System.Drawing.Point(39, 29);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(62, 31);
+            this.label1.TabIndex = 0;
+            this.label1.Text = "箱号";
+            // 
+            // lock_outbox
+            // 
+            this.lock_outbox.AutoSize = true;
+            this.lock_outbox.Location = new System.Drawing.Point(342, 35);
+            this.lock_outbox.Name = "lock_outbox";
+            this.lock_outbox.Size = new System.Drawing.Size(22, 21);
+            this.lock_outbox.TabIndex = 2;
+            this.lock_outbox.UseVisualStyleBackColor = true;
+            this.lock_outbox.CheckedChanged += new System.EventHandler(this.lock_outbox_CheckedChanged);
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label2.Location = new System.Drawing.Point(676, 29);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(110, 31);
+            this.label2.TabIndex = 3;
+            this.label2.Text = "箱内数量";
+            // 
+            // pa_currentqty
+            // 
+            this.pa_currentqty.AutoSize = true;
+            this.pa_currentqty.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.pa_currentqty.Location = new System.Drawing.Point(792, 29);
+            this.pa_currentqty.Name = "pa_currentqty";
+            this.pa_currentqty.Size = new System.Drawing.Size(0, 31);
+            this.pa_currentqty.TabIndex = 4;
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label4.Location = new System.Drawing.Point(39, 116);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(110, 31);
+            this.label4.TabIndex = 5;
+            this.label4.Text = "产品编号";
+            // 
+            // pa_prodcode
+            // 
+            this.pa_prodcode.AutoSize = true;
+            this.pa_prodcode.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.pa_prodcode.Location = new System.Drawing.Point(160, 116);
+            this.pa_prodcode.Name = "pa_prodcode";
+            this.pa_prodcode.Size = new System.Drawing.Size(0, 31);
+            this.pa_prodcode.TabIndex = 6;
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label6.Location = new System.Drawing.Point(669, 116);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(120, 31);
+            this.label6.TabIndex = 7;
+            this.label6.Text = "工单/合同";
+            // 
+            // packtype
+            // 
+            this.packtype.AutoSize = true;
+            this.packtype.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.packtype.Location = new System.Drawing.Point(802, 116);
+            this.packtype.Name = "packtype";
+            this.packtype.Size = new System.Drawing.Size(0, 31);
+            this.packtype.TabIndex = 8;
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F);
+            this.label8.Location = new System.Drawing.Point(39, 486);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(86, 31);
+            this.label8.TabIndex = 9;
+            this.label8.Text = "序列号";
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("微软雅黑", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label9.Location = new System.Drawing.Point(554, 486);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(52, 27);
+            this.label9.TabIndex = 10;
+            this.label9.Text = "计数";
+            // 
+            // count
+            // 
+            this.count.AutoSize = true;
+            this.count.Font = new System.Drawing.Font("微软雅黑", 10F);
+            this.count.Location = new System.Drawing.Point(670, 486);
+            this.count.Name = "count";
+            this.count.Size = new System.Drawing.Size(24, 27);
+            this.count.TabIndex = 12;
+            this.count.Text = "0";
+            // 
+            // OperateResult
+            // 
+            this.OperateResult.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.OperateResult.Location = new System.Drawing.Point(31, 204);
+            this.OperateResult.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.OperateResult.Name = "OperateResult";
+            this.OperateResult.Size = new System.Drawing.Size(915, 246);
+            this.OperateResult.TabIndex = 196;
+            this.OperateResult.Text = "";
+            // 
+            // sncode
+            // 
+            this.sncode.AllPower = null;
+            this.sncode.BackColor = System.Drawing.Color.White;
+            this.sncode.ID = null;
+            this.sncode.Location = new System.Drawing.Point(159, 486);
+            this.sncode.Name = "sncode";
+            this.sncode.Power = null;
+            this.sncode.Size = new System.Drawing.Size(196, 28);
+            this.sncode.Str = null;
+            this.sncode.Str1 = null;
+            this.sncode.Str2 = null;
+            this.sncode.TabIndex = 11;
+            this.sncode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.sncode_KeyDown);
+            // 
+            // pa_outboxcode
+            // 
+            this.pa_outboxcode.AllPower = null;
+            this.pa_outboxcode.BackColor = System.Drawing.Color.White;
+            this.pa_outboxcode.ID = null;
+            this.pa_outboxcode.Location = new System.Drawing.Point(127, 32);
+            this.pa_outboxcode.Name = "pa_outboxcode";
+            this.pa_outboxcode.Power = null;
+            this.pa_outboxcode.Size = new System.Drawing.Size(196, 28);
+            this.pa_outboxcode.Str = null;
+            this.pa_outboxcode.Str1 = null;
+            this.pa_outboxcode.Str2 = null;
+            this.pa_outboxcode.TabIndex = 1;
+            this.pa_outboxcode.KeyDown += new System.Windows.Forms.KeyEventHandler(this.pa_outboxcode_KeyDown);
+            // 
+            // Packing_CartonSplit
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(982, 581);
+            this.Controls.Add(this.OperateResult);
+            this.Controls.Add(this.count);
+            this.Controls.Add(this.sncode);
+            this.Controls.Add(this.label9);
+            this.Controls.Add(this.label8);
+            this.Controls.Add(this.packtype);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.pa_prodcode);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.pa_currentqty);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.lock_outbox);
+            this.Controls.Add(this.pa_outboxcode);
+            this.Controls.Add(this.label1);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Name = "Packing_CartonSplit";
+            this.Tag = "Packing!CartonSplit";
+            this.Text = "Packing_CartonSplit";
+            this.Load += new System.EventHandler(this.Packing_CartonSplit_Load);
+            this.SizeChanged += new System.EventHandler(this.Packing_CartonSplit_SizeChanged);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Label label1;
+        private CustomControl.TextBoxWithIcon.EnterTextBox pa_outboxcode;
+        private System.Windows.Forms.CheckBox lock_outbox;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label pa_currentqty;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Label pa_prodcode;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.Label packtype;
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.Label label9;
+        private CustomControl.TextBoxWithIcon.EnterTextBox sncode;
+        private System.Windows.Forms.Label count;
+        private CustomControl.RichText.RichTextAutoBottom OperateResult;
+    }
+}

+ 235 - 0
UAS-MES/FunctionCode/Packing/Packing_CartonSplit.cs

@@ -0,0 +1,235 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES.DataOperate;
+using UAS_MES.Entity;
+using UAS_MES.PublicMethod;
+
+namespace UAS_MES.Packing
+{
+    public partial class Packing_CartonSplit : Form
+    {
+        //拼接sql的
+        LogStringBuilder sql = new LogStringBuilder();
+
+        DataHelper dh;
+
+        DataTable dt;//存放箱号查询信息
+
+        DataTable checknoInfo;
+
+        string error = "";//记录错误信息
+
+        string ms_id = "";
+
+        string outboxcode = "";
+
+        string pd_id = "";
+
+        AutoSizeFormClass asc = new AutoSizeFormClass();
+        public Packing_CartonSplit()
+        {
+            InitializeComponent();
+        }
+        private void Packing_CartonSplit_Load(object sender, EventArgs e)
+        {
+            dh = new DataHelper();
+            asc.controllInitializeSize(this);
+            OperateResult.AppendText(">>请输入箱号\n", Color.Black);
+            pa_outboxcode.Focus();
+        }
+        private void pa_outboxcode_KeyDown(object sender, KeyEventArgs e)
+        {
+            //按下回车
+            if (e.KeyCode==Keys.Enter)
+            {
+                lKeyDown(false);
+            }
+        }
+
+        private void sncode_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode==Keys.Enter) {
+                if (sncode.Text=="") {
+                    OperateResult.AppendText("<<输入不能为空\n", Color.Red);
+                    return;
+                }
+                //判断箱号是否为空
+                if (pa_outboxcode.Text=="") {
+                    OperateResult.AppendText("<<请先选择箱号\n", Color.Red, sncode);
+                    return;
+                }
+                OperateResult.AppendText(">>" + sncode.Text + "\n", Color.Black);
+                if (LogicHandler.CheckStepAttribute(Tag.ToString(), User.UserSourceCode, out error))
+                {
+                    //验证序列号是否存在,是否装箱,箱号等于页面输入的箱号
+                    //select max(ms_id) from makeserial where ms_sncode=?
+                    ms_id = dh.getFieldDataByCondition("makeserial","max(ms_id)","ms_sncode='"+sncode.Text+"'").ToString();
+                    if (ms_id=="") {
+                        OperateResult.AppendText("<<序列号" + sncode.Text + "不存在\n", Color.Red, sncode);
+                        return;
+                    }
+                    outboxcode = dh.getFieldDataByCondition("makeserial", "ms_outboxcode","ms_id='"+ms_id+"' and nvl(ms_outboxcode,' ')<>' '").ToString();
+                    if (outboxcode=="") {
+                        OperateResult.AppendText("<<序列号" + sncode.Text + "未装箱\n", Color.Red, sncode);
+                        return;
+                    }
+                    if (pa_outboxcode.Text!=outboxcode)
+                    {
+                        OperateResult.AppendText("<<序列号" + sncode.Text + "箱号为:" + outboxcode+",不在箱号:"+pa_outboxcode.Text+ "中,无法拆箱\n", Color.Red, sncode);
+                        return;
+                    }
+                    //验证箱号
+                    if (!checkOutboxcode(false))
+                    {
+                        return;
+                    }
+                    //验证是否在箱内
+                    pd_id = dh.getFieldDataByCondition("packagedetail", "pd_id", "pd_outboxcode='"+pa_outboxcode.Text+"' and pd_barcode='"+sncode.Text+"'").ToString();
+                    if (pd_id=="")
+                    {
+                        OperateResult.AppendText("<<序列号" + sncode.Text + "不在箱号:" + pa_outboxcode.Text+ "内,不允许拆箱\n", Color.Red, sncode);
+                        return;
+                    }
+                    //进行拆箱处理
+                    //删除明细
+                    dh.ExecuteSql("delete from packagedetail where pd_id='"+pd_id+"'", "select");
+                    //更新序列号
+                    dh.ExecuteSql("update makeserial set ms_outboxcode='' where ms_id='"+ms_id+"'", "update");
+                    //更新箱内当前数量
+                    dh.ExecuteSql("update package set pa_currentqty=pa_currentqty-1 where pa_outboxcode='"+pa_outboxcode.Text+"'", "update");
+                    //记录拆箱操作日志
+                    LogicHandler.DoCommandLog(Tag.ToString(),User.UserCode,packtype.Text,User.UserLineCode,User.UserSourceCode,"卡通箱拆箱", "卡通箱拆箱成功,序列号:"+sncode.Text+",箱号:"+pa_outboxcode.Text,sncode.Text,"");
+                    //提示拆箱成功
+                    OperateResult.AppendText("<<拆箱成功,序列号:"+sncode.Text+",已从箱号:"+pa_outboxcode.Text+ "内移除\n", Color.Green);
+                    //刷新箱内数量
+                    pa_currentqty.Text = int.Parse(pa_currentqty.Text)-1+"";
+                    //计数加1
+                    count.Text = int.Parse(count.Text) + 1 + "";
+                    sncode.Text = "";
+                }
+                else
+                {
+                    OperateResult.AppendText("<<"+error+ "\n", Color.Red, sncode);
+                }
+            }
+        }
+        private bool checkOutboxcode(bool flag)
+        {
+            //校验箱号
+            sql.Clear();
+            sql.Append("select pa_prodcode,pr_detail,pr_spec,pa_standardqty,nvl(pa_currentqty,0) pa_currentqty,pa_salecode,pa_makecode,");
+            sql.Append("pa_packtype,nvl(pa_downstatus,0) pa_downstatus,pa_checkno from package left join product on ");
+            sql.Append("pr_code=pa_prodcode where pa_outboxcode='" + pa_outboxcode.Text + "'  and PA_TYPE=1");
+            dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
+            //查询无值,提示用户 “箱号不存在”,清空输入框中的值
+            if (dt.Rows.Count == 0)
+            {
+                if (flag)
+                {
+                    MessageBox.Show("箱号"+pa_outboxcode.Text+"不存在");
+                    return false;
+                }
+                OperateResult.AppendText("<<箱号"+pa_outboxcode.Text+"不存在\n", Color.Red, pa_outboxcode);
+                return false;
+            }
+            //判断是否下地
+            if (dt.Rows[0]["pa_downstatus"].ToString() != "0")
+            {
+                if (flag)
+                {
+                    MessageBox.Show("箱号" + pa_outboxcode.Text + "处于下地状态不允许操作");
+                    return false;
+                }
+                OperateResult.AppendText("<<箱号" + pa_outboxcode.Text + "处于下地状态不允许操作\n", Color.Red, pa_outboxcode);
+                return false;
+            }
+            //判断是否有抽检批次号,并且未判定
+            if (dt.Rows[0]["pa_checkno"].ToString() != "")
+            {
+                checknoInfo = (DataTable)dh.ExecuteSql("select count(1) cn from oqcbatch where ob_checkno='" + dt.Rows[0]["pa_checkno"].ToString() + "' and ob_status not in('OK','NG')", "select");
+                //cn>0 ,则返回提示用户“箱号处于送检状态,不允许拆箱”
+                if (int.Parse(checknoInfo.Rows[0]["cn"].ToString()) > 0)
+                {
+                    if (flag)
+                    {
+                        MessageBox.Show("箱号" + pa_outboxcode.Text + "处于送检状态,不允许拆箱");
+                        return false;
+                    }
+                    OperateResult.AppendText("<<箱号" + pa_outboxcode.Text + "处于送检状态,不允许拆箱\n", Color.Red, pa_outboxcode);
+                    return false;
+                }
+            }
+            return true;
+        }
+
+        private void lock_outbox_CheckedChanged(object sender, EventArgs e)
+        {
+            if (!lock_outbox.Checked)
+            {
+                if (!pa_outboxcode.Enabled)
+                {
+                    //取消勾选,箱号不可编辑时设置可编辑
+                    pa_outboxcode.Enabled = true;
+                }
+                    pa_outboxcode.Focus();
+            }
+            else
+            {
+                //勾选
+                lKeyDown(true);
+            }
+        }
+
+        private void Packing_CartonSplit_SizeChanged(object sender, EventArgs e)
+        {
+            asc.controlAutoSize(this);
+        }
+        private void lKeyDown(bool flag)
+        {
+            //输入不能为空
+            if (pa_outboxcode.Text == "")
+            {
+                if (flag)
+                {
+                    MessageBox.Show("输入不能为空");
+                    return;
+                }
+                OperateResult.AppendText("<<输入不能为空\n", Color.Red);
+                return;
+            }
+            if (pa_outboxcode.Enabled)
+            {
+                OperateResult.AppendText(">>" + pa_outboxcode.Text + "\n", Color.Black);
+            }
+            //验证箱号
+            if (!checkOutboxcode(flag))
+            {
+                return;
+            }
+            //判定通过,则自动勾选,显示箱号相关信息
+            BaseUtil.SetFormValue(this.Controls, dt);
+            //特殊赋值
+            if (dt.Rows[0]["pa_packtype"].ToString() == "SALE")
+            {
+                packtype.Text = dt.Rows[0]["pa_salecode"].ToString();
+            }
+            else if (dt.Rows[0]["pa_packtype"].ToString() == "MAKE")
+            {
+                packtype.Text = dt.Rows[0]["pa_makecode"].ToString();
+            }
+            else if (dt.Rows[0]["pa_packtype"].ToString() == "MIX" || dt.Rows[0]["pa_packtype"].ToString() == "SPEC")
+            {
+                pa_prodcode.Text = "混包";
+            }
+            pa_outboxcode.Enabled = false;
+            lock_outbox.Checked = true;
+            sncode.Focus();
+        }
+    }
+}

+ 120 - 0
UAS-MES/FunctionCode/Packing/Packing_CartonSplit.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 2 - 2
UAS_MesInterface/MESHelper.cs

@@ -18,7 +18,7 @@ namespace BenQGuru.eMES.DLLService
         bool CheckUserAndResourcePassed(string iUserCode, string iResCode, string iPassWord, out string oErrMessage);
         bool GetAddressRangeByMO(string iSN, out string oWIFI, out string oBT, out string oCode1, out string oCode2, out string oCdoe3, out string oErrMessage);
         bool SetAddressInfo(string iSN, string iWIFI, string iBT, string iCode1, string iCode2, string iCode3, out string oErrorMessage);
-        bool SetTestDetail(string iSN, string iTestResult, string iResCode, string[] iTestDetail, out string oErrMessage);
+        bool SetTestDetail(string iSN, string iTestResult, string iResCode,ref string[] iTestDetail, out string oErrMessage);
         bool GetMEIOrNetCodeRange(string iSnCode, string iIMEI1, string iNetCode, out string oIMEI1, out string oIMEI2, out string oMEID, out string oNetCode, out string oPSN, out string oID1, out string oID2, out string oID3, out string oID4, out string oID5, out string oErrMessage);
         bool SetIMEIInfo(string iSnCode, string iIMEI1, out string oErrMessage);
         bool GetMobileAllInfo(string iSnCode, out string oWIFI, out string oBT, out string oCode1, out string oCode2, out string oCode3, out string oIMEI1, out string oIMEI2, out string oMEID, out string oNetCode, out string oPSN, out string oID1, out string oID2, out string oID3, out string oID4, out string oID5, out string oErrorMessage);
@@ -540,7 +540,7 @@ namespace BenQGuru.eMES.DLLService
         /// <param name="iTestResult"></param>
         /// <param name="oErrMessage"></param>                                                      
         /// <returns></returns>
-        public bool SetTestDetail(string iSN, string iTestResult, string iResCode, string[] iTestDetail, out string oErrMessage)
+        public bool SetTestDetail(string iSN, string iTestResult, string iResCode,ref string[] iTestDetail, out string oErrMessage)
         {
             if (iSN == "" || iSN == null)
             {