Browse Source

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

章政 8 years ago
parent
commit
8c49223301

+ 17 - 13
UAS-MES/FunctionCode/Make/Make_Decompose.cs

@@ -208,6 +208,7 @@ namespace UAS_MES.Make
                     sql.Append( dt.Rows[i]["mb_bgcode"].ToString()+" : "+dt.Rows[i]["mb_badcode"].ToString()+"  ");
                     bgcode[i] = dt.Rows[i]["mb_bgcode"].ToString();
                     bccode[i] = dt.Rows[i]["mb_badcode"].ToString();
+                    id[i] = dh.GetSEQ("MakeBad_seq");
                 }            
                 for (int i = 0; i < LabelDataGridView.Rows.Count; i++)
                 {
@@ -255,16 +256,11 @@ namespace UAS_MES.Make
                             string sp_barcoderule = dtbar.Rows[0]["sp_barcoderule"].ToString();
                             if (!LogicHandler.CheckSNBeforeLoad(LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString(), sp_soncode, sp_barcoderule, sp_prefix, length, out ErrorMessage))
                             {
-                                OperateResult.AppendText(">>物料" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value+" "+ErrorMessage + "\n", Color.Red);
+                                OperateResult.AppendText(">>物料" + LabelDataGridView.Rows[i].Cells["New_BarCode"].Value.ToString() + " "+ErrorMessage + "\n", Color.Red);
                                 LoadData(sncode_1, sender, new KeyEventArgs(Keys.Enter));
                                 return;
                             }
-                            sql.Clear();
-                            sql.Append("update craftmaterial set cm_status=-1,cm_dropman='" + User.UserName + "',");
-                            sql.Append("cm_dropdate =sysdate,cm_dropstep='" + User.CurrentStepName + "',");
-                            sql.Append("cm_dropsccode='" + User.CurrentStepCode + "' where cm_id='" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "'");
-                            dh.ExecuteSql(sql.GetString(), "update");
-                            //MakeBad表插入物料批号不良信息
+                       
 
                             //获取物料生产类型属性
                             sql.Clear();
@@ -274,16 +270,16 @@ namespace UAS_MES.Make
                             //制造件
                             if (pr_manutype == "MAKE")
                             {
-                                //MakeBad表插入物料批号不良信息
+                                string makecode = (String)dh.getFieldDataByCondition("makeserial", "ms_makecode", "ms_sncode = '" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "' and ms_prodcode = '" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
+                                ////MakeBad表插入物料批号不良信息
                                 sql.Clear();
-                                sql.Append("insert into makebad (mb_id, mb_inman,mb_indate,mb_stepcode,mb_sourcecode,");
-                                sql.Append("mb_bgcode,mb_mscode,mb_sncode, mb_badcode, mb_makecode)");
+                                sql.Append(" insert into makebad (mb_id, mb_inman,mb_indate,mb_stepcode,mb_sourcecode, mb_bgcode,mb_mscode,mb_sncode, mb_badcode, mb_makecode)");
                                 sql.Append("values (MakeBad_seq.nextval,'" + User.UserName + "',sysdate,'" + User.CurrentStepCode + "','" + User.UserSourceCode + "',:bg_code ,'" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "','" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "',");
-                                sql.Append(":bc_code,'" + ms_makecode.Text + "')");
+                                sql.Append(":bc_code,'" + makecode + "')");
                                 dh.BatchInsert(sql.GetString(), new string[] { "bg_code", "bc_code" }, bgcode, bccode);
-                                //更新子件序列号为待维修
+                                //更新子件序列号为待维修                               
                                 sql.Clear();
-                                sql.Append("update makeserial set ms_status=3 where ms_sncode='" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "' and ms_prodcode='" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
+                                sql.Append("update makeserial set ms_status=3 ,ms_badtimes = ms_badtimes+1 where ms_sncode='" + LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "' and ms_prodcode='" + LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "'");
                                 dh.ExecuteSql(sql.GetString(), "update");
                             }
                             //采购件,则将不良信息插入不良零件表中MAKEBADRSPART
@@ -293,6 +289,14 @@ namespace UAS_MES.Make
                                 sql.Append("(MAKEBADRSPART_seq.nextval, sysdate, '"+User.UserCode+"','"+ LabelDataGridView.Rows[i].Cells["cm_barcode"].Value + "',:bc_code,'"+ LabelDataGridView.Rows[i].Cells["cm_soncode"].Value + "','"+ms_makecode.Text+"','"+User.UserSourceCode+"')");
                                 dh.BatchInsert(sql.GetString(), new string[] {"bc_code"},bccode);
                             }
+
+                            sql.Clear();
+                            sql.Append("update craftmaterial set cm_status=-1,cm_dropman='" + User.UserName + "',");
+                            sql.Append("cm_dropdate =sysdate,cm_dropstep='" + User.CurrentStepName + "',");
+                            sql.Append("cm_dropsccode='" + User.CurrentStepCode + "' where cm_id='" + LabelDataGridView.Rows[i].Cells["cm_id"].Value + "'");
+                            dh.ExecuteSql(sql.GetString(), "update");
+                            //MakeBad表插入物料批号不良信息
+
                             //将新批号绑定到序列号中
                             dt = (DataTable)dh.ExecuteSql("select sp_id from stepproduct where sp_mothercode='" + ms_prodcode.Text + "'", "select");
                             string sp_id = dt.Rows[0]["sp_id"].ToString();

+ 117 - 147
UAS-MES/FunctionCode/SystemSetting/SystemSetting_LabelMaintain.Designer.cs

@@ -37,7 +37,6 @@
             this.CodeSoft = new System.Windows.Forms.RadioButton();
             this.labelSoft_label = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
-            this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.la_name = new System.Windows.Forms.TextBox();
             this.la_name_label = new System.Windows.Forms.Label();
             this.FTPShare = new System.Windows.Forms.CheckBox();
@@ -48,6 +47,10 @@
             this.la_code_label = new System.Windows.Forms.Label();
             this.LabelParam = new System.Windows.Forms.Panel();
             this.label2 = new System.Windows.Forms.Label();
+            this.OpernSaveFolder = new System.Windows.Forms.Button();
+            this.SavePath = new System.Windows.Forms.TextBox();
+            this.SavePath_label = new System.Windows.Forms.Label();
+            this.Delete = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.pagination1 = new UAS_MES.CustomControl.Pagination.PaginationDbFind();
             this.pr_code2 = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.Save = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
@@ -74,10 +77,7 @@
             this.Screen = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
             this.pr_spec = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
             this.pr_detail = new UAS_MES.CustomControl.TextBoxWithIcon.EnterTextBox();
-            this.Delete = new UAS_MES.CustomControl.ButtonUtil.NormalButton();
-            this.OpernSaveFolder = new System.Windows.Forms.Button();
-            this.SavePath = new System.Windows.Forms.TextBox();
-            this.SavePath_label = new System.Windows.Forms.Label();
+            this.dataGridViewCheckBoxColumn1 = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.LabelDataGridView)).BeginInit();
             this.SuspendLayout();
             // 
@@ -85,10 +85,9 @@
             // 
             this.pr_code_label.AutoSize = true;
             this.pr_code_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_code_label.Location = new System.Drawing.Point(28, 15);
-            this.pr_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_code_label.Location = new System.Drawing.Point(21, 12);
             this.pr_code_label.Name = "pr_code_label";
-            this.pr_code_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_code_label.Size = new System.Drawing.Size(74, 21);
             this.pr_code_label.TabIndex = 145;
             this.pr_code_label.Text = "产品编号";
             // 
@@ -96,10 +95,9 @@
             // 
             this.pr_detail_label.AutoSize = true;
             this.pr_detail_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_detail_label.Location = new System.Drawing.Point(387, 15);
-            this.pr_detail_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_detail_label.Location = new System.Drawing.Point(290, 12);
             this.pr_detail_label.Name = "pr_detail_label";
-            this.pr_detail_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_detail_label.Size = new System.Drawing.Size(74, 21);
             this.pr_detail_label.TabIndex = 144;
             this.pr_detail_label.Text = "产品名称";
             // 
@@ -107,10 +105,9 @@
             // 
             this.pr_spec_label.AutoSize = true;
             this.pr_spec_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.pr_spec_label.Location = new System.Drawing.Point(781, 14);
-            this.pr_spec_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.pr_spec_label.Location = new System.Drawing.Point(586, 11);
             this.pr_spec_label.Name = "pr_spec_label";
-            this.pr_spec_label.Size = new System.Drawing.Size(92, 27);
+            this.pr_spec_label.Size = new System.Drawing.Size(74, 21);
             this.pr_spec_label.TabIndex = 150;
             this.pr_spec_label.Text = "产品规格";
             // 
@@ -123,10 +120,9 @@
             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(1291, 15);
-            this.CodeSoft.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.CodeSoft.Location = new System.Drawing.Point(968, 12);
             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";
@@ -136,10 +132,9 @@
             // 
             this.labelSoft_label.AutoSize = true;
             this.labelSoft_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.labelSoft_label.Location = new System.Drawing.Point(1165, 15);
-            this.labelSoft_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.labelSoft_label.Location = new System.Drawing.Point(874, 12);
             this.labelSoft_label.Name = "labelSoft_label";
-            this.labelSoft_label.Size = new System.Drawing.Size(92, 27);
+            this.labelSoft_label.Size = new System.Drawing.Size(74, 21);
             this.labelSoft_label.TabIndex = 163;
             this.labelSoft_label.Text = "模板软件";
             // 
@@ -147,36 +142,27 @@
             // 
             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(1119, 112);
-            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Location = new System.Drawing.Point(839, 90);
             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 = "模板参数预览";
             // 
-            // dataGridViewCheckBoxColumn1
-            // 
-            this.dataGridViewCheckBoxColumn1.HeaderText = "";
-            this.dataGridViewCheckBoxColumn1.Name = "dataGridViewCheckBoxColumn1";
-            this.dataGridViewCheckBoxColumn1.Width = 30;
-            // 
             // la_name
             // 
             this.la_name.Enabled = false;
-            this.la_name.Location = new System.Drawing.Point(127, 650);
-            this.la_name.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.la_name.Location = new System.Drawing.Point(95, 520);
             this.la_name.Name = "la_name";
-            this.la_name.Size = new System.Drawing.Size(213, 25);
+            this.la_name.Size = new System.Drawing.Size(161, 21);
             this.la_name.TabIndex = 201;
             // 
             // 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(19, 650);
-            this.la_name_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.la_name_label.Location = new System.Drawing.Point(14, 520);
             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 = 202;
             this.la_name_label.Text = "模板名称";
             // 
@@ -185,20 +171,18 @@
             this.FTPShare.AutoSize = true;
             this.FTPShare.Checked = true;
             this.FTPShare.CheckState = System.Windows.Forms.CheckState.Checked;
-            this.FTPShare.Location = new System.Drawing.Point(1067, 602);
-            this.FTPShare.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.FTPShare.Location = new System.Drawing.Point(800, 482);
             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 = 200;
             this.FTPShare.Text = "FTP共享";
             this.FTPShare.UseVisualStyleBackColor = true;
             // 
             // OpenFolder
             // 
-            this.OpenFolder.Location = new System.Drawing.Point(639, 650);
-            this.OpenFolder.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.OpenFolder.Location = new System.Drawing.Point(479, 520);
             this.OpenFolder.Name = "OpenFolder";
-            this.OpenFolder.Size = new System.Drawing.Size(50, 28);
+            this.OpenFolder.Size = new System.Drawing.Size(38, 22);
             this.OpenFolder.TabIndex = 192;
             this.OpenFolder.Text = "浏览";
             this.OpenFolder.UseVisualStyleBackColor = true;
@@ -208,30 +192,27 @@
             // 
             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(370, 598);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Location = new System.Drawing.Point(278, 478);
             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 = 199;
             this.label3.Text = "模板类型";
             // 
             // FolderPath
             // 
             this.FolderPath.Enabled = false;
-            this.FolderPath.Location = new System.Drawing.Point(476, 650);
-            this.FolderPath.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.FolderPath.Location = new System.Drawing.Point(357, 520);
             this.FolderPath.Name = "FolderPath";
-            this.FolderPath.Size = new System.Drawing.Size(155, 25);
+            this.FolderPath.Size = new System.Drawing.Size(117, 21);
             this.FolderPath.TabIndex = 193;
             // 
             // 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(370, 650);
-            this.FolderPath_Label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.FolderPath_Label.Location = new System.Drawing.Point(278, 520);
             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 = 194;
             this.FolderPath_Label.Text = "模板路径";
             // 
@@ -239,10 +220,9 @@
             // 
             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(16, 598);
-            this.la_code_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.la_code_label.Location = new System.Drawing.Point(12, 478);
             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 = 195;
             this.la_code_label.Text = "模板编号";
             // 
@@ -250,32 +230,77 @@
             // 
             this.LabelParam.AutoScroll = true;
             this.LabelParam.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-            this.LabelParam.Location = new System.Drawing.Point(1116, 152);
-            this.LabelParam.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.LabelParam.Location = new System.Drawing.Point(837, 122);
             this.LabelParam.Name = "LabelParam";
-            this.LabelParam.Size = new System.Drawing.Size(343, 432);
+            this.LabelParam.Size = new System.Drawing.Size(258, 346);
             this.LabelParam.TabIndex = 203;
             // 
             // 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(717, 598);
-            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Location = new System.Drawing.Point(538, 478);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(92, 27);
+            this.label2.Size = new System.Drawing.Size(74, 21);
             this.label2.TabIndex = 205;
             this.label2.Text = "产品编号";
             // 
+            // OpernSaveFolder
+            // 
+            this.OpernSaveFolder.Location = new System.Drawing.Point(737, 521);
+            this.OpernSaveFolder.Name = "OpernSaveFolder";
+            this.OpernSaveFolder.Size = new System.Drawing.Size(38, 22);
+            this.OpernSaveFolder.TabIndex = 209;
+            this.OpernSaveFolder.Text = "浏览";
+            this.OpernSaveFolder.UseVisualStyleBackColor = true;
+            this.OpernSaveFolder.Click += new System.EventHandler(this.OpernSaveFolder_Click);
+            // 
+            // SavePath
+            // 
+            this.SavePath.Enabled = false;
+            this.SavePath.Location = new System.Drawing.Point(615, 521);
+            this.SavePath.Name = "SavePath";
+            this.SavePath.Size = new System.Drawing.Size(117, 21);
+            this.SavePath.TabIndex = 210;
+            // 
+            // SavePath_label
+            // 
+            this.SavePath_label.AutoSize = true;
+            this.SavePath_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.SavePath_label.Location = new System.Drawing.Point(535, 521);
+            this.SavePath_label.Name = "SavePath_label";
+            this.SavePath_label.Size = new System.Drawing.Size(74, 21);
+            this.SavePath_label.TabIndex = 211;
+            this.SavePath_label.Text = "存放路径";
+            // 
+            // Delete
+            // 
+            this.Delete.AllPower = "ifall";
+            this.Delete.BackColor = System.Drawing.Color.Transparent;
+            this.Delete.DownImage = ((System.Drawing.Image)(resources.GetObject("Delete.DownImage")));
+            this.Delete.Image = ((System.Drawing.Image)(resources.GetObject("Delete.Image")));
+            this.Delete.IsShowBorder = true;
+            this.Delete.Location = new System.Drawing.Point(643, 55);
+            this.Delete.MoveImage = ((System.Drawing.Image)(resources.GetObject("Delete.MoveImage")));
+            this.Delete.Name = "Delete";
+            this.Delete.NormalImage = ((System.Drawing.Image)(resources.GetObject("Delete.NormalImage")));
+            this.Delete.Power = "IfWrite";
+            this.Delete.Size = new System.Drawing.Size(63, 24);
+            this.Delete.TabIndex = 208;
+            this.Delete.Tag = "Ifdelete";
+            this.Delete.Text = "删除";
+            this.Delete.UseVisualStyleBackColor = true;
+            this.Delete.Click += new System.EventHandler(this.Delete_Click);
+            // 
             // pagination1
             // 
             this.pagination1.AddEnable = false;
             this.pagination1.Cursor = System.Windows.Forms.Cursors.Hand;
             this.pagination1.DeleteEnable = false;
-            this.pagination1.Location = new System.Drawing.Point(0, 690);
-            this.pagination1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5);
+            this.pagination1.Location = new System.Drawing.Point(0, 552);
+            this.pagination1.Margin = new System.Windows.Forms.Padding(4);
             this.pagination1.Name = "pagination1";
-            this.pagination1.Size = new System.Drawing.Size(1469, 40);
+            this.pagination1.Size = new System.Drawing.Size(1102, 32);
             this.pagination1.TabIndex = 207;
             // 
             // pr_code2
@@ -283,11 +308,10 @@
             this.pr_code2.AllPower = null;
             this.pr_code2.BackColor = System.Drawing.Color.White;
             this.pr_code2.ID = null;
-            this.pr_code2.Location = new System.Drawing.Point(137, 18);
-            this.pr_code2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pr_code2.Location = new System.Drawing.Point(103, 14);
             this.pr_code2.Name = "pr_code2";
             this.pr_code2.Power = null;
-            this.pr_code2.Size = new System.Drawing.Size(199, 25);
+            this.pr_code2.Size = new System.Drawing.Size(150, 21);
             this.pr_code2.Str = null;
             this.pr_code2.Str1 = null;
             this.pr_code2.Str2 = null;
@@ -301,13 +325,12 @@
             this.Save.DownImage = ((System.Drawing.Image)(resources.GetObject("Save.DownImage")));
             this.Save.Image = ((System.Drawing.Image)(resources.GetObject("Save.Image")));
             this.Save.IsShowBorder = true;
-            this.Save.Location = new System.Drawing.Point(1067, 646);
-            this.Save.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Save.Location = new System.Drawing.Point(795, 520);
             this.Save.MoveImage = ((System.Drawing.Image)(resources.GetObject("Save.MoveImage")));
             this.Save.Name = "Save";
             this.Save.NormalImage = ((System.Drawing.Image)(resources.GetObject("Save.NormalImage")));
             this.Save.Power = "IfWrite";
-            this.Save.Size = new System.Drawing.Size(80, 30);
+            this.Save.Size = new System.Drawing.Size(60, 24);
             this.Save.TabIndex = 198;
             this.Save.Tag = "IfWrite";
             this.Save.Text = "保存";
@@ -324,11 +347,11 @@
             "彩盒标",
             "卡通箱标",
             "大箱标",
-            "栈板标"});
-            this.la_type.Location = new System.Drawing.Point(476, 598);
-            this.la_type.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            "栈板标",
+            "自定义"});
+            this.la_type.Location = new System.Drawing.Point(357, 478);
             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 = 197;
             // 
             // la_code
@@ -338,14 +361,13 @@
             this.la_code.Condition = null;
             this.la_code.DBTitle = "模板查询";
             this.la_code.FormName = null;
-            this.la_code.Location = new System.Drawing.Point(127, 598);
-            this.la_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.la_code.Location = new System.Drawing.Point(95, 478);
             this.la_code.Name = "la_code";
             this.la_code.Power = null;
             this.la_code.ReturnData = null;
             this.la_code.SelectField = null;
             this.la_code.SetValueField = null;
-            this.la_code.Size = new System.Drawing.Size(213, 26);
+            this.la_code.Size = new System.Drawing.Size(160, 21);
             this.la_code.TabIndex = 196;
             this.la_code.TableName = null;
             this.la_code.Tag = "IfRead";
@@ -353,10 +375,9 @@
             // 
             // ChooseAll
             // 
-            this.ChooseAll.Location = new System.Drawing.Point(21, 94);
-            this.ChooseAll.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.ChooseAll.Location = new System.Drawing.Point(16, 75);
             this.ChooseAll.Name = "ChooseAll";
-            this.ChooseAll.Size = new System.Drawing.Size(51, 25);
+            this.ChooseAll.Size = new System.Drawing.Size(38, 20);
             this.ChooseAll.TabIndex = 174;
             this.ChooseAll.Text = "全选";
             this.ChooseAll.UseVisualStyleBackColor = true;
@@ -381,11 +402,10 @@
             this.pl_labelurl,
             this.pl_id,
             this.pl_prodcode});
-            this.LabelDataGridView.Location = new System.Drawing.Point(21, 126);
-            this.LabelDataGridView.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.LabelDataGridView.Location = new System.Drawing.Point(16, 101);
             this.LabelDataGridView.Name = "LabelDataGridView";
             this.LabelDataGridView.RowTemplate.Height = 23;
-            this.LabelDataGridView.Size = new System.Drawing.Size(1077, 458);
+            this.LabelDataGridView.Size = new System.Drawing.Size(808, 366);
             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);
@@ -507,14 +527,13 @@
             this.pr_code.Condition = null;
             this.pr_code.DBTitle = "产品编号查询";
             this.pr_code.FormName = null;
-            this.pr_code.Location = new System.Drawing.Point(826, 598);
-            this.pr_code.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pr_code.Location = new System.Drawing.Point(620, 478);
             this.pr_code.Name = "pr_code";
             this.pr_code.Power = null;
             this.pr_code.ReturnData = null;
             this.pr_code.SelectField = null;
             this.pr_code.SetValueField = null;
-            this.pr_code.Size = new System.Drawing.Size(213, 26);
+            this.pr_code.Size = new System.Drawing.Size(160, 21);
             this.pr_code.TabIndex = 159;
             this.pr_code.TableName = null;
             this.pr_code.Tag = "pr_code";
@@ -527,13 +546,12 @@
             this.UpdateGrid.DownImage = ((System.Drawing.Image)(resources.GetObject("UpdateGrid.DownImage")));
             this.UpdateGrid.Image = ((System.Drawing.Image)(resources.GetObject("UpdateGrid.Image")));
             this.UpdateGrid.IsShowBorder = true;
-            this.UpdateGrid.Location = new System.Drawing.Point(728, 69);
-            this.UpdateGrid.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.UpdateGrid.Location = new System.Drawing.Point(546, 55);
             this.UpdateGrid.MoveImage = ((System.Drawing.Image)(resources.GetObject("UpdateGrid.MoveImage")));
             this.UpdateGrid.Name = "UpdateGrid";
             this.UpdateGrid.NormalImage = ((System.Drawing.Image)(resources.GetObject("UpdateGrid.NormalImage")));
             this.UpdateGrid.Power = "IfWrite";
-            this.UpdateGrid.Size = new System.Drawing.Size(84, 30);
+            this.UpdateGrid.Size = new System.Drawing.Size(63, 24);
             this.UpdateGrid.TabIndex = 154;
             this.UpdateGrid.Tag = "IfWrite";
             this.UpdateGrid.Text = "更新";
@@ -547,13 +565,12 @@
             this.Screen.DownImage = ((System.Drawing.Image)(resources.GetObject("Screen.DownImage")));
             this.Screen.Image = ((System.Drawing.Image)(resources.GetObject("Screen.Image")));
             this.Screen.IsShowBorder = true;
-            this.Screen.Location = new System.Drawing.Point(596, 69);
-            this.Screen.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.Screen.Location = new System.Drawing.Point(447, 55);
             this.Screen.MoveImage = ((System.Drawing.Image)(resources.GetObject("Screen.MoveImage")));
             this.Screen.Name = "Screen";
             this.Screen.NormalImage = ((System.Drawing.Image)(resources.GetObject("Screen.NormalImage")));
             this.Screen.Power = "IfRead";
-            this.Screen.Size = new System.Drawing.Size(84, 30);
+            this.Screen.Size = new System.Drawing.Size(63, 24);
             this.Screen.TabIndex = 153;
             this.Screen.Tag = "IfRead";
             this.Screen.Text = "筛选";
@@ -565,11 +582,10 @@
             this.pr_spec.AllPower = null;
             this.pr_spec.BackColor = System.Drawing.Color.White;
             this.pr_spec.ID = null;
-            this.pr_spec.Location = new System.Drawing.Point(900, 15);
-            this.pr_spec.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pr_spec.Location = new System.Drawing.Point(675, 12);
             this.pr_spec.Name = "pr_spec";
             this.pr_spec.Power = null;
-            this.pr_spec.Size = new System.Drawing.Size(199, 25);
+            this.pr_spec.Size = new System.Drawing.Size(150, 21);
             this.pr_spec.Str = null;
             this.pr_spec.Str1 = null;
             this.pr_spec.Str2 = null;
@@ -581,72 +597,27 @@
             this.pr_detail.AllPower = null;
             this.pr_detail.BackColor = System.Drawing.Color.White;
             this.pr_detail.ID = null;
-            this.pr_detail.Location = new System.Drawing.Point(497, 16);
-            this.pr_detail.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.pr_detail.Location = new System.Drawing.Point(373, 13);
             this.pr_detail.Name = "pr_detail";
             this.pr_detail.Power = null;
-            this.pr_detail.Size = new System.Drawing.Size(199, 25);
+            this.pr_detail.Size = new System.Drawing.Size(150, 21);
             this.pr_detail.Str = null;
             this.pr_detail.Str1 = null;
             this.pr_detail.Str2 = null;
             this.pr_detail.TabIndex = 147;
             this.pr_detail.Tag = "pr_detail";
             // 
-            // Delete
-            // 
-            this.Delete.AllPower = "ifall";
-            this.Delete.BackColor = System.Drawing.Color.Transparent;
-            this.Delete.DownImage = ((System.Drawing.Image)(resources.GetObject("Delete.DownImage")));
-            this.Delete.Image = ((System.Drawing.Image)(resources.GetObject("Delete.Image")));
-            this.Delete.IsShowBorder = true;
-            this.Delete.Location = new System.Drawing.Point(857, 69);
-            this.Delete.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
-            this.Delete.MoveImage = ((System.Drawing.Image)(resources.GetObject("Delete.MoveImage")));
-            this.Delete.Name = "Delete";
-            this.Delete.NormalImage = ((System.Drawing.Image)(resources.GetObject("Delete.NormalImage")));
-            this.Delete.Power = "IfWrite";
-            this.Delete.Size = new System.Drawing.Size(84, 30);
-            this.Delete.TabIndex = 208;
-            this.Delete.Tag = "Ifdelete";
-            this.Delete.Text = "删除";
-            this.Delete.UseVisualStyleBackColor = true;
-            this.Delete.Click += new System.EventHandler(this.Delete_Click);
-            // 
-            // OpernSaveFolder
-            // 
-            this.OpernSaveFolder.Location = new System.Drawing.Point(989, 648);
-            this.OpernSaveFolder.Margin = new System.Windows.Forms.Padding(4);
-            this.OpernSaveFolder.Name = "OpernSaveFolder";
-            this.OpernSaveFolder.Size = new System.Drawing.Size(50, 28);
-            this.OpernSaveFolder.TabIndex = 209;
-            this.OpernSaveFolder.Text = "浏览";
-            this.OpernSaveFolder.UseVisualStyleBackColor = true;
-            // 
-            // SavePath
-            // 
-            this.SavePath.Enabled = false;
-            this.SavePath.Location = new System.Drawing.Point(826, 648);
-            this.SavePath.Margin = new System.Windows.Forms.Padding(4);
-            this.SavePath.Name = "SavePath";
-            this.SavePath.Size = new System.Drawing.Size(155, 25);
-            this.SavePath.TabIndex = 210;
-            // 
-            // SavePath_label
+            // dataGridViewCheckBoxColumn1
             // 
-            this.SavePath_label.AutoSize = true;
-            this.SavePath_label.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.SavePath_label.Location = new System.Drawing.Point(720, 648);
-            this.SavePath_label.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.SavePath_label.Name = "SavePath_label";
-            this.SavePath_label.Size = new System.Drawing.Size(92, 27);
-            this.SavePath_label.TabIndex = 211;
-            this.SavePath_label.Text = "存放路径";
+            this.dataGridViewCheckBoxColumn1.HeaderText = "";
+            this.dataGridViewCheckBoxColumn1.Name = "dataGridViewCheckBoxColumn1";
+            this.dataGridViewCheckBoxColumn1.Width = 30;
             // 
             // SystemSetting_LabelMaintain
             // 
-            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(1467, 730);
+            this.ClientSize = new System.Drawing.Size(1100, 584);
             this.Controls.Add(this.OpernSaveFolder);
             this.Controls.Add(this.SavePath);
             this.Controls.Add(this.SavePath_label);
@@ -680,7 +651,6 @@
             this.Controls.Add(this.pr_code_label);
             this.Controls.Add(this.pr_detail_label);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
-            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.Name = "SystemSetting_LabelMaintain";
             this.Tag = "Make!ProLabel";
             this.Text = "产品标签维护";

+ 20 - 3
UAS-MES/FunctionCode/SystemSetting/SystemSetting_LabelMaintain.cs

@@ -19,7 +19,7 @@ namespace UAS_MES.SystemSetting
         DataHelper dh;
         DataTable dt;
         //设置Grid中Combox的静态数据,这个格式是必须的,#前面是展示值,#后面是实际值
-        string[] labeltype = { "机身标#机身标", "彩盒标#彩盒标", "卡通箱标#卡通箱标", "大箱标#大箱标", "栈板标#栈板标" };
+        string[] labeltype = { "机身标#机身标", "彩盒标#彩盒标", "卡通箱标#卡通箱标", "大箱标#大箱标", "栈板标#栈板标","自定义#自定义"};
         string[] defaultype = { "是#1", "否#0" };
         Dictionary<string, string> dic = new Dictionary<string, string>();
         //用于拼接条件查询
@@ -448,7 +448,7 @@ namespace UAS_MES.SystemSetting
                 {
                     string SoftWare = "CodeSoft";
                     ftpOperater ftp = new ftpOperater();
-                    ftp.UpLoadFile(FolderPath.Text, la_name.Text);
+                    ftp.UpLoadFile(FolderPath.Text, la_name.Text,SavePath.Text);
                     if (pl_id2 != "")
                     {
                         if (!isSameLabel(pr_code.Text, la_type.Text, la_name.Text,la_code.Text)&&(((isdefault(pr_code.Text, la_type.Text)==1)&& (pl_default == "1")||(pr_code.Text ==pr_code_1 && la_type.Text == la_type_1))|| (pl_default == "0")))
@@ -536,12 +536,29 @@ namespace UAS_MES.SystemSetting
                     dt = (DataTable)dh.ExecuteSql(sql.GetString(), "select");
                     if (dt.Rows.Count == 0)
                     {
-                        ftp.Delete(deletelabname[i]);
+                        try
+                        {
+                            ftp.Delete(deletelabname[i]);
+                        }
+                        catch{
+                            
+                        }
                     }
                 }
             }
             sql.Clear();
             LoadData();
         }
+
+        private void OpernSaveFolder_Click(object sender, EventArgs e)
+        {
+            FolderBrowserDialog folder = new FolderBrowserDialog();
+            folder.Description = "选择文件夹";
+            DialogResult result = folder.ShowDialog();
+            if (result == DialogResult.OK)
+            {
+                SavePath.Text = folder.SelectedPath;
+            }
+        }
     }
 }

+ 16 - 16
UAS-MES/FunctionCode/SystemSetting/SystemSetting_LabelMaintain.resx

@@ -124,7 +124,7 @@
     <value>173, 22</value>
   </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  <data name="Save.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Delete.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -136,7 +136,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Save.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Delete.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
         DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -229,7 +229,7 @@
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
 </value>
   </data>
-  <data name="Save.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Delete.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -242,7 +242,7 @@
         gg==
 </value>
   </data>
-  <data name="Save.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Delete.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -255,7 +255,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="UpdateGrid.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Save.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -267,7 +267,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="UpdateGrid.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Save.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
         DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -360,7 +360,7 @@
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
 </value>
   </data>
-  <data name="UpdateGrid.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Save.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -373,7 +373,7 @@
         gg==
 </value>
   </data>
-  <data name="UpdateGrid.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Save.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -386,7 +386,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Screen.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="UpdateGrid.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -398,7 +398,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Screen.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="UpdateGrid.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
         DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -491,7 +491,7 @@
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
 </value>
   </data>
-  <data name="Screen.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="UpdateGrid.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -504,7 +504,7 @@
         gg==
 </value>
   </data>
-  <data name="Screen.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="UpdateGrid.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE
@@ -517,7 +517,7 @@
         ROJSU3qXjMKwG/vjzEz/skOI3Zqgv7AAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Delete.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Screen.DownImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFcSURBVFhH5di7UsJAFMbxtDT6QMI76IAFT0npIE0K
@@ -529,7 +529,7 @@
         oPrhusndcPinpIXd2N8gIusbTaFspKtR2SQAAAAASUVORK5CYII=
 </value>
   </data>
-  <data name="Delete.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Screen.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
         DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@@ -622,7 +622,7 @@
         2BFABjsCSFC++DdnYZod1cA/NQAAAABJRU5ErkJggg==
 </value>
   </data>
-  <data name="Delete.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Screen.MoveImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAFzSURBVFhH5djNSgJRGMZxL2P2gTfQFbZvHSEZFBEW
@@ -635,7 +635,7 @@
         gg==
 </value>
   </data>
-  <data name="Delete.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+  <data name="Screen.NormalImage" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         iVBORw0KGgoAAAANSUhEUgAAAEUAAAAWCAYAAACWl1FwAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m
         dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAGVSURBVFhH5di7agJRFIXhDSKoYBQEC8FCECwEQRBE

+ 31 - 0
UAS-MES/PublicMethod/ftpOperater.cs

@@ -68,6 +68,37 @@ namespace UAS_MES.PublicMethod
             }
         }
 
+
+
+        public void UpLoadFile(string filepath, string filename,string savepath)
+        {
+
+            //目标路径
+            string targetPath = savepath;
+            //var file = Directory.GetFiles(targetPath);
+            string sourceFile = Path.Combine(filepath+@"\", filename);
+            string destFile = Path.Combine(targetPath, filename);
+            //获取指定路径下的全部文件名
+            var file = Directory.GetFiles(targetPath);
+            string overwrite = "";
+            for (int i = 0; i < file.Length; i++)
+            {
+                if (file[i].Substring(file[i].LastIndexOf(@"\") + 1) == filename)
+                {
+                    overwrite = MessageBox.Show("已存在名为" + filename + "的文件,是否覆盖", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question).ToString();
+                    break;
+                }
+            }
+            if (overwrite == "Yes" || overwrite == "")
+            {
+                //不存在文件的话进行创建
+                if (!Directory.Exists(targetPath))
+                    Directory.CreateDirectory(targetPath);
+                //将文件复制到指定位置
+                File.Copy(sourceFile, destFile, true);
+            }
+        }
+
         /// <summary>
         /// 获取ftp服务器上的文件信息
         /// </summary>