浏览代码

添加标签缩略图,添加客户标签导出,优化导出样式

章政 7 年之前
父节点
当前提交
49dc0e1cf0

+ 8 - 7
UAS-出货标签管理/CustomControl/Pagination.Designer.cs

@@ -98,6 +98,7 @@ namespace UAS_LabelMachine.CustomControl
             this.ShowItemsNum.TabIndex = 13;
             this.ShowItemsNum.Text = "20";
             this.ShowItemsNum.SelectedValueChanged += new System.EventHandler(this.ShowItemsNum_SelectedValueChanged);
+            this.ShowItemsNum.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ShowItemsNum_KeyDown);
             // 
             // UpLoadData
             // 
@@ -112,7 +113,7 @@ namespace UAS_LabelMachine.CustomControl
             // DownLoadTemplet
             // 
             this.DownLoadTemplet.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.DownLoadTemplet.Image =Properties.Resources.download_17_519713261649px_1200629_easyicon_net__1_;
+            this.DownLoadTemplet.Image = global::UAS_LabelMachine.Properties.Resources.download_17_519713261649px_1200629_easyicon_net__1_;
             this.DownLoadTemplet.Location = new System.Drawing.Point(352, 9);
             this.DownLoadTemplet.Name = "DownLoadTemplet";
             this.DownLoadTemplet.Size = new System.Drawing.Size(16, 16);
@@ -124,7 +125,7 @@ namespace UAS_LabelMachine.CustomControl
             // Delete
             // 
             this.Delete.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.Delete.Image = Properties.Resources.bindingNavigatorDeleteItem_Image;
+            this.Delete.Image = global::UAS_LabelMachine.Properties.Resources.bindingNavigatorDeleteItem_Image;
             this.Delete.Location = new System.Drawing.Point(292, 8);
             this.Delete.Name = "Delete";
             this.Delete.Size = new System.Drawing.Size(16, 18);
@@ -136,7 +137,7 @@ namespace UAS_LabelMachine.CustomControl
             // ExportExcel
             // 
             this.ExportExcel.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.ExportExcel.Image = Properties.Resources.Excel_2010_16px_1180011_easyicon_net;
+            this.ExportExcel.Image = global::UAS_LabelMachine.Properties.Resources.Excel_2010_16px_1180011_easyicon_net;
             this.ExportExcel.Location = new System.Drawing.Point(320, 8);
             this.ExportExcel.Name = "ExportExcel";
             this.ExportExcel.Size = new System.Drawing.Size(16, 18);
@@ -178,7 +179,7 @@ namespace UAS_LabelMachine.CustomControl
             // PreviousPage
             // 
             this.PreviousPage.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.PreviousPage.Image =Properties.Resources.bindingNavigatorMovePreviousItem_Image;
+            this.PreviousPage.Image = global::UAS_LabelMachine.Properties.Resources.bindingNavigatorMovePreviousItem_Image;
             this.PreviousPage.Location = new System.Drawing.Point(37, 8);
             this.PreviousPage.Name = "PreviousPage";
             this.PreviousPage.Size = new System.Drawing.Size(15, 15);
@@ -189,7 +190,7 @@ namespace UAS_LabelMachine.CustomControl
             // LastPage
             // 
             this.LastPage.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.LastPage.Image =Properties.Resources.bindingNavigatorMoveLastItem_Image;
+            this.LastPage.Image = global::UAS_LabelMachine.Properties.Resources.bindingNavigatorMoveLastItem_Image;
             this.LastPage.Location = new System.Drawing.Point(157, 8);
             this.LastPage.Name = "LastPage";
             this.LastPage.Size = new System.Drawing.Size(15, 15);
@@ -200,7 +201,7 @@ namespace UAS_LabelMachine.CustomControl
             // NextPage
             // 
             this.NextPage.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.NextPage.Image = Properties.Resources.bindingNavigatorMoveNextItem_Image;
+            this.NextPage.Image = global::UAS_LabelMachine.Properties.Resources.bindingNavigatorMoveNextItem_Image;
             this.NextPage.Location = new System.Drawing.Point(133, 8);
             this.NextPage.Margin = new System.Windows.Forms.Padding(3, 3, 3, 20);
             this.NextPage.Name = "NextPage";
@@ -212,7 +213,7 @@ namespace UAS_LabelMachine.CustomControl
             // FirstPage
             // 
             this.FirstPage.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.FirstPage.Image = Properties.Resources.bindingNavigatorMoveFirstItem_Image;
+            this.FirstPage.Image = global::UAS_LabelMachine.Properties.Resources.bindingNavigatorMoveFirstItem_Image;
             this.FirstPage.Location = new System.Drawing.Point(16, 8);
             this.FirstPage.Name = "FirstPage";
             this.FirstPage.Size = new System.Drawing.Size(15, 15);

+ 26 - 56
UAS-出货标签管理/CustomControl/Pagination.cs

@@ -144,7 +144,7 @@ namespace UAS_LabelMachine.CustomControl
 
         private void ExportExcel_Click(object sender, EventArgs e)
         {
-            ExcelExport("Data");
+            ExcelExport("");
         }
 
         //用户手动输入页码的时候获取数据
@@ -154,43 +154,17 @@ namespace UAS_LabelMachine.CustomControl
             if (e.KeyValue == (int)Keys.Enter)
             {
                 //判断是否是数字类型的
-                if (IsNumOrNull(CurrentPage.Text))
+                Current_Page = int.Parse(CurrentPage.Text);
+                //判断是否是合理的页码
+                if (Current_Page >= 1 && Current_Page <= TotalPageCount)
                 {
-                    Current_Page = int.Parse(CurrentPage.Text);
-                    //判断是否是合理的页码
-                    if (Current_Page >= 1 && Current_Page <= TotalPageCount)
-                    {
-                        GetPageData();
-                    }
-                    else
-                    {
-                        MessageBox.Show("请输入正确的页码");
-                    }
+                    GetPageData();
                 }
                 else
                 {
-                    MessageBox.Show("页码必须是不为空的正整数");
-                }
-            }
-        }
-
-        //判断是不是数字或者空值
-        private bool IsNumOrNull(object Num)
-        {
-            //判断是否是数组
-            foreach (char c in Num.ToString())
-            {
-                if (!char.IsDigit(c))
-                {
-                    return false;
+                    MessageBox.Show("请输入正确的页码");
                 }
             }
-            //判断是否为空值
-            if (Num.ToString() == "")
-            {
-                return false;
-            }
-            return true;
         }
 
         //刷新总页数
@@ -202,7 +176,8 @@ namespace UAS_LabelMachine.CustomControl
             {
                 RowCount = dh.getRowCount(TableName, Condition);
             }
-            else {
+            else
+            {
                 RowCount = dh.getRowCount(TableName);
             }
             //取模后+1来确定总的页数
@@ -277,19 +252,8 @@ namespace UAS_LabelMachine.CustomControl
             {
                 string FolderPath = folderBrowserDialog1.SelectedPath;
                 ExcelHandler eh = new ExcelHandler();
-                DataTable dt = new DataTable();
-                if (DataOrTemplet == "Data")
-                {
-                    // dt = dh.getFieldsDatas(TableName, Field);
-                }
-                else
-                {
-                    //这是根据表名获取到的列和列的数据类型,是column的类型,需要手动转换成row类型
-                    dt = dh.GetColumnDataType(TableName);
-                    dt = dh.DataTypeColumnToDataTable(dt);
-                }
                 //导出Excel的时候返回一个文件名,用户选择是否打开
-                string filePath = eh.ExportExcel(dt, FolderPath,"");
+                string filePath = eh.ExportExcel(BaseUtil.GetExportDataTable(Dgv), FolderPath, "客户标签");
                 //用户选择导出之后是否立即打开
                 MessageBoxButtons messButton = MessageBoxButtons.YesNo;
                 string openFile = MessageBox.Show(this.ParentForm, "是否打开文件", "提示", messButton).ToString();
@@ -307,20 +271,30 @@ namespace UAS_LabelMachine.CustomControl
             {
                 string ChoosedExcel = openFileDialog1.FileName;
                 FileStream fs = new FileStream(ChoosedExcel, FileMode.OpenOrCreate, FileAccess.ReadWrite);
-
             }
         }
 
         private void ShowItemsNum_SelectedValueChanged(object sender, EventArgs e)
         {
-            //int DgvHeight = Dgv.Height;
-            //int DgvRowHeight = Dgv.RowTemplate.Height;
+            PageSize = int.Parse(ShowItemsNum.SelectedItem.ToString());
+            //推荐合理的行数
+            //int AdviceNum = DgvHeight / DgvRowHeight - 3;
+            if (PageSize >= 1)
+            {
+                RefreshTotalCount();
+                GetPageData();
+            }
+            else
+            {
+                MessageBox.Show("请输入正确的数字");
+            }
+        }
 
-            if (IsNumOrNull(ShowItemsNum.SelectedItem))
+        private void ShowItemsNum_KeyDown(object sender, KeyEventArgs e)
+        {
+            if (e.KeyCode == Keys.Enter)
             {
-                PageSize = int.Parse(ShowItemsNum.SelectedItem.ToString());
-                //推荐合理的行数
-                //int AdviceNum = DgvHeight / DgvRowHeight - 3;
+                PageSize = int.Parse(ShowItemsNum.Text);
                 if (PageSize >= 1)
                 {
                     RefreshTotalCount();
@@ -331,10 +305,6 @@ namespace UAS_LabelMachine.CustomControl
                     MessageBox.Show("请输入正确的数字");
                 }
             }
-            else
-            {
-                MessageBox.Show("页码必须是不为空的正整数");
-            }
         }
     }
 }

+ 16 - 0
UAS-出货标签管理/PublicMethod/BaseUtil.cs

@@ -29,6 +29,22 @@ namespace UAS_LabelMachine
             }
         }
 
+        public static DataTable GetExportDataTable(DataGridView dgv)
+        {
+            DataTable dt = ((DataTable)dgv.DataSource).Copy();
+            for (int i = 0; i < dt.Columns.Count; i++)
+            {
+                for (int j = 0; j < dgv.Columns.Count; j++)
+                {
+                    if (dt.Columns[i].ColumnName.ToLower() == dgv.Columns[j].DataPropertyName.ToLower())
+                    {
+                        dt.Columns[i].ColumnName = dgv.Columns[j].HeaderText;
+                    }
+                }
+            }
+            return dt;
+        }
+
         /// <summary>
         /// 通过DataTable的ColumnName和Caption来拼接一条语句
         /// </summary>

+ 15 - 6
UAS-出货标签管理/PublicMethod/ExcelHandler.cs

@@ -9,12 +9,12 @@ namespace UAS_LabelMachine
 {
     class ExcelHandler
     {
-        DataHelper dh = new DataHelper(); 
+        DataHelper dh = new DataHelper();
 
         /// <summary>
         /// 导出Excel,返回文件在客户端的路径
         /// </summary>
-        public string ExportExcel(DataTable dt, string FolderPath,string FileName)
+        public string ExportExcel(DataTable dt, string FolderPath, string FileName)
         {
             //创建一个内存流,用来接收转换成Excel的内容
             MemoryStream ms;
@@ -52,7 +52,6 @@ namespace UAS_LabelMachine
         /// <returns></returns>
         public MemoryStream DataTableToExcel(DataTable DataTable)
         {
-
             //创建内存流
             MemoryStream ms = new MemoryStream();
             //创建一个Book,相当于一个Excel文件
@@ -65,8 +64,19 @@ namespace UAS_LabelMachine
             //设置列的宽度,根据首行的列的内容的长度来设置
             for (int i = 0; i < columnNum; i++)
             {
-                int dataLength = DataTable.Columns[i].ColumnName.Length;
-                sheet.SetColumnWidth(i, dataLength * 700);
+                int dataLength;
+                //如果内容比标题短则取标题长度
+                if (DataTable.Rows[0][i].ToString().Length < DataTable.Columns[i].ColumnName.Length)
+                {
+                    dataLength = DataTable.Columns[i].ColumnName.Length;
+                    dataLength = dataLength * 600;
+                }
+                else
+                {
+                    dataLength = DataTable.Rows[0][i].ToString().Length;
+                    dataLength = dataLength * 500;
+                }
+                sheet.SetColumnWidth(i, dataLength);
             }
             //首先画好第一行带颜色的,单独写出来,避免写在循环里面
             IRow row = sheet.CreateRow(0);
@@ -93,7 +103,6 @@ namespace UAS_LabelMachine
                 row.Cells[j].CellStyle.Alignment = HorizontalAlignment.CENTER;
                 row.Cells[j].SetCellValue(DataTable.Columns[j].ColumnName);
             }
-
             //将DataTable的值循环赋值给book,Aligment设置居中
             //之前已经画了带颜色的第一行,所以从i=1开始画
             for (int i = 0; i < rowNum; i++)

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

@@ -2515,18 +2515,7 @@ namespace UAS_LabelMachine
             if (result == DialogResult.OK)
             {
                 ExcelHandler eh = new ExcelHandler();
-                DataTable dt = ((DataTable)MidSource.DataSource).Copy();
-                for (int i = 0; i < dt.Columns.Count; i++)
-                {
-                    for (int j = 0; j < LabelInf.Columns.Count; j++)
-                    {
-                        if (dt.Columns[i].ColumnName.ToLower() == LabelInf.Columns[j].DataPropertyName.ToLower())
-                        {
-                            dt.Columns[i].ColumnName = LabelInf.Columns[j].HeaderText;
-                        }
-                    }
-                }
-                eh.ExportExcel(dt, ExportFileDialog.SelectedPath, pi_inoutno.Text);
+                eh.ExportExcel(BaseUtil.GetExportDataTable(LabelInf), ExportFileDialog.SelectedPath, pi_inoutno.Text);
                 string close = MessageBox.Show(this.ParentForm, "导出成功,是否打开文件", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
                 if (close.ToString() == "Yes")
                     System.Diagnostics.Process.Start(ExportFileDialog.SelectedPath + "\\" + pi_inoutno.Text + ".xls");

+ 165 - 194
UAS-出货标签管理/客户标签维护.Designer.cs

@@ -33,8 +33,8 @@ namespace UAS_LabelMachine
         private void InitializeComponent()
         {
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(客户标签维护));
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
             this.cl_code_label = new System.Windows.Forms.Label();
             this.cu_name_label = new System.Windows.Forms.Label();
             this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
@@ -49,7 +49,6 @@ namespace UAS_LabelMachine
             this.cl_custcode_label = new System.Windows.Forms.Label();
             this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.la_code_label = new System.Windows.Forms.Label();
-            this.LabelParam = new System.Windows.Forms.Panel();
             this.NetURL_label = new System.Windows.Forms.Label();
             this.cl_labeltype_label = new System.Windows.Forms.Label();
             this.la_type = new System.Windows.Forms.ComboBox();
@@ -57,6 +56,7 @@ namespace UAS_LabelMachine
             this.la_name_label = new System.Windows.Forms.Label();
             this.FTPShare = new System.Windows.Forms.CheckBox();
             this.CodeSoft = new System.Windows.Forms.RadioButton();
+            this.pictureBox1 = new System.Windows.Forms.PictureBox();
             this.pagination1 = new UAS_LabelMachine.CustomControl.Pagination();
             this.NewLabel = new UAS_LabelMachine.CustomControl.NormalButton();
             this.NetURL = new UAS_LabelMachine.CustomControl.EnterTextBox();
@@ -65,12 +65,6 @@ namespace UAS_LabelMachine
             this.ChooseAll = new UAS_LabelMachine.CustomControl.ChooseAllButton();
             this.PrinterList = new UAS_LabelMachine.CustomControl.PrinterCombox();
             this.LabelDataGridView = new UAS_LabelMachine.CustomControl.DataGridViewWithSerialNum();
-            this.PrintTest = new UAS_LabelMachine.CustomControl.NormalButton();
-            this.客户编号 = new UAS_LabelMachine.CustomControl.SearchTextBox();
-            this.cu_code = new UAS_LabelMachine.CustomControl.SearchTextBox();
-            this.UpdateGrid = new UAS_LabelMachine.CustomControl.NormalButton();
-            this.Screen = new UAS_LabelMachine.CustomControl.NormalButton();
-            this.cu_name = new UAS_LabelMachine.CustomControl.EnterTextBox();
             this.Choose = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.la_id = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.cu_name1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -85,6 +79,13 @@ namespace UAS_LabelMachine
             this.cl_detno = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.cl_labelsoft = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.cl_status = new System.Windows.Forms.DataGridViewTextBoxColumn();
+            this.PrintTest = new UAS_LabelMachine.CustomControl.NormalButton();
+            this.客户编号 = new UAS_LabelMachine.CustomControl.SearchTextBox();
+            this.cu_code = new UAS_LabelMachine.CustomControl.SearchTextBox();
+            this.UpdateGrid = new UAS_LabelMachine.CustomControl.NormalButton();
+            this.Screen = new UAS_LabelMachine.CustomControl.NormalButton();
+            this.cu_name = new UAS_LabelMachine.CustomControl.EnterTextBox();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
             this.SuspendLayout();
             // 
@@ -92,10 +93,9 @@ namespace UAS_LabelMachine
             // 
             this.cl_code_label.AutoSize = true;
             this.cl_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.cl_code_label.Location = new System.Drawing.Point(41, 19);
-            this.cl_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.cl_code_label.Location = new System.Drawing.Point(31, 15);
             this.cl_code_label.Name = "cl_code_label";
-            this.cl_code_label.Size = new System.Drawing.Size(92, 27);
+            this.cl_code_label.Size = new System.Drawing.Size(74, 21);
             this.cl_code_label.TabIndex = 145;
             this.cl_code_label.Text = "客户编号";
             // 
@@ -103,10 +103,9 @@ namespace UAS_LabelMachine
             // 
             this.cu_name_label.AutoSize = true;
             this.cu_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.cu_name_label.Location = new System.Drawing.Point(433, 20);
-            this.cu_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.cu_name_label.Location = new System.Drawing.Point(325, 16);
             this.cu_name_label.Name = "cu_name_label";
-            this.cu_name_label.Size = new System.Drawing.Size(92, 27);
+            this.cu_name_label.Size = new System.Drawing.Size(74, 21);
             this.cu_name_label.TabIndex = 144;
             this.cu_name_label.Text = "客户名称";
             // 
@@ -118,10 +117,9 @@ namespace UAS_LabelMachine
             // 
             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(1225, 111);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(919, 89);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(132, 27);
+            this.label1.Size = new System.Drawing.Size(106, 21);
             this.label1.TabIndex = 164;
             this.label1.Text = "模板参数预览";
             // 
@@ -129,19 +127,17 @@ namespace UAS_LabelMachine
             // 
             this.PrinterList_lable.AutoSize = true;
             this.PrinterList_lable.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.PrinterList_lable.Location = new System.Drawing.Point(1227, 26);
-            this.PrinterList_lable.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.PrinterList_lable.Location = new System.Drawing.Point(920, 21);
             this.PrinterList_lable.Name = "PrinterList_lable";
-            this.PrinterList_lable.Size = new System.Drawing.Size(112, 27);
+            this.PrinterList_lable.Size = new System.Drawing.Size(90, 21);
             this.PrinterList_lable.TabIndex = 175;
             this.PrinterList_lable.Text = "打印机列表";
             // 
             // OpenFolder
             // 
-            this.OpenFolder.Location = new System.Drawing.Point(776, 612);
-            this.OpenFolder.Margin = new System.Windows.Forms.Padding(4);
+            this.OpenFolder.Location = new System.Drawing.Point(562, 490);
             this.OpenFolder.Name = "OpenFolder";
-            this.OpenFolder.Size = new System.Drawing.Size(100, 34);
+            this.OpenFolder.Size = new System.Drawing.Size(75, 27);
             this.OpenFolder.TabIndex = 156;
             this.OpenFolder.Text = "打开";
             this.OpenFolder.UseVisualStyleBackColor = true;
@@ -151,30 +147,27 @@ namespace UAS_LabelMachine
             // 
             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(403, 566);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Location = new System.Drawing.Point(283, 453);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(92, 27);
+            this.label3.Size = new System.Drawing.Size(74, 21);
             this.label3.TabIndex = 171;
             this.label3.Text = "盘标类型";
             // 
             // FolderPath
             // 
             this.FolderPath.Enabled = false;
-            this.FolderPath.Location = new System.Drawing.Point(531, 616);
-            this.FolderPath.Margin = new System.Windows.Forms.Padding(4);
+            this.FolderPath.Location = new System.Drawing.Point(379, 493);
             this.FolderPath.Name = "FolderPath";
-            this.FolderPath.Size = new System.Drawing.Size(213, 25);
+            this.FolderPath.Size = new System.Drawing.Size(161, 21);
             this.FolderPath.TabIndex = 157;
             // 
             // FolderPath_Label
             // 
             this.FolderPath_Label.AutoSize = true;
             this.FolderPath_Label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.FolderPath_Label.Location = new System.Drawing.Point(403, 616);
-            this.FolderPath_Label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.FolderPath_Label.Location = new System.Drawing.Point(283, 493);
             this.FolderPath_Label.Name = "FolderPath_Label";
-            this.FolderPath_Label.Size = new System.Drawing.Size(92, 27);
+            this.FolderPath_Label.Size = new System.Drawing.Size(74, 21);
             this.FolderPath_Label.TabIndex = 158;
             this.FolderPath_Label.Text = "模板路径";
             // 
@@ -187,20 +180,18 @@ namespace UAS_LabelMachine
             "单盘",
             "中盒",
             "外箱"});
-            this.la_type1.Location = new System.Drawing.Point(531, 567);
-            this.la_type1.Margin = new System.Windows.Forms.Padding(4);
+            this.la_type1.Location = new System.Drawing.Point(379, 454);
             this.la_type1.Name = "la_type1";
-            this.la_type1.Size = new System.Drawing.Size(213, 23);
+            this.la_type1.Size = new System.Drawing.Size(161, 20);
             this.la_type1.TabIndex = 169;
             // 
             // cl_custcode_label
             // 
             this.cl_custcode_label.AutoSize = true;
             this.cl_custcode_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.cl_custcode_label.Location = new System.Drawing.Point(27, 562);
-            this.cl_custcode_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.cl_custcode_label.Location = new System.Drawing.Point(20, 450);
             this.cl_custcode_label.Name = "cl_custcode_label";
-            this.cl_custcode_label.Size = new System.Drawing.Size(92, 27);
+            this.cl_custcode_label.Size = new System.Drawing.Size(74, 21);
             this.cl_custcode_label.TabIndex = 167;
             this.cl_custcode_label.Text = "客户编号";
             // 
@@ -214,30 +205,19 @@ namespace UAS_LabelMachine
             // 
             this.la_code_label.AutoSize = true;
             this.la_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.la_code_label.Location = new System.Drawing.Point(777, 566);
-            this.la_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.la_code_label.Location = new System.Drawing.Point(563, 453);
             this.la_code_label.Name = "la_code_label";
-            this.la_code_label.Size = new System.Drawing.Size(92, 27);
+            this.la_code_label.Size = new System.Drawing.Size(74, 21);
             this.la_code_label.TabIndex = 178;
             this.la_code_label.Text = "模板编号";
             // 
-            // LabelParam
-            // 
-            this.LabelParam.AutoScroll = true;
-            this.LabelParam.Location = new System.Drawing.Point(1230, 147);
-            this.LabelParam.Margin = new System.Windows.Forms.Padding(4);
-            this.LabelParam.Name = "LabelParam";
-            this.LabelParam.Size = new System.Drawing.Size(328, 400);
-            this.LabelParam.TabIndex = 180;
-            // 
             // NetURL_label
             // 
             this.NetURL_label.AutoSize = true;
             this.NetURL_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.NetURL_label.Location = new System.Drawing.Point(1248, 61);
-            this.NetURL_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.NetURL_label.Location = new System.Drawing.Point(936, 49);
             this.NetURL_label.Name = "NetURL_label";
-            this.NetURL_label.Size = new System.Drawing.Size(92, 27);
+            this.NetURL_label.Size = new System.Drawing.Size(74, 21);
             this.NetURL_label.TabIndex = 181;
             this.NetURL_label.Text = "网络路径";
             // 
@@ -245,10 +225,9 @@ namespace UAS_LabelMachine
             // 
             this.cl_labeltype_label.AutoSize = true;
             this.cl_labeltype_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.cl_labeltype_label.Location = new System.Drawing.Point(812, 19);
-            this.cl_labeltype_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.cl_labeltype_label.Location = new System.Drawing.Point(609, 15);
             this.cl_labeltype_label.Name = "cl_labeltype_label";
-            this.cl_labeltype_label.Size = new System.Drawing.Size(92, 27);
+            this.cl_labeltype_label.Size = new System.Drawing.Size(74, 21);
             this.cl_labeltype_label.TabIndex = 185;
             this.cl_labeltype_label.Text = "盘标类型";
             // 
@@ -257,10 +236,9 @@ namespace UAS_LabelMachine
             this.la_type.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.la_type.DropDownWidth = 161;
             this.la_type.FormattingEnabled = true;
-            this.la_type.Location = new System.Drawing.Point(940, 20);
-            this.la_type.Margin = new System.Windows.Forms.Padding(4);
+            this.la_type.Location = new System.Drawing.Point(705, 16);
             this.la_type.Name = "la_type";
-            this.la_type.Size = new System.Drawing.Size(213, 23);
+            this.la_type.Size = new System.Drawing.Size(161, 20);
             this.la_type.TabIndex = 184;
             this.la_type.Tag = "cl_labeltype";
             // 
@@ -268,20 +246,18 @@ namespace UAS_LabelMachine
             // 
             this.la_name.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
             | System.Windows.Forms.AnchorStyles.Right)));
-            this.la_name.Location = new System.Drawing.Point(155, 616);
-            this.la_name.Margin = new System.Windows.Forms.Padding(4);
+            this.la_name.Location = new System.Drawing.Point(116, 493);
             this.la_name.Name = "la_name";
-            this.la_name.Size = new System.Drawing.Size(0, 25);
+            this.la_name.Size = new System.Drawing.Size(1, 21);
             this.la_name.TabIndex = 186;
             // 
             // la_name_label
             // 
             this.la_name_label.AutoSize = true;
             this.la_name_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.la_name_label.Location = new System.Drawing.Point(27, 616);
-            this.la_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.la_name_label.Location = new System.Drawing.Point(20, 493);
             this.la_name_label.Name = "la_name_label";
-            this.la_name_label.Size = new System.Drawing.Size(92, 27);
+            this.la_name_label.Size = new System.Drawing.Size(74, 21);
             this.la_name_label.TabIndex = 187;
             this.la_name_label.Text = "模板名称";
             // 
@@ -290,10 +266,9 @@ namespace UAS_LabelMachine
             this.FTPShare.AutoSize = true;
             this.FTPShare.Checked = true;
             this.FTPShare.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.FTPShare.Location = new System.Drawing.Point(905, 621);
-            this.FTPShare.Margin = new System.Windows.Forms.Padding(4);
+            this.FTPShare.Location = new System.Drawing.Point(659, 497);
             this.FTPShare.Name = "FTPShare";
-            this.FTPShare.Size = new System.Drawing.Size(83, 19);
+            this.FTPShare.Size = new System.Drawing.Size(66, 16);
             this.FTPShare.TabIndex = 188;
             this.FTPShare.Text = "FTP共享";
             this.FTPShare.UseVisualStyleBackColor = true;
@@ -303,33 +278,40 @@ namespace UAS_LabelMachine
             this.CodeSoft.AutoSize = true;
             this.CodeSoft.Checked = true;
             this.CodeSoft.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.CodeSoft.Location = new System.Drawing.Point(1410, 107);
-            this.CodeSoft.Margin = new System.Windows.Forms.Padding(4);
+            this.CodeSoft.Location = new System.Drawing.Point(1058, 86);
             this.CodeSoft.Name = "CodeSoft";
-            this.CodeSoft.Size = new System.Drawing.Size(122, 31);
+            this.CodeSoft.Size = new System.Drawing.Size(99, 25);
             this.CodeSoft.TabIndex = 161;
             this.CodeSoft.TabStop = true;
             this.CodeSoft.Text = "CodeSoft";
             this.CodeSoft.UseVisualStyleBackColor = true;
             this.CodeSoft.Visible = false;
             // 
+            // pictureBox1
+            // 
+            this.pictureBox1.Location = new System.Drawing.Point(918, 138);
+            this.pictureBox1.Name = "pictureBox1";
+            this.pictureBox1.Size = new System.Drawing.Size(254, 300);
+            this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+            this.pictureBox1.TabIndex = 191;
+            this.pictureBox1.TabStop = false;
+            // 
             // pagination1
             // 
-            this.pagination1.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
             this.pagination1.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.pagination1.Location = new System.Drawing.Point(0, 683);
-            this.pagination1.Margin = new System.Windows.Forms.Padding(5);
+            this.pagination1.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.pagination1.Location = new System.Drawing.Point(0, 550);
+            this.pagination1.Margin = new System.Windows.Forms.Padding(4);
             this.pagination1.Name = "pagination1";
-            this.pagination1.Size = new System.Drawing.Size(1572, 39);
+            this.pagination1.Size = new System.Drawing.Size(1179, 31);
             this.pagination1.TabIndex = 190;
             // 
             // NewLabel
             // 
             this.NewLabel.Image = ((System.Drawing.Image)(resources.GetObject("NewLabel.Image")));
-            this.NewLabel.Location = new System.Drawing.Point(1128, 613);
-            this.NewLabel.Margin = new System.Windows.Forms.Padding(4);
+            this.NewLabel.Location = new System.Drawing.Point(846, 490);
             this.NewLabel.Name = "NewLabel";
-            this.NewLabel.Size = new System.Drawing.Size(81, 30);
+            this.NewLabel.Size = new System.Drawing.Size(61, 24);
             this.NewLabel.TabIndex = 189;
             this.NewLabel.Tag = "IfWrite";
             this.NewLabel.Text = "新增标签";
@@ -339,10 +321,9 @@ namespace UAS_LabelMachine
             // NetURL
             // 
             this.NetURL.ID = null;
-            this.NetURL.Location = new System.Drawing.Point(1368, 61);
-            this.NetURL.Margin = new System.Windows.Forms.Padding(4);
+            this.NetURL.Location = new System.Drawing.Point(1026, 49);
             this.NetURL.Name = "NetURL";
-            this.NetURL.Size = new System.Drawing.Size(161, 25);
+            this.NetURL.Size = new System.Drawing.Size(122, 21);
             this.NetURL.Str = null;
             this.NetURL.Str1 = null;
             this.NetURL.Str2 = null;
@@ -355,12 +336,11 @@ namespace UAS_LabelMachine
             this.la_code.Caller = null;
             this.la_code.Condition = null;
             this.la_code.FormName = null;
-            this.la_code.Location = new System.Drawing.Point(905, 569);
-            this.la_code.Margin = new System.Windows.Forms.Padding(4);
+            this.la_code.Location = new System.Drawing.Point(659, 455);
             this.la_code.Name = "la_code";
             this.la_code.SelectField = null;
             this.la_code.SetValueField = null;
-            this.la_code.Size = new System.Drawing.Size(215, 26);
+            this.la_code.Size = new System.Drawing.Size(161, 21);
             this.la_code.TabIndex = 179;
             this.la_code.TableName = null;
             this.la_code.Tag = "la_code";
@@ -368,10 +348,9 @@ namespace UAS_LabelMachine
             // Save
             // 
             this.Save.Image = ((System.Drawing.Image)(resources.GetObject("Save.Image")));
-            this.Save.Location = new System.Drawing.Point(1020, 613);
-            this.Save.Margin = new System.Windows.Forms.Padding(4);
+            this.Save.Location = new System.Drawing.Point(759, 491);
             this.Save.Name = "Save";
-            this.Save.Size = new System.Drawing.Size(81, 30);
+            this.Save.Size = new System.Drawing.Size(61, 24);
             this.Save.TabIndex = 170;
             this.Save.Tag = "IfWrite";
             this.Save.Text = "保存";
@@ -380,20 +359,19 @@ namespace UAS_LabelMachine
             // 
             // ChooseAll
             // 
-            this.ChooseAll.Location = new System.Drawing.Point(23, 112);
-            this.ChooseAll.Margin = new System.Windows.Forms.Padding(4);
+            this.ChooseAll.Location = new System.Drawing.Point(19, 92);
             this.ChooseAll.Name = "ChooseAll";
-            this.ChooseAll.Size = new System.Drawing.Size(45, 26);
+            this.ChooseAll.Size = new System.Drawing.Size(40, 21);
             this.ChooseAll.TabIndex = 177;
             this.ChooseAll.Text = "全选";
             this.ChooseAll.UseVisualStyleBackColor = true;
             // 
             // PrinterList
             // 
-            this.PrinterList.Location = new System.Drawing.Point(1368, 27);
-            this.PrinterList.Margin = new System.Windows.Forms.Padding(5);
+            this.PrinterList.Location = new System.Drawing.Point(1026, 22);
+            this.PrinterList.Margin = new System.Windows.Forms.Padding(4);
             this.PrinterList.Name = "PrinterList";
-            this.PrinterList.Size = new System.Drawing.Size(161, 25);
+            this.PrinterList.Size = new System.Drawing.Size(121, 20);
             this.PrinterList.TabIndex = 174;
             // 
             // LabelDataGridView
@@ -416,109 +394,26 @@ namespace UAS_LabelMachine
             this.cl_detno,
             this.cl_labelsoft,
             this.cl_status});
-            this.LabelDataGridView.Location = new System.Drawing.Point(23, 112);
-            this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(4);
+            this.LabelDataGridView.Location = new System.Drawing.Point(17, 90);
             this.LabelDataGridView.Name = "LabelDataGridView";
-            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle1.BackColor = System.Drawing.Color.Blue;
-            dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
-            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.LabelDataGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle1;
-            dataGridViewCellStyle2.BackColor = System.Drawing.Color.White;
-            this.LabelDataGridView.RowsDefaultCellStyle = dataGridViewCellStyle2;
+            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle9.BackColor = System.Drawing.Color.Blue;
+            dataGridViewCellStyle9.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle9.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
+            dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.LabelDataGridView.RowHeadersDefaultCellStyle = dataGridViewCellStyle9;
+            dataGridViewCellStyle10.BackColor = System.Drawing.Color.White;
+            this.LabelDataGridView.RowsDefaultCellStyle = dataGridViewCellStyle10;
             this.LabelDataGridView.RowTemplate.Height = 23;
             this.LabelDataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
-            this.LabelDataGridView.Size = new System.Drawing.Size(1186, 435);
+            this.LabelDataGridView.Size = new System.Drawing.Size(890, 348);
             this.LabelDataGridView.TabIndex = 172;
             this.LabelDataGridView.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.LabelDataGridView_CellContentClick);
             this.LabelDataGridView.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.LabelDataGridView_CellFormatting);
             this.LabelDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.LabelDataGridView_DataError);
             // 
-            // PrintTest
-            // 
-            this.PrintTest.Image = ((System.Drawing.Image)(resources.GetObject("PrintTest.Image")));
-            this.PrintTest.Location = new System.Drawing.Point(1354, 569);
-            this.PrintTest.Margin = new System.Windows.Forms.Padding(4);
-            this.PrintTest.Name = "PrintTest";
-            this.PrintTest.Size = new System.Drawing.Size(81, 30);
-            this.PrintTest.TabIndex = 166;
-            this.PrintTest.Tag = "Print";
-            this.PrintTest.Text = "打印测试";
-            this.PrintTest.UseVisualStyleBackColor = true;
-            this.PrintTest.Click += new System.EventHandler(this.PrintTest_Click);
-            // 
-            // 客户编号
-            // 
-            this.客户编号.Caller = null;
-            this.客户编号.Condition = null;
-            this.客户编号.FormName = null;
-            this.客户编号.Location = new System.Drawing.Point(155, 566);
-            this.客户编号.Margin = new System.Windows.Forms.Padding(4);
-            this.客户编号.Name = "客户编号";
-            this.客户编号.SelectField = null;
-            this.客户编号.SetValueField = null;
-            this.客户编号.Size = new System.Drawing.Size(181, 26);
-            this.客户编号.TabIndex = 168;
-            this.客户编号.TableName = null;
-            this.客户编号.Tag = "cu_code";
-            // 
-            // cu_code
-            // 
-            this.cu_code.Caller = null;
-            this.cu_code.Condition = null;
-            this.cu_code.FormName = null;
-            this.cu_code.Location = new System.Drawing.Point(169, 20);
-            this.cu_code.Margin = new System.Windows.Forms.Padding(4);
-            this.cu_code.Name = "cu_code";
-            this.cu_code.SelectField = null;
-            this.cu_code.SetValueField = null;
-            this.cu_code.Size = new System.Drawing.Size(200, 26);
-            this.cu_code.TabIndex = 159;
-            this.cu_code.TableName = null;
-            this.cu_code.Tag = "cl_custcode";
-            // 
-            // UpdateGrid
-            // 
-            this.UpdateGrid.Image = ((System.Drawing.Image)(resources.GetObject("UpdateGrid.Image")));
-            this.UpdateGrid.Location = new System.Drawing.Point(927, 61);
-            this.UpdateGrid.Margin = new System.Windows.Forms.Padding(4);
-            this.UpdateGrid.Name = "UpdateGrid";
-            this.UpdateGrid.Size = new System.Drawing.Size(81, 30);
-            this.UpdateGrid.TabIndex = 154;
-            this.UpdateGrid.Tag = "IfWrite";
-            this.UpdateGrid.Text = "更新";
-            this.UpdateGrid.UseVisualStyleBackColor = true;
-            this.UpdateGrid.Click += new System.EventHandler(this.Update_Click);
-            // 
-            // Screen
-            // 
-            this.Screen.Image = ((System.Drawing.Image)(resources.GetObject("Screen.Image")));
-            this.Screen.Location = new System.Drawing.Point(776, 61);
-            this.Screen.Margin = new System.Windows.Forms.Padding(4);
-            this.Screen.Name = "Screen";
-            this.Screen.Size = new System.Drawing.Size(81, 30);
-            this.Screen.TabIndex = 153;
-            this.Screen.Tag = "IfRead";
-            this.Screen.Text = "筛选";
-            this.Screen.UseVisualStyleBackColor = true;
-            this.Screen.Click += new System.EventHandler(this.Screen_Click);
-            // 
-            // cu_name
-            // 
-            this.cu_name.ID = null;
-            this.cu_name.Location = new System.Drawing.Point(559, 20);
-            this.cu_name.Margin = new System.Windows.Forms.Padding(4);
-            this.cu_name.Name = "cu_name";
-            this.cu_name.Size = new System.Drawing.Size(199, 25);
-            this.cu_name.Str = null;
-            this.cu_name.Str1 = null;
-            this.cu_name.Str2 = null;
-            this.cu_name.TabIndex = 147;
-            this.cu_name.Tag = "cu_name";
-            // 
             // Choose
             // 
             this.Choose.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
@@ -611,11 +506,88 @@ namespace UAS_LabelMachine
             this.cl_status.Name = "cl_status";
             this.cl_status.ReadOnly = true;
             // 
+            // PrintTest
+            // 
+            this.PrintTest.Image = ((System.Drawing.Image)(resources.GetObject("PrintTest.Image")));
+            this.PrintTest.Location = new System.Drawing.Point(1016, 455);
+            this.PrintTest.Name = "PrintTest";
+            this.PrintTest.Size = new System.Drawing.Size(61, 24);
+            this.PrintTest.TabIndex = 166;
+            this.PrintTest.Tag = "Print";
+            this.PrintTest.Text = "打印测试";
+            this.PrintTest.UseVisualStyleBackColor = true;
+            this.PrintTest.Click += new System.EventHandler(this.PrintTest_Click);
+            // 
+            // 客户编号
+            // 
+            this.客户编号.Caller = null;
+            this.客户编号.Condition = null;
+            this.客户编号.FormName = null;
+            this.客户编号.Location = new System.Drawing.Point(116, 453);
+            this.客户编号.Name = "客户编号";
+            this.客户编号.SelectField = null;
+            this.客户编号.SetValueField = null;
+            this.客户编号.Size = new System.Drawing.Size(136, 21);
+            this.客户编号.TabIndex = 168;
+            this.客户编号.TableName = null;
+            this.客户编号.Tag = "cu_code";
+            // 
+            // cu_code
+            // 
+            this.cu_code.Caller = null;
+            this.cu_code.Condition = null;
+            this.cu_code.FormName = null;
+            this.cu_code.Location = new System.Drawing.Point(127, 16);
+            this.cu_code.Name = "cu_code";
+            this.cu_code.SelectField = null;
+            this.cu_code.SetValueField = null;
+            this.cu_code.Size = new System.Drawing.Size(150, 21);
+            this.cu_code.TabIndex = 159;
+            this.cu_code.TableName = null;
+            this.cu_code.Tag = "cl_custcode";
+            // 
+            // UpdateGrid
+            // 
+            this.UpdateGrid.Image = ((System.Drawing.Image)(resources.GetObject("UpdateGrid.Image")));
+            this.UpdateGrid.Location = new System.Drawing.Point(695, 49);
+            this.UpdateGrid.Name = "UpdateGrid";
+            this.UpdateGrid.Size = new System.Drawing.Size(61, 24);
+            this.UpdateGrid.TabIndex = 154;
+            this.UpdateGrid.Tag = "IfWrite";
+            this.UpdateGrid.Text = "更新";
+            this.UpdateGrid.UseVisualStyleBackColor = true;
+            this.UpdateGrid.Click += new System.EventHandler(this.Update_Click);
+            // 
+            // Screen
+            // 
+            this.Screen.Image = ((System.Drawing.Image)(resources.GetObject("Screen.Image")));
+            this.Screen.Location = new System.Drawing.Point(582, 49);
+            this.Screen.Name = "Screen";
+            this.Screen.Size = new System.Drawing.Size(61, 24);
+            this.Screen.TabIndex = 153;
+            this.Screen.Tag = "IfRead";
+            this.Screen.Text = "筛选";
+            this.Screen.UseVisualStyleBackColor = true;
+            this.Screen.Click += new System.EventHandler(this.Screen_Click);
+            // 
+            // cu_name
+            // 
+            this.cu_name.ID = null;
+            this.cu_name.Location = new System.Drawing.Point(419, 16);
+            this.cu_name.Name = "cu_name";
+            this.cu_name.Size = new System.Drawing.Size(150, 21);
+            this.cu_name.Str = null;
+            this.cu_name.Str1 = null;
+            this.cu_name.Str2 = null;
+            this.cu_name.TabIndex = 147;
+            this.cu_name.Tag = "cu_name";
+            // 
             // 客户标签维护
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1572, 726);
+            this.ClientSize = new System.Drawing.Size(1179, 581);
+            this.Controls.Add(this.pictureBox1);
             this.Controls.Add(this.pagination1);
             this.Controls.Add(this.NewLabel);
             this.Controls.Add(this.FTPShare);
@@ -625,7 +597,6 @@ namespace UAS_LabelMachine
             this.Controls.Add(this.la_type);
             this.Controls.Add(this.NetURL);
             this.Controls.Add(this.NetURL_label);
-            this.Controls.Add(this.LabelParam);
             this.Controls.Add(this.la_code_label);
             this.Controls.Add(this.la_code);
             this.Controls.Add(this.Save);
@@ -649,13 +620,13 @@ namespace UAS_LabelMachine
             this.Controls.Add(this.cu_name);
             this.Controls.Add(this.cl_code_label);
             this.Controls.Add(this.cu_name_label);
-            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "客户标签维护";
             this.Tag = "Make!CustLabel";
             this.Text = "客户标签维护";
             this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.产品标签维护_FormClosing);
             this.Load += new System.EventHandler(this.条码维护_Load);
             this.SizeChanged += new System.EventHandler(this.产品标签维护_SizeChanged);
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
@@ -691,7 +662,6 @@ namespace UAS_LabelMachine
         private ChooseAllButton ChooseAll;
         private Label la_code_label;
         private SearchTextBox la_code;
-        private Panel LabelParam;
         private EnterTextBox NetURL;
         private Label NetURL_label;
 
@@ -717,5 +687,6 @@ namespace UAS_LabelMachine
         private DataGridViewTextBoxColumn cl_detno;
         private DataGridViewTextBoxColumn cl_labelsoft;
         private DataGridViewTextBoxColumn cl_status;
+        private PictureBox pictureBox1;
     }
 }

+ 2 - 53
UAS-出货标签管理/客户标签维护.cs

@@ -123,51 +123,13 @@ namespace UAS_LabelMachine
                 {
                     string LabelName = LabelDataGridView.Rows[e.RowIndex].Cells["cl_labelname"].Value.ToString();
                     doc = lbl.Documents.Open(BaseUtil.GetLabelUrl(LabelPath, LabelName,time));
-                    ParamNum = doc.Variables.FreeVariables.Count;
-                    //去除之前添加的控件
-                    for (int i = 0; i < (ParamName == null ? 0 : ParamName.Length); i++)
-                    {
-                        if (this.Controls["LabelParam"].Controls[ParamName[i] + "_label"] != null)
-                        {
-                            this.Controls["LabelParam"].Controls.Remove(this.Controls["LabelParam"].Controls[ParamName[i] + "_label"]);
-                            this.Controls["LabelParam"].Controls.Remove(this.Controls["LabelParam"].Controls[ParamName[i]]);
-                        }
-                    }
+                    Bitmap bit = new Bitmap(doc.CopyImageToFile());
+                    pictureBox1.Image = bit;
                     //如果文件已不存在则进行提示
                     if (doc == null)
                     {
-                        //LabelParamPreview.SelectionColor = Color.Red;
-                        //LabelParamPreview.AppendText("指定路径已找不到该文件\n");
                         return;
                     }
-                    ParamName = new string[ParamNum];
-                    for (int i = 0; i < ParamNum; i++)
-                    {
-                        ParamName[i] = doc.Variables.FreeVariables.Item(i + 1).Name;
-                    }
-                    int y = 20;
-                    for (int i = 0; i < ParamName.Length; i++)
-                    {
-                        //变量的名称Label
-                        Label Param = new Label();
-                        Param.Text = ParamName[i];
-                        Param.Name = ParamName[i] + "_label";
-                        Param.AutoSize = true;
-                        Param.Anchor = AnchorStyles.Left;
-                        Param.Anchor = AnchorStyles.Top;
-                        Param.Location = new Point(20, y + 5);
-                        this.Controls["LabelParam"].Controls.Add(Param);
-                        //维护变量的打印测试参数
-                        EnterTextBox TempParam = new EnterTextBox();
-                        TempParam.Anchor = AnchorStyles.Left;
-                        TempParam.Anchor = AnchorStyles.Top;
-                        TempParam.Name = ParamName[i];
-                        TempParam.Location = new Point(100, y);
-                        y = y + 30;
-                        TempParam.Size = new Size(170, 22);
-                        this.Controls["LabelParam"].Controls.Add(TempParam);
-                        y = y + 30;
-                    }
                 }
             }
             if (LabelDataGridView.Columns[e.ColumnIndex].HeaderText == "编辑")
@@ -322,19 +284,6 @@ namespace UAS_LabelMachine
         {
             if (LabelCode != "")
             {
-                for (int j = 0; j < doc.Variables.FreeVariables.Count; j++)
-                {
-                    //将维护的模板参数和模板本身的参数名称进行比对
-                    for (int k = 0; k < ParamName.Length; k++)
-                    {
-                        //名称相等的时候,取SQL进行值的查询
-                        if (doc.Variables.FreeVariables.Item(j + 1).Name == ParamName[k])
-                        {
-                            doc.Variables.FreeVariables.Item(j + 1).Value = Controls["LabelParam"].Controls[ParamName[k]].Text;
-                        }
-                    }
-                }
-                //保存参数打印
                 doc.Printer.SwitchTo(PrinterList.Text);
                 doc.PrintDocument();
             }