From 18a02e32f0af32b7a1b11ed8843bf0b89a85290d Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期五, 29 十月 2021 17:01:26 +0800
Subject: [PATCH] 条码生成模块增加批次按钮
---
WarM/条码打印/Gy_BarCodeBill.designer.cs | 70 +++++++++++++++++++++++-----------
WarM/条码打印/Gy_BarCodeBill.resx | 10 +++++
WarM/条码打印/Gy_BarCodeBill.cs | 33 ++++++++++++++++
3 files changed, 90 insertions(+), 23 deletions(-)
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
index 580f92b..0b42066 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.cs"
@@ -2471,6 +2471,39 @@
}
}
+ //鎵规鎸夐挳
+ private void BatchNo_Click(object sender, EventArgs e)
+ {
+ bool b = false;
+ for (int i = 0; i < grdMain.RowCount; i++)
+ {
+ long HMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[i].Cells[HMaterIDCol].Value); // 鐗╂枡鍐呯爜
+ string HBatchNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HBatchNoCol].Value); // 鎵瑰彿
+
+ if (HMaterID != 0)
+ {
+ DataSet oDs = oCn.RunProcReturn("exec h_p_Gy_BarCodeBill_GetBatchNo " + HMaterID.ToString() + ",'" + HBatchNo + "','" + dtpHDate.Value.ToShortDateString()+ "','" + CampanyName+"'", "h_p_Gy_BarCodeBill_GetBatchNo");
+ //
+ if (oDs == null && oDs.Tables[0].Rows.Count == 0)
+ {
+ MessageBox.Show("鐢熸垚鎵规澶辫触锛�");
+ return;
+ }
+ else if (DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0][0]) == "1")
+ {
+ grdMain.Rows[i].Cells[HBatchNoCol].Value = DBUtility.ClsPub.isStrNull(oDs.Tables[0].Rows[0]["HBatchNo"]);
+ b = true;
+ }
+ }
+ }
+ //鏄庣粏琛ㄦ槸鍚︿负闆惰
+ if (b == false)
+ {
+ MessageBox.Show("娌℃湁闇�瑕佺敓鎴愭壒娆$殑鏄庣粏琛岋紒", "鎻愮ず");
+ return;
+ }
+ }
+
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.designer.cs" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.designer.cs"
index 6df46ff..9e37bdf 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.designer.cs"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.designer.cs"
@@ -28,7 +28,6 @@
/// </summary>
private void InitializeComponent()
{
- this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Gy_BarCodeBill));
this.Tool = new System.Windows.Forms.ToolStrip();
this.dy = new System.Windows.Forms.ToolStripButton();
@@ -49,6 +48,8 @@
this.bclk = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
this.tb = new System.Windows.Forms.ToolStripButton();
+ this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
+ this.gl = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.tc = new System.Windows.Forms.ToolStripButton();
this.lblCaption = new System.Windows.Forms.Label();
@@ -90,7 +91,7 @@
this.label11 = new System.Windows.Forms.Label();
this.txtHMaker = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
- this.timer1 = new System.Windows.Forms.Timer(this.components);
+ this.timer1 = new System.Windows.Forms.Timer();
this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.grdMain = new System.Windows.Forms.DataGridView();
@@ -100,10 +101,10 @@
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.grdSub = new System.Windows.Forms.DataGridView();
- this.gl = new System.Windows.Forms.ToolStripButton();
- this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.grdList = new System.Windows.Forms.DataGridView();
+ this.BatchNo = new System.Windows.Forms.ToolStripButton();
+ this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.Tool.SuspendLayout();
this.P1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pic1)).BeginInit();
@@ -147,6 +148,8 @@
this.tb,
this.toolStripSeparator6,
this.gl,
+ this.toolStripSeparator7,
+ this.BatchNo,
this.toolStripSeparator3,
this.tc});
this.Tool.Location = new System.Drawing.Point(0, 0);
@@ -350,6 +353,25 @@
this.tb.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
this.tb.ToolTipText = "鍚屾鍩虹璧勬枡";
this.tb.Click += new System.EventHandler(this.tb_Click);
+ //
+ // toolStripSeparator6
+ //
+ this.toolStripSeparator6.Name = "toolStripSeparator6";
+ this.toolStripSeparator6.Size = new System.Drawing.Size(6, 50);
+ //
+ // gl
+ //
+ this.gl.AutoSize = false;
+ this.gl.Image = ((System.Drawing.Image)(resources.GetObject("gl.Image")));
+ this.gl.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
+ this.gl.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.gl.ImageTransparentColor = System.Drawing.Color.White;
+ this.gl.Name = "gl";
+ this.gl.Size = new System.Drawing.Size(35, 47);
+ this.gl.Text = "鍏宠仈";
+ this.gl.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
+ this.gl.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+ this.gl.Click += new System.EventHandler(this.gl_Click);
//
// toolStripSeparator3
//
@@ -915,25 +937,6 @@
this.grdSub.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdSub_CellContentClick);
this.grdSub.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.grdSub_CellEndEdit);
//
- // gl
- //
- this.gl.AutoSize = false;
- this.gl.Image = ((System.Drawing.Image)(resources.GetObject("gl.Image")));
- this.gl.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
- this.gl.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
- this.gl.ImageTransparentColor = System.Drawing.Color.White;
- this.gl.Name = "gl";
- this.gl.Size = new System.Drawing.Size(35, 47);
- this.gl.Text = "鍏宠仈";
- this.gl.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
- this.gl.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
- this.gl.Click += new System.EventHandler(this.gl_Click);
- //
- // toolStripSeparator6
- //
- this.toolStripSeparator6.Name = "toolStripSeparator6";
- this.toolStripSeparator6.Size = new System.Drawing.Size(6, 50);
- //
// tabPage3
//
this.tabPage3.Controls.Add(this.grdList);
@@ -960,6 +963,25 @@
this.grdList.RowTemplate.Height = 23;
this.grdList.Size = new System.Drawing.Size(929, 288);
this.grdList.TabIndex = 46;
+ //
+ // BatchNo
+ //
+ this.BatchNo.AutoSize = false;
+ this.BatchNo.Image = ((System.Drawing.Image)(resources.GetObject("BatchNo.Image")));
+ this.BatchNo.ImageAlign = System.Drawing.ContentAlignment.BottomCenter;
+ this.BatchNo.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
+ this.BatchNo.ImageTransparentColor = System.Drawing.Color.White;
+ this.BatchNo.Name = "BatchNo";
+ this.BatchNo.Size = new System.Drawing.Size(35, 47);
+ this.BatchNo.Text = "鎵规";
+ this.BatchNo.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
+ this.BatchNo.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText;
+ this.BatchNo.Click += new System.EventHandler(this.BatchNo_Click);
+ //
+ // toolStripSeparator7
+ //
+ this.toolStripSeparator7.Name = "toolStripSeparator7";
+ this.toolStripSeparator7.Size = new System.Drawing.Size(6, 50);
//
// Gy_BarCodeBill
//
@@ -1082,5 +1104,7 @@
private System.Windows.Forms.ToolStripButton gl;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.DataGridView grdList;
+ private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
+ private System.Windows.Forms.ToolStripButton BatchNo;
}
}
\ No newline at end of file
diff --git "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.resx" "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.resx"
index 2368149..c42cb23 100644
--- "a/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.resx"
+++ "b/WarM/\346\235\241\347\240\201\346\211\223\345\215\260/Gy_BarCodeBill.resx"
@@ -506,6 +506,16 @@
TkSuQmCC
</value>
</data>
+ <data name="BatchNo.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAD3SURBVDhPnZC9FYIwFEaZiQFkAB1ADzULZACGoJLKSio7
+ BqCzorNiABgABnjme+GFBPlR3znfSUJy7yMJdorG0S2KY1r6/lE0PBMcdA8z3NZEd9VtSmiolU7iSjwY
+ CcNyUUL0UhzMIcK4An8IPFjGr2F0s3CTmrFOLbgN67vK79LQsOCqQhaIxIE9AfXVxT4Wwzp1NsGYQ4b9
+ tjhSe4smiVKma19NL+4KBEQA85hH1OQH+T6T6MgagaArThys0V3g8ZwpgbryzBuIXAfB3iosZSUP3VEH
+ cx82d1+EpURiHmu8817neYkEHQH+BEtZSfYHLCWSdTgI3vBtcjUXOHiVAAAAAElFTkSuQmCC
+</value>
+ </data>
<data name="tc.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
--
Gitblit v1.9.1