yxj
2021-10-29 18a02e32f0af32b7a1b11ed8843bf0b89a85290d
条码生成模块增加批次按钮
3个文件已修改
113 ■■■■ 已修改文件
WarM/条码打印/Gy_BarCodeBill.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_BarCodeBill.designer.cs 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_BarCodeBill.resx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/ÌõÂë´òÓ¡/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;
            }
        }
WarM/ÌõÂë´òÓ¡/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;
    }
}
WarM/ÌõÂë´òÓ¡/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