callm 5 роки тому
батько
коміт
def1099201

+ 0 - 3
UAS_MES_ODLF/FunctionCode/Make/Make_ColorBoxWeigh.cs

@@ -181,9 +181,6 @@ namespace UAS_MES_NEW.Make
                                     LogicHandler.DoCommandLog(Tag.ToString(), User.UserCode, ma_code.Text, User.UserLineCode, User.UserSourceCode, "彩盒称重:" + weight.Text, "称量合格", sncode.Text, "");
                                     LogicHandler.RecordProdWeight(sncode.Text, "SN", float.Parse(ActualWeight.ToString()), "kg", User.UserLineCode, pr_code.Text, User.UserSourceCode, User.UserName);
                                     dh.ExecuteSql("update makeserial set ms_grossw='" + ActualWeight + "' where ms_id='" + oMsID + "'", "update");
-                                    SetCheck set = new SetCheck("OK", Color.Green);
-                                    BaseUtil.SetFormCenter(set);
-                                    set.ShowDialog();
                                 }
                                 else
                                 {

+ 6 - 10
UAS_MES_ODLF/FunctionCode/Make/Make_FeedingCollection.cs

@@ -190,9 +190,10 @@ namespace UAS_MES_NEW.Make
                                 }
                                 Save_OtherCode(sp_fsoncode, sp_soncode, make_code, sn_code.Text, sp_id);
                             }
-                            else {
+                            else
+                            {
                                 OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
-                                SetCheck set = new SetCheck("NG",Color.Red);
+                                SetCheck set = new SetCheck("NG", Color.Red);
                                 BaseUtil.SetFormCenter(set);
                                 set.ShowDialog();
                             }
@@ -425,7 +426,7 @@ namespace UAS_MES_NEW.Make
         {
             CollectDataSonCode.Add(sp_soncode);
             //采集成功提示
-         
+
             CollectData.Add(code.Text.Substring(0, code.Text.Length > 80 ? 80 : code.Text.Length));
             if (!CheckBarcode.ContainsKey(sp_fsoncode))
             {
@@ -501,15 +502,10 @@ namespace UAS_MES_NEW.Make
                     EventArgs e = new EventArgs();
                     object sender = null;
                     ma_code_UserControlTextChanged(sender, e);
-                    SetCheck set = new SetCheck("OK", Color.Green);
-                    BaseUtil.SetFormCenter(set);
-                    set.ShowDialog();
                 }
-                else {
+                else
+                {
                     OperateResult.AppendText(">>" + ErrorMessage + "\n", Color.Red, code);
-                    SetCheck set = new SetCheck("NG", Color.Red);
-                    BaseUtil.SetFormCenter(set);
-                    set.ShowDialog();
                 }
             }
         }

+ 2 - 4
UAS_MES_ODLF/FunctionCode/Make/Make_PreFeedingCollection.cs

@@ -30,7 +30,6 @@ namespace UAS_MES_NEW.Make
         DataHelper dh;
         LogStringBuilder sql = new LogStringBuilder();
         DataTable DBFind;
-        DataTable dt;
         //保存ListB中的数据
         DataTable dt1;
 
@@ -119,8 +118,6 @@ namespace UAS_MES_NEW.Make
                                 GetMainCode = true;
                                 OperateResult.AppendText(">> 获取条码" + code.Text + "成功\n");
                                 GetItem();
-                                //code.Clear();
-                                //return;
                             }
                             else
                             {
@@ -242,6 +239,7 @@ namespace UAS_MES_NEW.Make
                                             dh.ExecuteSql(sql.GetString(), "delete");
                                             mainbarcode.Text = "";
                                             GetItem();
+                                            OperateResult.AppendText(">> 条码" + code.Text + "下料成功\n", Color.Green, code);
                                         }
                                     }
                                     else
@@ -250,8 +248,8 @@ namespace UAS_MES_NEW.Make
                                         sql.Append("delete from BEFOREHANDPROCESS where bhp_barcode='" + code.Text + "'");
                                         dh.ExecuteSql(sql.GetString(), "delete");
                                         LabelDataGridView.Rows[i].Cells["BarCode"].Value = "";
+                                        OperateResult.AppendText(">> 条码" + code.Text + "下料成功\n", Color.Green, code);
                                     }
-                                    OperateResult.AppendText(">> 条码" + code.Text + "下料成功\n", Color.Green, code);
                                 }
                             }
                         }

+ 298 - 0
UAS_MES_ODLF/FunctionCode/Query/Query_SN.Designer.cs

@@ -0,0 +1,298 @@
+namespace UAS_MES_NEW.Query
+{
+    partial class Query_SN
+    {
+        /// <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()
+        {
+            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Query_SN));
+            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.date = new System.Windows.Forms.DateTimePicker();
+            this.label6 = new System.Windows.Forms.Label();
+            this.label7 = new System.Windows.Forms.Label();
+            this.num = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.status = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.seriallength = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.pr_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.color = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.factory = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Export = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            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(106, 283);
+            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(146, 41);
+            this.label1.TabIndex = 1;
+            this.label1.Text = "工厂代码";
+            // 
+            // 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(106, 151);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(146, 41);
+            this.label2.TabIndex = 2;
+            this.label2.Text = "颜色代码";
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label5.Location = new System.Drawing.Point(106, 82);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(146, 41);
+            this.label5.TabIndex = 11;
+            this.label5.Text = "产品代码";
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label3.Location = new System.Drawing.Point(106, 426);
+            this.label3.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(146, 41);
+            this.label3.TabIndex = 13;
+            this.label3.Text = "流水长度";
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label4.Location = new System.Drawing.Point(106, 353);
+            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(146, 41);
+            this.label4.TabIndex = 15;
+            this.label4.Text = "组装状态";
+            // 
+            // date
+            // 
+            this.date.Location = new System.Drawing.Point(305, 219);
+            this.date.Name = "date";
+            this.date.Size = new System.Drawing.Size(388, 35);
+            this.date.TabIndex = 17;
+            this.date.Value = new System.DateTime(2020, 9, 7, 0, 0, 0, 0);
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label6.Location = new System.Drawing.Point(106, 217);
+            this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(82, 41);
+            this.label6.TabIndex = 18;
+            this.label6.Text = "日期";
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label7.Location = new System.Drawing.Point(106, 495);
+            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(126, 41);
+            this.label7.TabIndex = 19;
+            this.label7.Text = "SN数量";
+            // 
+            // num
+            // 
+            this.num.AllPower = null;
+            this.num.BackColor = System.Drawing.Color.White;
+            this.num.ID = null;
+            this.num.Location = new System.Drawing.Point(305, 496);
+            this.num.Margin = new System.Windows.Forms.Padding(6);
+            this.num.Name = "num";
+            this.num.Power = null;
+            this.num.Size = new System.Drawing.Size(388, 35);
+            this.num.Str = null;
+            this.num.Str1 = null;
+            this.num.Str2 = null;
+            this.num.TabIndex = 20;
+            // 
+            // status
+            // 
+            this.status.AllPower = null;
+            this.status.BackColor = System.Drawing.Color.White;
+            this.status.ID = null;
+            this.status.Location = new System.Drawing.Point(305, 356);
+            this.status.Margin = new System.Windows.Forms.Padding(6);
+            this.status.Name = "status";
+            this.status.Power = null;
+            this.status.Size = new System.Drawing.Size(388, 35);
+            this.status.Str = null;
+            this.status.Str1 = null;
+            this.status.Str2 = null;
+            this.status.TabIndex = 16;
+            // 
+            // seriallength
+            // 
+            this.seriallength.AllPower = null;
+            this.seriallength.BackColor = System.Drawing.Color.White;
+            this.seriallength.ID = null;
+            this.seriallength.Location = new System.Drawing.Point(305, 427);
+            this.seriallength.Margin = new System.Windows.Forms.Padding(6);
+            this.seriallength.Name = "seriallength";
+            this.seriallength.Power = null;
+            this.seriallength.Size = new System.Drawing.Size(388, 35);
+            this.seriallength.Str = null;
+            this.seriallength.Str1 = null;
+            this.seriallength.Str2 = null;
+            this.seriallength.TabIndex = 14;
+            this.seriallength.Text = "7";
+            // 
+            // pr_code
+            // 
+            this.pr_code.AllPower = null;
+            this.pr_code.BackColor = System.Drawing.Color.White;
+            this.pr_code.ID = null;
+            this.pr_code.Location = new System.Drawing.Point(305, 88);
+            this.pr_code.Margin = new System.Windows.Forms.Padding(6);
+            this.pr_code.Name = "pr_code";
+            this.pr_code.Power = null;
+            this.pr_code.Size = new System.Drawing.Size(388, 35);
+            this.pr_code.Str = null;
+            this.pr_code.Str1 = null;
+            this.pr_code.Str2 = null;
+            this.pr_code.TabIndex = 12;
+            this.pr_code.Text = "95023";
+            // 
+            // color
+            // 
+            this.color.AllPower = null;
+            this.color.BackColor = System.Drawing.Color.White;
+            this.color.ID = null;
+            this.color.Location = new System.Drawing.Point(305, 156);
+            this.color.Margin = new System.Windows.Forms.Padding(6);
+            this.color.Name = "color";
+            this.color.Power = null;
+            this.color.Size = new System.Drawing.Size(388, 35);
+            this.color.Str = null;
+            this.color.Str1 = null;
+            this.color.Str2 = null;
+            this.color.TabIndex = 6;
+            this.color.Text = "5";
+            // 
+            // factory
+            // 
+            this.factory.AllPower = null;
+            this.factory.BackColor = System.Drawing.Color.White;
+            this.factory.ID = null;
+            this.factory.Location = new System.Drawing.Point(305, 285);
+            this.factory.Margin = new System.Windows.Forms.Padding(6);
+            this.factory.Name = "factory";
+            this.factory.Power = null;
+            this.factory.Size = new System.Drawing.Size(388, 35);
+            this.factory.Str = null;
+            this.factory.Str1 = null;
+            this.factory.Str2 = null;
+            this.factory.TabIndex = 5;
+            this.factory.Text = "D";
+            // 
+            // Export
+            // 
+            this.Export.AllPower = null;
+            this.Export.BackColor = System.Drawing.Color.Transparent;
+            this.Export.DownImage = ((System.Drawing.Image)(resources.GetObject("Export.DownImage")));
+            this.Export.Image = null;
+            this.Export.IsShowBorder = true;
+            this.Export.Location = new System.Drawing.Point(305, 562);
+            this.Export.Margin = new System.Windows.Forms.Padding(6);
+            this.Export.MoveImage = ((System.Drawing.Image)(resources.GetObject("Export.MoveImage")));
+            this.Export.Name = "Export";
+            this.Export.NormalImage = ((System.Drawing.Image)(resources.GetObject("Export.NormalImage")));
+            this.Export.Power = null;
+            this.Export.Size = new System.Drawing.Size(150, 56);
+            this.Export.TabIndex = 0;
+            this.Export.Text = "导出";
+            this.Export.UseVisualStyleBackColor = false;
+            this.Export.Click += new System.EventHandler(this.Export_Click);
+            // 
+            // Query_SN
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 24F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(1494, 1075);
+            this.Controls.Add(this.num);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.date);
+            this.Controls.Add(this.status);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.seriallength);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.pr_code);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.color);
+            this.Controls.Add(this.factory);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.label1);
+            this.Controls.Add(this.Export);
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.Margin = new System.Windows.Forms.Padding(6);
+            this.Name = "Query_SN";
+            this.Tag = "Query!SpecialReport";
+            this.Text = "Query_SpecialReport";
+            this.Load += new System.EventHandler(this.Query_SpecialReport_Load);
+            this.ResumeLayout(false);
+            this.PerformLayout();
+
+        }
+
+        #endregion
+
+        private CustomControl.ButtonUtil.NormalButton Export;
+        private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label2;
+        private CustomControl.TextBoxWithIcon.EnterTextBox factory;
+        private CustomControl.TextBoxWithIcon.EnterTextBox color;
+        private CustomControl.TextBoxWithIcon.EnterTextBox pr_code;
+        private System.Windows.Forms.Label label5;
+        private CustomControl.TextBoxWithIcon.EnterTextBox seriallength;
+        private System.Windows.Forms.Label label3;
+        private CustomControl.TextBoxWithIcon.EnterTextBox status;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.DateTimePicker date;
+        private System.Windows.Forms.Label label6;
+        private CustomControl.TextBoxWithIcon.EnterTextBox num;
+        private System.Windows.Forms.Label label7;
+    }
+}

+ 282 - 0
UAS_MES_ODLF/FunctionCode/Query/Query_SN.cs

@@ -0,0 +1,282 @@
+using System;
+using System.Data;
+using System.Security.Cryptography;
+using System.Text;
+using System.Windows.Forms;
+using UAS_MES_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+
+namespace UAS_MES_NEW.Query
+{
+    public partial class Query_SN : Form
+    {
+
+        DataHelper dh = SystemInf.dh;
+
+        public Query_SN()
+        {
+            InitializeComponent();
+        }
+
+        private void Export_Click(object sender, EventArgs e)
+        {
+            ExcelExport("");
+        }
+
+        //选择导出Excel时是选择导出数据的还是模板
+        private void ExcelExport(string DataOrTemplet)
+        {
+            //Data表示导出数据
+            //Templet表示导出模板
+            MD5 md5 = MD5.Create();
+            folderBrowserDialog1.Description = "选择导出的路径";
+            DialogResult result = folderBrowserDialog1.ShowDialog();
+            if (result == DialogResult.OK)
+            {
+                string FolderPath = folderBrowserDialog1.SelectedPath;
+                ExcelHandler eh = new ExcelHandler();
+                DataTable dt = new DataTable();
+                dt.Columns.Add("SN");
+                for (int i = 0; i < int.Parse(num.Text); i++)
+                {
+                    DataRow dr = dt.NewRow();
+                    string serial = pr_code.Text
+                        + color.Text
+                        + GetDate(date.Value.ToString("yyyy"), date.Value.ToString("MM"), date.Value.ToString("dd"))
+                        + factory.Text
+                        + status.Text
+                        + lpad(int.Parse(seriallength.Text), (i + 1).ToString());
+                    string encode = MD5Encoding(serial + ")G$d");
+                    dr["SN"] = serial+ encode.Substring(encode.Length-2);
+                    dt.Rows.Add(dr);
+                }
+                eh.ExportExcel(dt, FolderPath);
+            }
+        }
+
+        private void Query_SpecialReport_Load(object sender, EventArgs e)
+        {
+           
+        }
+
+        private static string MD5Encoding(string rawPass)
+        {
+            // 创建MD5类的默认实例:MD5CryptoServiceProvider
+            MD5 md5 = MD5.Create();
+            byte[] bs = Encoding.UTF8.GetBytes(rawPass);
+            byte[] hs = md5.ComputeHash(bs);
+            StringBuilder stb = new StringBuilder();
+            foreach (byte b in hs)
+            {
+                // 以十六进制格式格式化
+                stb.Append(b.ToString("x2"));
+            }
+            return stb.ToString().ToUpper();
+        }
+
+        private static string lpad(int length, string number)
+        {
+            while (number.Length < length)
+            {
+                number = "0" + number;
+            }
+            number = number.Substring(number.Length - length, length);
+            return number;
+        }
+
+        private string GetDate(string year, string month, string day)
+        {
+            string returndate = "";
+            switch (year)
+            {
+                case "2020":
+                    returndate = "C";
+                    break;
+                case "2021":
+                    returndate = "D";
+                    break;
+                case "2022":
+                    returndate = "E";
+                    break;
+                case "2023":
+                    returndate = "F";
+                    break;
+                case "2024":
+                    returndate = "G";
+                    break;
+                case "2025":
+                    returndate = "H";
+                    break;
+                case "2026":
+                    returndate = "I";
+                    break;
+                case "2027":
+                    returndate = "J";
+                    break;
+                case "2028":
+                    returndate = "K";
+                    break;
+                case "2029":
+                    returndate = "L";
+                    break;
+                case "2030":
+                    returndate = "M";
+                    break;
+                case "2031":
+                    returndate = "N";
+                    break;
+                case "2032":
+                    returndate = "O";
+                    break;
+                case "2033":
+                    returndate = "P";
+                    break;
+                case "2034":
+                    returndate = "Q";
+                    break;
+                default:
+                    break;
+            }
+            switch (month)
+            {
+                case "01":
+                    returndate += "1";
+                    break;
+                case "02":
+                    returndate += "2";
+                    break;
+                case "03":
+                    returndate += "3";
+                    break;
+                case "04":
+                    returndate += "4";
+                    break;
+                case "05":
+                    returndate += "5";
+                    break;
+                case "06":
+                    returndate += "6";
+                    break;
+                case "07":
+                    returndate += "7";
+                    break;
+                case "08":
+                    returndate += "8";
+                    break;
+                case "09":
+                    returndate += "9";
+                    break;
+                case "10":
+                    returndate += "A";
+                    break;
+                case "11":
+                    returndate += "B";
+                    break;
+                case "12":
+                    returndate += "C";
+                    break;
+                default:
+                    break;
+            }
+            switch (day)
+            {
+                case "01":
+                    returndate += "1";
+                    break;
+                case "02":
+                    returndate += "2";
+                    break;
+                case "03":
+                    returndate += "3";
+                    break;
+                case "04":
+                    returndate += "4";
+                    break;
+                case "05":
+                    returndate += "5";
+                    break;
+                case "06":
+                    returndate += "6";
+                    break;
+                case "07":
+                    returndate += "7";
+                    break;
+                case "08":
+                    returndate += "8";
+                    break;
+                case "09":
+                    returndate += "9";
+                    break;
+                case "10":
+                    returndate += "A";
+                    break;
+                case "11":
+                    returndate += "B";
+                    break;
+                case "12":
+                    returndate += "C";
+                    break;
+                case "13":
+                    returndate += "D";
+                    break;
+                case "14":
+                    returndate += "E";
+                    break;
+                case "15":
+                    returndate += "F";
+                    break;
+                case "16":
+                    returndate += "G";
+                    break;
+                case "17":
+                    returndate += "H";
+                    break;
+                case "18":
+                    returndate += "I";
+                    break;
+                case "19":
+                    returndate += "J";
+                    break;
+                case "20":
+                    returndate += "K";
+                    break;
+                case "21":
+                    returndate += "L";
+                    break;
+                case "22":
+                    returndate += "M";
+                    break;
+                case "23":
+                    returndate += "N";
+                    break;
+                case "24":
+                    returndate += "O";
+                    break;
+                case "25":
+                    returndate += "P";
+                    break;
+                case "26":
+                    returndate += "Q";
+                    break;
+                case "27":
+                    returndate += "R";
+                    break;
+                case "28":
+                    returndate += "S";
+                    break;
+                case "29":
+                    returndate += "T";
+                    break;
+                case "30":
+                    returndate += "U";
+                    break;
+                case "31":
+                    returndate += "V";
+                    break;
+                default:
+                    break;
+            }
+            return returndate;
+        }
+    }
+}

+ 162 - 0
UAS_MES_ODLF/FunctionCode/Query/Query_SN.resx

@@ -0,0 +1,162 @@
+<?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>
+  <metadata name="folderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="Export.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
+        GcRORxHklpAIBHLfbILV8XxeNsMznJ35F5vu+82kWYuILD4N7oq75roCw27sb/x5WBdc27btntY64o/i
+        DnZjPxy4S6A0R6PHO1WUNHc9ep4uxIXd2D8eP/XZowWUThBG+n3p0stsKbbJ0qFDFFfscQuUbpzm9Pqx
+        Eh8c4PGLkuX0Nl+LDw4GJckUTRaO+OBQo+SKpitXfHAwKClfZuuN+OBgUDJV0NzxxAeHM5TFxhffGUpe
+        aFp5n+KDg0FRfHH8nfjgUKPoktztXnxwMCgFX7xdID441ChlRf7+ID44GBTNl21wFB8capSqot0xFB8c
+        /lE6Wa70IU5oH0Ziw/5cFebpoPUwHPbL04nCJKUgisWF3dgPB3gABc9v7fvBoBcnaVKdvkha2I39cPjx
+        oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
+</value>
+  </data>
+  <data name="Export.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
+        CEIQBEIgVFiS9qXWoDmp4/fHzDmjM2a+vU/QqUVX0DvwXxxn9fwYXJwYEcXWNzIWt83dcq7AsBv7LXgA
+        ZI0r71/aaqjCJf8o7sFu7IcDFwdK4vimrv1oSZXRnArdQFzYjf3pQkOzRxIoVWc6X5X6M7ruBGIr9mbU
+        9MIVe9hAcXvBO125WnxwgMcXSpcPF20tPjgYlI5eUK6lxAcHg9Lmw3nTFx8cDEpLLSjr+OKDg0FpqojO
+        Gp744GBQ3vyITutT8cHBoDheRCe1ifjgYFBe+ZCxJ+KDg0GpT0NKv4zFBweDUpuEdFQdiQ8OBsXmw2Fl
+        JD44/KCM53TwNBQfHAzKMx/2Hgfig8M3SrXYUasUfz67DwOxYf9dV5urg+RWzta4aEnxn83OfV9c2I39
+        cIAHUOJceTNbUfmW94GX0sJu7IcDPH5fXCe4EvfXxe5/D7ux3yKi2CfkPhTy27lqkwAAAABJRU5ErkJg
+        gg==
+</value>
+  </data>
+  <data name="Export.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
+        dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
+        4uUVEtTiPKVlom2wttM6IfF+15njXHRnL19jD/zFmanWV8zAEDNTp9OJS6/Sm2QUht3YH4cHtdvtF6k7
+        mUwG1tqd3FR3YTf2w0FKUVOu6XT68Xgw3+8PtWH/bDYbCkeLGo1Gz/d9JwzvrL0gCKx49KlerxtIBUGo
+        PjjAg2q1mqDc2fN99cEBHlStVk0oB+t56oMDPKhSqZggDNm1N/XBAR5ULpeNvGD46rrqgwM8qFQqGV8O
+        56ujPjjAg4rFosFL5ni5qA8O8KBCoWBuns/701l9cIAH5fN5QfF4dzipDw7woFwuZ+zN483+oD44wIOy
+        2azB52i13asPDvCgTCZjHGt5sdmqDw7woHQ6bRzX8ny1UR8c4EHJZNJc5fC7XKsPDvCgRCLR2x9Pzt9q
+        zT+Lpdqw/3A6W/HoUywWa32Nx8OL4zwffM8X6sJu7IcDPCgajaak7udoNNjsdgc81BZ2Yz8c4PH8cR2J
+        ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
+</value>
+  </data>
+</root>