From a4713970c72a8d27b6f65ad37fe256de1cb72f8d Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期五, 09 六月 2023 11:48:14 +0800
Subject: [PATCH] 1
---
WarM/条码打印/Gy_BarCodeBillList.cs | 127 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 127 insertions(+), 0 deletions(-)
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBillList.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBillList.cs"
index 28c328d..0d742fb 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBillList.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBillList.cs"
@@ -37,6 +37,7 @@
public string PrintQtyCtl = ""; //鏉$爜鎵撳嵃娆℃暟鎺у埗
public string UpdatePrintQtyCtl = ""; //鏉$爜鎵撳嵃娆℃暟鏇存柊
public string SourceQtyCtl = ""; //瓒呮簮鍗曟暟閲忔帶鍒�
+ public string CampanyName = ""; //瀹㈡埛瀹氬埗鍖栧悕绉�
#region 鍥哄畾浠g爜
@@ -70,6 +71,7 @@
PrintQtyCtl = oSystemParameter.omodel.BarCode_PrintQtyCtl;
UpdatePrintQtyCtl = oSystemParameter.omodel.BarCode_UpdatePrintQtyCtl;
SourceQtyCtl = oSystemParameter.omodel.BarCode_SourceQtyCtl;
+ CampanyName = oSystemParameter.omodel.WMS_CampanyName;
}
}
@@ -598,9 +600,134 @@
+
+
+
#endregion
+ #region 缁戝畾鎵樻潯鐮�
+ private void bdBarCode_Pack_Click(object sender, EventArgs e)
+ {
+ if (grdMain.CurrentRow == null)
+ {
+ MessageBox.Show("璇峰厛閫夋嫨闇�瑕佺粦瀹氱殑鏉$爜锛�", "鎻愮ず");
+ return;
+ }
+ else
+ {
+ Int64 hmainid = 0;
+ string HItemID = "";
+ string s = "";
+ string HBarCode_Pack = "";
+ for (int i = 0; i <= grdMain.SelectedRows.Count - 1; i++)
+ {
+ if (s.Length > 4500)
+ {
+ HItemID = HItemID + "#" + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString());
+ s = DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString());
+ }
+ else
+ {
+ HItemID = HItemID + "," + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString());
+ s = s + "," + DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString());
+ }
+
+ //鑾峰彇鎵樻潯鐮佸彿锛氭墭鏉$爜=鎵�閫夋潯鐮佷腑娴佹按鍙锋渶澶х殑鏉$爜+鈥�-1鈥�
+ if (hmainid<DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString()))
+ {
+ hmainid = DBUtility.ClsPub.isLong(grdMain.SelectedRows[i].Cells[Fun_GetCol("hmainid")].Value.ToString());
+ HBarCode_Pack = DBUtility.ClsPub.isStrNull(grdMain.SelectedRows[i].Cells[Fun_GetCol("鏉$爜缂栧彿")].Value) + "-1";
+ }
+ }
+
+ try
+ {
+ oCn.BeginTran();
+ Int64 HFlag = 0;
+ HItemID = HItemID.Remove(0, 1); //鍘绘帀瀛楃涓茬涓�涓瓧绗�
+ string[] NewHItemID;
+ NewHItemID = HItemID.Split(Convert.ToChar("#"));
+
+ for (int i = 0; i <= NewHItemID.Length - 1; i++)
+ {
+ if(i == NewHItemID.Length - 1)
+ {
+ HFlag = 1;
+ }
+ //鎵樻潯鐮佺粦瀹氬墠鍒ゆ柇锛屽洖濉墭鏉$爜淇℃伅锛岀敓鎴愭墭鏉$爜
+ DataSet DS = oCn.RunProcReturn("exec h_p_Gy_BarCodeBill_BindPack '" + NewHItemID[i] + "','" + HBarCode_Pack + "','" + CampanyName + "'," + HFlag + ",'" + DBUtility.ClsPub.CurUserName + "'", "h_p_Gy_BarCodeBill_BindPack");
+ if (DS == null || DS.Tables[0].Rows.Count <= 0)
+ {
+ oCn.CnClose();
+ oCn.CnDispose();
+ MessageBox.Show("缁戝畾骞剁敓鎴愭墭鏉$爜鍒ゆ柇閿欒锛�");
+ return;
+ }
+ else if (DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0][0]) == "1")
+ {
+ oCn.CnClose();
+ oCn.CnDispose();
+ MessageBox.Show(DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0]["HRemark"]));
+ return;
+ }
+ }
+
+ MessageBox.Show("缁戝畾骞剁敓鎴愭墭鏉$爜鎴愬姛锛�", "鎻愮ず");
+ Display();
+ oCn.Commit();
+ }
+ catch (Exception e2)
+ {
+ oCn.RollBack();
+ throw (e2);
+ }
+ }
+ }
+
+ #endregion
+
+
+ #region 瑙g粦鎵樻潯鐮�
+ private void jbBarCode_Pack_Click(object sender, EventArgs e)
+ {
+ if (grdMain.CurrentRow == null)
+ {
+ MessageBox.Show("璇峰厛閫夋嫨闇�瑕佽В缁戠殑鏉$爜锛�", "鎻愮ず");
+ return;
+ }
+ if (grdMain.SelectedRows.Count != 1)
+ {
+ MessageBox.Show("涓�娆″彧鍏佽閫変腑涓�琛屾潯鐮佽褰曪紝璇烽噸鏂伴�夋嫨闇�瑕佽В缁戠殑鏉$爜锛�");
+ return;
+ }
+ else
+ {
+ Int64 HItemID = 0;
+ HItemID = DBUtility.ClsPub.isLong(grdMain.SelectedRows[0].Cells[Fun_GetCol("hmainid")].Value);
+
+ //鎵樻潯鐮佽В缁戝墠鍒ゆ柇锛屽洖濉墭鏉$爜淇℃伅锛屽垹闄ゆ墭鏉$爜
+ DataSet DS = oCn.RunProcReturn("exec h_p_Gy_BarCodeBill_UnBindPack " + HItemID + ",'" + CampanyName + "'", "h_p_Gy_BarCodeBill_UnBindPack");
+ if (DS == null || DS.Tables[0].Rows.Count <= 0)
+ {
+ MessageBox.Show("瑙g粦骞跺垹闄ゆ墭鏉$爜鍒ゆ柇閿欒锛�");
+ return;
+ }
+ else if (DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0][0]) == "1")
+ {
+ MessageBox.Show(DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0]["HRemark"]));
+ return;
+ }
+ else
+ {
+ MessageBox.Show("瑙g粦骞跺垹闄ゆ墭鏉$爜鎴愬姛锛�", "鎻愮ず");
+ Display();
+ }
+ }
+ }
+
+ #endregion
+
}
--
Gitblit v1.9.1