From f19044df4868173b951e81b377869666d16806dd Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期一, 13 六月 2022 17:28:16 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API
---
WarM/条码打印/Sc_ICMOToBarCode.cs | 108 ++++++++++++++++++++++--------------------------------
1 files changed, 44 insertions(+), 64 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..23d3fb3 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 HEmpID 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.isStrNull(DSet.Tables[0].Rows[0]["HEmpID"]);
+ }
+ else
+ {
+
+ }
+ }
+
+
}
private void grdMain_DblClick(object sender, EventArgs e)
@@ -722,62 +748,6 @@
}
}
- private void zf_Click(object sender, EventArgs e)
- {
- //Sub_AbandonCheck();
- if (!ClsPub.Security_Log(ModRightNameDelete, 1, true, DBUtility.ClsPub.CurUserName))
- {
- return;
- }
- if (grdMain.CurrentRow == null)
- return;
- DAL.ClsGy_BarCodeBill_Ctl oBar = new DAL.ClsGy_BarCodeBill_Ctl();
- if (MessageBox.Show("纭畾瑕佷綔搴熸墍閫夋潯鐮侊紵", "鎻愮ず", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
- {
- return;
- }
- for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++)
- {
- if (DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("HMaterID")].Value) != 0)
- {
- if (!oBar.Cancelltion(DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value)))
- {
- MessageBox.Show("浣滃簾澶辫触锛�", "鎻愮ず");
- return;
- }
- }
- }
- MessageBox.Show("浣滃簾鎴愬姛锛�", "鎻愮ず");
- }
-
- private void fzf_Click(object sender, EventArgs e)
- {
- //this.Sub_CheckBill();
- if (!ClsPub.Security_Log(ModRightNameDelete, 1, true, DBUtility.ClsPub.CurUserName))
- {
- return;
- }
- if (grdMain.CurrentRow == null)
- return;
- DAL.ClsGy_BarCodeBill_Ctl oBar = new DAL.ClsGy_BarCodeBill_Ctl();
- if (MessageBox.Show("纭畾瑕佸弽浣滃簾鎵�閫夋潯鐮侊紵", "鎻愮ず", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
- {
- return;
- }
- for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++)
- {
- if (DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("HMaterID")].Value) != 0)
- {
- if (!oBar.UnCancelltion(DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value)))
- {
- MessageBox.Show("鍙嶄綔搴熷け璐ワ紒", "鎻愮ず");
- return;
- }
- }
- }
- MessageBox.Show("鍙嶄綔搴熸垚鍔燂紒", "鎻愮ず");
- }
-
private void cmdHSaveBill_Click(object sender, EventArgs e)
{
@@ -1054,11 +1024,17 @@
{
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;
+ //
+
+ //HZXQty = HZXQty - DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
+ //grdMain.Rows[i].Cells["鏈鏁伴噺"].Value = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells["鐢熶骇璁㈠崟鏁伴噺"].Value);
}
}
else
@@ -1725,14 +1701,17 @@
private void cmdHSourceID_Click(object sender, EventArgs e)
{
Int64 HEmpID = 0;
- HEmpID = ClsPub.isLong(txtHEmpID.Tag);
- string HEmpName = "";
- HEmpName = ClsPub.isStrNull(txtHEmpID.Text);
+ HEmpID = Convert.ToInt64(txtHEmpID.Tag);
+
+
+ //MessageBox.Show(ClsPub.isStrNull(HEmpID));
+ //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))
+ if (oSource.GetInfoByID_AoBang(HEmpID))
{
this.txtHSourceID.Text = oSource.oModel.HName;
this.txtHSourceID.Tag = oSource.oModel.HItemID.ToString();
@@ -1950,6 +1929,7 @@
grdList.DataSource = null;
grdSub.DataSource = null;
grdMain.DataSource = null;
+ txtHEmpID.Tag = 0;
}
private void button2_Click(object sender, EventArgs e)
--
Gitblit v1.9.1