浏览代码

添加SN生成界面

callm 2 年之前
父节点
当前提交
5d1fc6cfb3

+ 365 - 0
UAS_MES_ODLF/FunctionCode/Query/Query_SpecialReport_SN.Designer.cs

@@ -0,0 +1,365 @@
+namespace UAS_MES_NEW.Query
+{
+    partial class Query_SpecialReport_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_SpecialReport_SN));
+            this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.label7 = new System.Windows.Forms.Label();
+            this.label6 = new System.Windows.Forms.Label();
+            this.label4 = new System.Windows.Forms.Label();
+            this.label8 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.RMLength = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.SNPrefix = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.BeginBT = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.BeginIMEI2 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.BeginIMEI1 = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.BeginMac = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.ma_code = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Num = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.Export = new UAS_MES_NEW.CustomControl.ButtonUtil.NormalButton();
+            this.BeginSN = new UAS_MES_NEW.CustomControl.TextBoxWithIcon.EnterTextBox();
+            this.label9 = new System.Windows.Forms.Label();
+            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, 160);
+            this.label1.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(82, 41);
+            this.label1.TabIndex = 1;
+            this.label1.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, 85);
+            this.label5.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(114, 41);
+            this.label5.TabIndex = 11;
+            this.label5.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, 556);
+            this.label7.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(120, 41);
+            this.label7.TabIndex = 27;
+            this.label7.Text = "起始BT";
+            // 
+            // 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, 709);
+            this.label6.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(168, 41);
+            this.label6.TabIndex = 26;
+            this.label6.Text = "起始IMEI2";
+            // 
+            // 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, 636);
+            this.label4.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(168, 41);
+            this.label4.TabIndex = 23;
+            this.label4.Text = "起始IMEI1";
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label8.Location = new System.Drawing.Point(106, 473);
+            this.label8.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(157, 41);
+            this.label8.TabIndex = 21;
+            this.label8.Text = "起始MAC";
+            // 
+            // 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, 233);
+            this.label2.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(126, 41);
+            this.label2.TabIndex = 29;
+            this.label2.Text = "SN前缀";
+            // 
+            // 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, 311);
+            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 = 31;
+            this.label3.Text = "流水长度";
+            // 
+            // RMLength
+            // 
+            this.RMLength.AllPower = null;
+            this.RMLength.BackColor = System.Drawing.Color.White;
+            this.RMLength.ID = null;
+            this.RMLength.Location = new System.Drawing.Point(305, 313);
+            this.RMLength.Margin = new System.Windows.Forms.Padding(6);
+            this.RMLength.Name = "RMLength";
+            this.RMLength.Power = null;
+            this.RMLength.Size = new System.Drawing.Size(388, 35);
+            this.RMLength.Str = null;
+            this.RMLength.Str1 = null;
+            this.RMLength.Str2 = null;
+            this.RMLength.TabIndex = 32;
+            // 
+            // SNPrefix
+            // 
+            this.SNPrefix.AllPower = null;
+            this.SNPrefix.BackColor = System.Drawing.Color.White;
+            this.SNPrefix.ID = null;
+            this.SNPrefix.Location = new System.Drawing.Point(305, 235);
+            this.SNPrefix.Margin = new System.Windows.Forms.Padding(6);
+            this.SNPrefix.Name = "SNPrefix";
+            this.SNPrefix.Power = null;
+            this.SNPrefix.Size = new System.Drawing.Size(388, 35);
+            this.SNPrefix.Str = null;
+            this.SNPrefix.Str1 = null;
+            this.SNPrefix.Str2 = null;
+            this.SNPrefix.TabIndex = 30;
+            // 
+            // BeginBT
+            // 
+            this.BeginBT.AllPower = null;
+            this.BeginBT.BackColor = System.Drawing.Color.White;
+            this.BeginBT.ID = null;
+            this.BeginBT.Location = new System.Drawing.Point(305, 564);
+            this.BeginBT.Margin = new System.Windows.Forms.Padding(6);
+            this.BeginBT.Name = "BeginBT";
+            this.BeginBT.Power = null;
+            this.BeginBT.Size = new System.Drawing.Size(388, 35);
+            this.BeginBT.Str = null;
+            this.BeginBT.Str1 = null;
+            this.BeginBT.Str2 = null;
+            this.BeginBT.TabIndex = 28;
+            // 
+            // BeginIMEI2
+            // 
+            this.BeginIMEI2.AllPower = null;
+            this.BeginIMEI2.BackColor = System.Drawing.Color.White;
+            this.BeginIMEI2.ID = null;
+            this.BeginIMEI2.Location = new System.Drawing.Point(305, 718);
+            this.BeginIMEI2.Margin = new System.Windows.Forms.Padding(6);
+            this.BeginIMEI2.Name = "BeginIMEI2";
+            this.BeginIMEI2.Power = null;
+            this.BeginIMEI2.Size = new System.Drawing.Size(388, 35);
+            this.BeginIMEI2.Str = null;
+            this.BeginIMEI2.Str1 = null;
+            this.BeginIMEI2.Str2 = null;
+            this.BeginIMEI2.TabIndex = 25;
+            // 
+            // BeginIMEI1
+            // 
+            this.BeginIMEI1.AllPower = null;
+            this.BeginIMEI1.BackColor = System.Drawing.Color.White;
+            this.BeginIMEI1.ID = null;
+            this.BeginIMEI1.Location = new System.Drawing.Point(305, 642);
+            this.BeginIMEI1.Margin = new System.Windows.Forms.Padding(6);
+            this.BeginIMEI1.Name = "BeginIMEI1";
+            this.BeginIMEI1.Power = null;
+            this.BeginIMEI1.Size = new System.Drawing.Size(388, 35);
+            this.BeginIMEI1.Str = null;
+            this.BeginIMEI1.Str1 = null;
+            this.BeginIMEI1.Str2 = null;
+            this.BeginIMEI1.TabIndex = 24;
+            // 
+            // BeginMac
+            // 
+            this.BeginMac.AllPower = null;
+            this.BeginMac.BackColor = System.Drawing.Color.White;
+            this.BeginMac.ID = null;
+            this.BeginMac.Location = new System.Drawing.Point(305, 479);
+            this.BeginMac.Margin = new System.Windows.Forms.Padding(6);
+            this.BeginMac.Name = "BeginMac";
+            this.BeginMac.Power = null;
+            this.BeginMac.Size = new System.Drawing.Size(388, 35);
+            this.BeginMac.Str = null;
+            this.BeginMac.Str1 = null;
+            this.BeginMac.Str2 = null;
+            this.BeginMac.TabIndex = 22;
+            // 
+            // ma_code
+            // 
+            this.ma_code.AllPower = null;
+            this.ma_code.BackColor = System.Drawing.Color.White;
+            this.ma_code.ID = null;
+            this.ma_code.Location = new System.Drawing.Point(305, 88);
+            this.ma_code.Margin = new System.Windows.Forms.Padding(6);
+            this.ma_code.Name = "ma_code";
+            this.ma_code.Power = null;
+            this.ma_code.Size = new System.Drawing.Size(388, 35);
+            this.ma_code.Str = null;
+            this.ma_code.Str1 = null;
+            this.ma_code.Str2 = null;
+            this.ma_code.TabIndex = 12;
+            // 
+            // Num
+            // 
+            this.Num.AllPower = null;
+            this.Num.BackColor = System.Drawing.Color.White;
+            this.Num.ID = null;
+            this.Num.Location = new System.Drawing.Point(305, 161);
+            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 = 5;
+            // 
+            // 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(317, 788);
+            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);
+            // 
+            // BeginSN
+            // 
+            this.BeginSN.AllPower = null;
+            this.BeginSN.BackColor = System.Drawing.Color.White;
+            this.BeginSN.ID = null;
+            this.BeginSN.Location = new System.Drawing.Point(305, 396);
+            this.BeginSN.Margin = new System.Windows.Forms.Padding(6);
+            this.BeginSN.Name = "BeginSN";
+            this.BeginSN.Power = null;
+            this.BeginSN.Size = new System.Drawing.Size(388, 35);
+            this.BeginSN.Str = null;
+            this.BeginSN.Str1 = null;
+            this.BeginSN.Str2 = null;
+            this.BeginSN.TabIndex = 34;
+            // 
+            // label9
+            // 
+            this.label9.AutoSize = true;
+            this.label9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.label9.Location = new System.Drawing.Point(106, 394);
+            this.label9.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
+            this.label9.Name = "label9";
+            this.label9.Size = new System.Drawing.Size(190, 41);
+            this.label9.TabIndex = 33;
+            this.label9.Text = "起始SN流水";
+            // 
+            // Query_SpecialReport_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.BeginSN);
+            this.Controls.Add(this.label9);
+            this.Controls.Add(this.RMLength);
+            this.Controls.Add(this.label3);
+            this.Controls.Add(this.SNPrefix);
+            this.Controls.Add(this.label2);
+            this.Controls.Add(this.BeginBT);
+            this.Controls.Add(this.label7);
+            this.Controls.Add(this.label6);
+            this.Controls.Add(this.BeginIMEI2);
+            this.Controls.Add(this.BeginIMEI1);
+            this.Controls.Add(this.label4);
+            this.Controls.Add(this.BeginMac);
+            this.Controls.Add(this.label8);
+            this.Controls.Add(this.ma_code);
+            this.Controls.Add(this.label5);
+            this.Controls.Add(this.Num);
+            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_SpecialReport_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 CustomControl.TextBoxWithIcon.EnterTextBox Num;
+        private CustomControl.TextBoxWithIcon.EnterTextBox ma_code;
+        private System.Windows.Forms.Label label5;
+        private CustomControl.TextBoxWithIcon.EnterTextBox BeginBT;
+        private System.Windows.Forms.Label label7;
+        private System.Windows.Forms.Label label6;
+        private CustomControl.TextBoxWithIcon.EnterTextBox BeginIMEI2;
+        private CustomControl.TextBoxWithIcon.EnterTextBox BeginIMEI1;
+        private System.Windows.Forms.Label label4;
+        private CustomControl.TextBoxWithIcon.EnterTextBox BeginMac;
+        private System.Windows.Forms.Label label8;
+        private CustomControl.TextBoxWithIcon.EnterTextBox SNPrefix;
+        private System.Windows.Forms.Label label2;
+        private CustomControl.TextBoxWithIcon.EnterTextBox RMLength;
+        private System.Windows.Forms.Label label3;
+        private CustomControl.TextBoxWithIcon.EnterTextBox BeginSN;
+        private System.Windows.Forms.Label label9;
+    }
+}

+ 153 - 0
UAS_MES_ODLF/FunctionCode/Query/Query_SpecialReport_SN.cs

@@ -0,0 +1,153 @@
+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_NEW.DataOperate;
+using UAS_MES_NEW.Entity;
+using UAS_MES_NEW.PublicMethod;
+
+namespace UAS_MES_NEW.Query
+{
+    public partial class Query_SpecialReport_SN : Form
+    {
+
+        DataHelper dh = SystemInf.dh;
+
+        public Query_SpecialReport_SN()
+        {
+            InitializeComponent();
+        }
+
+        private void Export_Click(object sender, EventArgs e)
+        {
+            ExcelExport("");
+        }
+
+        //选择导出Excel时是选择导出数据的还是模板
+        private void ExcelExport(string DataOrTemplet)
+        {
+            //Data表示导出数据
+            //Templet表示导出模板
+            if (ma_code.Text == "")
+            {
+                MessageBox.Show("请输入工单号");
+                return;
+            }
+            if (Num.Text == "")
+            {
+                MessageBox.Show("请输入数量");
+                return;
+            }
+            if (BeginMac.Text == "" || BeginMac.TextLength != 12)
+            {
+                MessageBox.Show("请输入起始地址号或检查长度");
+                return;
+            }
+            if (BeginBT.Text == "" || BeginBT.TextLength != 12)
+            {
+                MessageBox.Show("请输入起始地址号或检查长度");
+                return;
+            }
+            if (BeginIMEI1.Text == "" || BeginIMEI1.TextLength < 15)
+            {
+                MessageBox.Show("请输入IMEI1起始地址号或检查长度");
+                return;
+            }
+            if (BeginIMEI2.Text == "" || BeginIMEI2.TextLength < 15)
+            {
+                MessageBox.Show("请输入IMEI2起始地址号或检查长度");
+                return;
+            }
+            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("工单号");
+                dt.Columns.Add("SN");
+                dt.Columns.Add("MAC");
+                dt.Columns.Add("BT");
+                dt.Columns.Add("IMEI1");
+                dt.Columns.Add("IMEI2");
+                dt.Columns.Add("扩展栏位1");
+                dt.Columns.Add("扩展栏位2");
+                dt.Columns.Add("扩展栏位3");
+                dt.Columns.Add("备注");
+                string prefix = BeginMac.Text.Substring(0, 6);
+                string suffix = BeginMac.Text.Substring(6, 6);
+                string imei1prefix = BeginIMEI1.Text.Substring(0, 10);
+                string imei1suffix = BeginIMEI1.Text.Substring(10, BeginIMEI1.Text.Length-10);
+                string imei2prefix = BeginIMEI2.Text.Substring(0, 10);
+                string imei2suffix = BeginIMEI2.Text.Substring(10, BeginIMEI2.Text.Length - 10);
+                int num = Int32.Parse(suffix, System.Globalization.NumberStyles.HexNumber);
+                int num0 = Int32.Parse(suffix, System.Globalization.NumberStyles.HexNumber);
+                double num1 = double.Parse(imei1suffix);
+                double num2 = double.Parse(imei2suffix);
+                double num3 = double.Parse(BeginSN.Text);
+                for (int i = 0; i < int.Parse(Num.Text); i++)
+                {
+                    DataRow dr = dt.NewRow();
+                    dr["工单号"] = ma_code.Text;
+                    dr["SN"] = SNPrefix.Text + lpad(int.Parse(RMLength.Text), num3.ToString(""));
+                    if (dr["SN"].ToString().Length <=0)
+                    {
+                        MessageBox.Show("生成SN地址错误");
+                        return;
+                    }
+                    dr["MAC"] = prefix + lpad(6, num0.ToString("X"));
+                    if (dr["MAC"].ToString().Length != 12)
+                    {
+                        MessageBox.Show("生成MAC地址错误");
+                        return;
+                    }
+                    dr["BT"] = prefix + lpad(6, num0.ToString("X"));
+                    if (dr["BT"].ToString().Length != 12)
+                    {
+                        MessageBox.Show("生成BT地址错误");
+                        return;
+                    }
+                    dr["IMEI1"] = imei1prefix + num1.ToString("");
+                    if (dr["IMEI1"].ToString().Length < 15)
+                    {
+                        MessageBox.Show("生成IMEI1地址错误");
+                        return;
+                    }
+                    dr["IMEI2"] = imei2prefix + num1.ToString("");
+                    if (dr["IMEI2"].ToString().Length < 15)
+                    {
+                        MessageBox.Show("生成IMEI2地址错误");
+                        return;
+                    }
+                    num = num + 1;
+                    num0 = num0 + 1;
+                    num1 = num1 + 1;
+                    num2= num2 + 1;
+                    num3 = num3 + 1;
+                    dt.Rows.Add(dr);
+                }
+                eh.ExportExcel(dt, FolderPath);
+            }
+        }
+
+        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 void Query_SpecialReport_Load(object sender, EventArgs e)
+        {
+
+        }
+    }
+}

+ 162 - 0
UAS_MES_ODLF/FunctionCode/Query/Query_SpecialReport_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>

+ 13 - 1
UAS_MES_ODLF/UAS_MES_ODLF.csproj

@@ -9,9 +9,10 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>UAS_MES_NEW</RootNamespace>
     <AssemblyName>UAS_MES_NEW</AssemblyName>
-    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <IsWebBootstrapper>true</IsWebBootstrapper>
+    <TargetFrameworkProfile />
     <PublishUrl>ftp://yitoadt.wicp.io:21/</PublishUrl>
     <Install>true</Install>
     <InstallFrom>Web</InstallFrom>
@@ -41,6 +42,7 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -50,6 +52,7 @@
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup>
     <ApplicationIcon>Resources\U_Icon.ico</ApplicationIcon>
@@ -922,6 +925,12 @@
     <Compile Include="FunctionCode\Query\Query_SpecialReport_CTEI.Designer.cs">
       <DependentUpon>Query_SpecialReport_CTEI.cs</DependentUpon>
     </Compile>
+    <Compile Include="FunctionCode\Query\Query_SpecialReport_SN.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="FunctionCode\Query\Query_SpecialReport_SN.Designer.cs">
+      <DependentUpon>Query_SpecialReport_SN.cs</DependentUpon>
+    </Compile>
     <Compile Include="FunctionCode\Query\Query_SpecialReport.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -1519,6 +1528,9 @@
     <EmbeddedResource Include="FunctionCode\Query\Query_SpecialReport_CTEI.resx">
       <DependentUpon>Query_SpecialReport_CTEI.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="FunctionCode\Query\Query_SpecialReport_SN.resx">
+      <DependentUpon>Query_SpecialReport_SN.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="FunctionCode\Query\Query_SpecialReport.resx">
       <DependentUpon>Query_SpecialReport.cs</DependentUpon>
     </EmbeddedResource>