瀏覽代碼

修改细节提示

章政 7 年之前
父節點
當前提交
e00819be70

+ 3 - 3
UAS-出货标签管理/Login.Designer.cs

@@ -114,7 +114,7 @@
             this.label3.AutoSize = true;
             this.label3.BackColor = System.Drawing.Color.Transparent;
             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(324, 209);
+            this.label3.Location = new System.Drawing.Point(321, 209);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(42, 21);
             this.label3.TabIndex = 6;
@@ -135,7 +135,7 @@
             this.Master.AutoSize = true;
             this.Master.BackColor = System.Drawing.Color.Transparent;
             this.Master.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.Master.Location = new System.Drawing.Point(324, 250);
+            this.Master.Location = new System.Drawing.Point(321, 250);
             this.Master.Name = "Master";
             this.Master.Size = new System.Drawing.Size(42, 21);
             this.Master.TabIndex = 8;
@@ -146,7 +146,7 @@
             this.label4.AutoSize = true;
             this.label4.BackColor = System.Drawing.Color.Transparent;
             this.label4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.label4.Location = new System.Drawing.Point(324, 288);
+            this.label4.Location = new System.Drawing.Point(321, 288);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(25, 21);
             this.label4.TabIndex = 10;

+ 1 - 2
UAS-出货标签管理/Login.cs

@@ -3,7 +3,6 @@ using System.Data;
 using System.Drawing;
 using System.Drawing.Drawing2D;
 using System.IO;
-using System.Text;
 using System.Windows.Forms;
 using UAS_LabelMachine.Entity;
 using UAS_LabelMachine.PublicMethod;
@@ -74,7 +73,7 @@ namespace UAS_LabelMachine
                     Ms_Pwd = dt.Rows[i]["ms_pwd"].ToString();
             }
             //切换至用户选择的数据源
-            string ConnectionString = "Connection Timeout=0;Pooling=false;Password=" + Ms_Pwd + ";User ID=" + MasterCombox.SelectedValue.ToString() + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + IP.Text + ")(PORT=1523)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
+            string ConnectionString = "Connection Timeout=0;Pooling=false;Password=" + Ms_Pwd + ";User ID=" + MasterCombox.SelectedValue.ToString() + ";Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=" + IP.Text + ")(PORT=" + DataHelper.OraclePort + ")))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
             DataHelper.DBConnectionString = ConnectionString;
             //设置了Connection,重新执行构造函数,重置数据库连接
             dh = new DataHelper();

+ 8 - 0
UAS-出货标签管理/PublicMethod/DataHelper.cs

@@ -13,8 +13,12 @@ namespace UAS_LabelMachine
 
         //富为外网地址
         //private readonly string ConnectionStrings = "Data Source=richwellgroup.com.cn/orcl;User ID=DATACENTER;PassWord=select!#%*(";
+        //富为ERP地址
+        //public static readonly string ERPAddesss = "http://richwellgroup.com.cn:8099/ERP/";
         //富为FTP
         //public static readonly string FTPAdress = "ftp://richwellgroup.com.cn|printuser|printuser";
+        //Oracle端口
+        //public static readonly string OraclePort = "1521";
 
         //怡海能达外网地址
         //private readonly string ConnectionStrings = "Data Source=sz.hi-mantech.com/orcl;User ID=DATACENTER;PassWord=select!#%*(";
@@ -22,6 +26,8 @@ namespace UAS_LabelMachine
         //public static readonly string ERPAddesss = "http://sz.hi-mantech.com:8099/ERP/";
         //怡海能达FTP
         //public static readonly string FTPAdress = "ftp://sz.hi-mantech.com:46688|yhndftp|Stga28ytG8";
+        //Oracle端口
+        //public static readonly string OraclePort = "1521";
 
         //华商龙外网地址
         private readonly string ConnectionStrings = "Connection Timeout=0;Pooling=false;Password=select!#%*(;User ID=YITOA_DATACENTER;Pooling=false;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=218.18.115.198)(PORT=1523)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));";
@@ -29,6 +35,8 @@ namespace UAS_LabelMachine
         public static readonly string ERPAddesss = "http://218.18.115.198:8888/ERP/";
         //华商龙FTP
         public static readonly string FTPAdress = "ftp://218.18.115.198:21|Print|Administrator1@#";
+        //Oracle端口
+        public static readonly string OraclePort = "1523";
 
         //用户选择的数据库的连接字符串
         public static string DBConnectionString;

+ 1 - 3
UAS-出货标签管理/PublicMethod/ftpOperater.cs

@@ -1,6 +1,4 @@
 using System;
-using System.ComponentModel;
-using System.Diagnostics;
 using System.IO;
 using System.Net;
 using System.Text;
@@ -10,7 +8,7 @@ namespace UAS_LabelMachine
 {
     class ftpOperater
     {
-        public static string FTPAddress = Properties.Settings.Default.FTPAddress.Split('|')[0];
+        public static string FTPAddress = DataHelper.FTPAdress.Split('|')[0];
 
         public static string DownLoadTo = Environment.GetEnvironmentVariable("windir").Substring(0, 1) + @":\" + @"打印标签\";
 

+ 5 - 0
UAS-出货标签管理/UAS_出货标签管理.cs

@@ -359,6 +359,11 @@ namespace UAS_LabelMachine
                     MessageBox.Show("采集的数据不能为空");
                     return;
                 }
+                if (Si_ItemDGV.Rows.Count == 0)
+                {
+                    MessageBox.Show("未维护采集策略");
+                    return;
+                }
                 CollectInputData();
             }
         }

+ 4 - 0
UAS-出货标签管理/生成条码.cs

@@ -185,6 +185,10 @@ namespace UAS_LabelMachine
                 LoadData();
                 MessageBox.Show("生成箱号成功!");
             }
+            else
+            {
+                MessageBox.Show("未勾选需要生成的明细!");
+            }
             //如果含有内容不符合的选项,进行提示
             string str = "";
             foreach (string ss in NotPass.Values)