From 2cae7ac47f79cbc707be77a5b2563a8f18967ade Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期四, 26 五月 2022 09:14:53 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WarM/条码打印/Sc_ICMOToBarCode.cs |   49 ++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 40 insertions(+), 9 deletions(-)

diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.cs"
index 34f1621..759a957 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Sc_ICMOToBarCode.cs"
@@ -225,8 +225,34 @@
             HUserName = ClsPub.isStrNull(DBUtility.ClsPub.CurUserName);
             Int64 HUserID = 0;
             HUserID = ClsPub.isInt(DBUtility.ClsPub.CurUserID);
-            txtHEmpID.Text = HUserName;
-            txtHEmpID.Tag = HUserID;
+
+            DataSet DSet;
+
+            DSet = oCn.RunProcReturn("Select * from gy_czygl Where czymc='" + HUserName + "'", "gy_czygl", ref DBUtility.ClsPub.sExeReturnInfo);
+            
+            if (DSet == null)
+            //if (DSet == null|| DSet.Tables[0].Rows.Count == 0)
+            {
+                MessageBox.Show("娌℃湁杩斿洖浠讳綍缁撴灉,璇峰湪杩囨护妗嗕腑鐐瑰嚮銆愭仮澶嶃�戞寜閽�,灏濊瘯鍐嶆鏌ヨ锛�" + DBUtility.ClsPub.sExeReturnInfo);
+                return;
+            }
+            else
+            {
+                //grdMain.DataSource = DSet.Tables[0].DefaultView;
+                //鎶婂綋鍓嶅崟鎹甀D 瀛樺埌涓�涓寜閽噷闈�   鍒锋柊鏃舵瘡娆″瓨涓�閬�
+                if (DSet.Tables[0].Rows.Count > 0)
+                {
+
+
+                    txtHEmpID.Tag = DBUtility.ClsPub.isInt(DSet.Tables[0].Rows[0]["HEmpID"]);
+                }
+                else
+                {
+
+                }
+            }
+
+
         }
 
         private void grdMain_DblClick(object sender, EventArgs e)
@@ -1052,13 +1078,18 @@
                 {
                     if (HZXQty > DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value))
                     {
-                        HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
-                        grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
+                        //HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
+                        //grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
+                        MessageBox.Show("璇风偣鍑昏秴棰濈敓浜ф寜閽敓鎴愭潯鐮侊紒");
+                        return;
                     }
                     else
                     {
-                        grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = HZXQty;
-                        break;
+                        //grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = HZXQty;
+                        //
+
+                        HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
+                        grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
                     }
                 }
                 else
@@ -1726,11 +1757,11 @@
         {
             Int64 HEmpID = 0;
             HEmpID = ClsPub.isLong(txtHEmpID.Tag);
-            string HEmpName = "";
-            HEmpName = ClsPub.isStrNull(txtHEmpID.Text);
+            //string HEmpName = "";
+            //HEmpName = ClsPub.isStrNull(txtHEmpID.Text);
 
             DAL.ClsGy_Source_View oSource = new DAL.ClsGy_Source_View();
-            if (HEmpName != "")
+            if (HEmpID != 0)
             {
                 if (oSource.GetInfoByID(HEmpID))
                 {

--
Gitblit v1.9.1