Kaynağa Gözat

视图修改,IP地址修改

callm 6 yıl önce
ebeveyn
işleme
bc327d8de6

+ 1 - 12
UAS-出货标签管理(标签复核)/Login.cs

@@ -34,20 +34,9 @@ namespace UAS_LabelMachine
             SystemInf.dh = dh;
             //获取账套信息
             dt = (DataTable)dh.ExecuteSql("select ma_function,ms_pwd,ma_user from master ", "select");
-            DataTable MasterDB = dt.Clone();
-            for (int i = 0; i < dt.Rows.Count; i++)
-            {
-                if (DataHelper.Masters.Contains(dt.Rows[i]["ma_user"].ToString()))
-                {
-                    DataRow dr = MasterDB.NewRow();
-                    dr["ma_user"] = dt.Rows[i]["ma_user"];
-                    dr["ma_function"] = dt.Rows[i]["ma_function"];
-                    MasterDB.Rows.Add(dr);
-                }
-            }
             MasterCombox.DisplayMember = "ma_function";
             MasterCombox.ValueMember = "ma_user";
-            MasterCombox.DataSource = MasterDB;
+            MasterCombox.DataSource = dt;
             //读取上次登陆时的用户名和选择的账套
             UserName.Text = Properties.Settings.Default.LastLoginUser;
             MasterCombox.Text = Properties.Settings.Default.LastLoginMaster;

+ 3 - 2
UAS-出货标签管理(标签复核)/PublicMethod/DataHelper.cs

@@ -12,8 +12,8 @@ namespace UAS_LabelMachine
     {
 
         //富为外网地址
-        private readonly string ConnectionStrings = "Data Source=jinhaode.f3322.org/orcl;User ID=HD;PassWord=select!#%*(";
-        private readonly string InnerConnectionStrings = "Data Source=jinhaode.f3322.org/orcl;User ID=HD;PassWord=select!#%*(";
+        private readonly string ConnectionStrings = "Data Source=183.62.139.106/orcl;User ID=HD;PassWord=select!#%*(";
+        private readonly string InnerConnectionStrings = "Data Source=j183.62.139.106/orcl;User ID=HD;PassWord=select!#%*(";
         //富为ERP地址
         public static readonly string ERPAddesss = "http://jinhaode.f3322.org:8099/ERP/";
         //富为FTP
@@ -790,6 +790,7 @@ namespace UAS_LabelMachine
         public object ExecuteSql(string SQL, string Type, params object[] names)
         {
             object result = null;
+            Console.WriteLine(SQL);
             command = new OracleCommand(SQL, connection);
             //用来拼接参数的
             if (names.Length > 0)

+ 2 - 6
UAS-出货标签管理(标签复核)/UAS_出货标签管理.cs

@@ -713,7 +713,7 @@ namespace UAS_LabelMachine
             if (e.KeyCode == Keys.Enter)
             {
                 sql.Clear();
-                sql.Append("select pi_id,pi_cardcode,to_char(pi_date,'yyyymmdd')pi_date,nvl(cu_needrecheck,0)cu_needrecheck from prodinout left join customer on cu_code=pi_cardcode where pi_inoutno='" + pi_inoutno.Text + "' ");
+                sql.Append("select pi_id,pi_cardcode,to_char(pi_date,'yyyymmdd')pi_date,nvl(cu_needrecheck,0)cu_needrecheck from prodinout left join customer on cu_code=pi_cardcode where pi_invoicecode='" + pi_invoicecode.Text + "' ");
                 DataTable dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
                 ErrorType.Clear();
                 if (dt.Rows.Count > 0)
@@ -775,11 +775,7 @@ namespace UAS_LabelMachine
         private void LoadGridData(object sender, EventArgs e)
         {
             sql.Clear();
-            sql.Append("select 0 choose,pd_custprodcode,pd_custprodspec,pr_orispeccode,pd_pocode,pib_madein,pib_custbarcode,pib_custoutboxcode,pib_id,pib_datecode1,pib_pdid,pib_piid,pib_pdno,pib_prodcode,nvl(nvl(pd_brand,pib_brand),pr_brand)pib_brand, pr_vendprodcode,");
-            sql.Append("pib_lotno,pib_datecode,pib_qty,pr_spec,pr_detail,pr_zxbzs,pr_unit,pib_barcode,pib_outboxcode1,pib_outboxcode2,nvl(pib_ifpick,0)pib_ifpick,nvl(pib_ifprint,0)pib_ifprint");
-            sql.Append(" from prodiobarcode left join prodiodetail on pib_piid=pd_piid and pd_pdno=pib_pdno and ");
-            sql.Append(" pd_prodcode=pib_prodcode left join product on pr_code=pib_prodcode left join sale on sa_code=pib_ordercode ");
-            sql.Append("where pib_piid='" + PI_ID + "' order by pd_pdno");
+            sql.Append("select * from prodiobarcode_view1 where pib_piid='" + PI_ID + "'");
             dt = (DataTable)dh.ExecuteSql(sql.ToString(), "select");
             MidSource.DataSource = dt;
             BaseUtil.FillDgvWithDataTable(LabelInf, (DataTable)MidSource.DataSource);