duhe
2024-09-23 e7bcbcfc148c4cbf190a655fc056da83cd0e3759
条码自动生成:设置单选,控制条码生成时是否打印
2个文件已修改
92 ■■■■ 已修改文件
WarM/条码打印/Gy_BarCodeBill_automaticallyByPLC_New.cs 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/条码打印/Gy_BarCodeBill_automaticallyByPLC_New.designer.cs 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/ÌõÂë´òÓ¡/Gy_BarCodeBill_automaticallyByPLC_New.cs
@@ -426,19 +426,22 @@
            this.Sub_SaveBill();
            Display();
            //设置打印模板,打印
            grdList.Rows[0].Cells[0].Value = "*";
            Report = new GridppReport();
            Report.LoadFromFile(DBUtility.ClsPub.AppPath + @"\" + textBox_PrintModelParams.Text + ".grf");  //here .
            Report.BeforePostRecord += new _IGridppReportEvents_BeforePostRecordEventHandler(ReportBeforePostRecord);
            Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReportFetchRecordByDataTable);
            Report.PrintEnd += new _IGridppReportEvents_PrintEndEventHandler(ReportPrintEnd);
            if (comboBox_PrinterParams.Text != "")
            if (radioButton_IsPrint_Yes.Checked == true)
            {
                Report.Printer.PrinterName = comboBox_PrinterParams.Text.Replace("(默认)", "");
                //设置打印模板,打印
                grdList.Rows[0].Cells[0].Value = "*";
                Report = new GridppReport();
                Report.LoadFromFile(DBUtility.ClsPub.AppPath + @"\" + textBox_PrintModelParams.Text + ".grf");  //here .
                Report.BeforePostRecord += new _IGridppReportEvents_BeforePostRecordEventHandler(ReportBeforePostRecord);
                Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReportFetchRecordByDataTable);
                Report.PrintEnd += new _IGridppReportEvents_PrintEndEventHandler(ReportPrintEnd);
                if (comboBox_PrinterParams.Text != "")
                {
                    Report.Printer.PrinterName = comboBox_PrinterParams.Text.Replace("(默认)", "");
                }
                Report.Print(false);
            }
            Report.Print(false);
            Display4();
        }
        //保存单据
@@ -1205,7 +1208,7 @@
                if (!clearPrinterTask(ref msg))
                {
                    MessageBox.Show(msg);
                    return;
                    produceQty = 0;
                }
            }
@@ -1217,18 +1220,21 @@
                //获取需要打印的数据
                Display();
                //设置打印模板,打印
                grdList.Rows[0].Cells[0].Value = "*";
                Report = new GridppReport();
                Report.LoadFromFile(DBUtility.ClsPub.AppPath + @"\" + textBox_PrintModelParams.Text + ".grf");  //here .
                Report.BeforePostRecord += new _IGridppReportEvents_BeforePostRecordEventHandler(ReportBeforePostRecord);
                Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReportFetchRecordByDataTable);
                Report.PrintEnd += new _IGridppReportEvents_PrintEndEventHandler(ReportPrintEnd);
                if (comboBox_PrinterParams.Text != "")
                if (radioButton_IsPrint_Yes.Checked == true)
                {
                    Report.Printer.PrinterName = comboBox_PrinterParams.Text.Replace("(默认)", "");
                    //设置打印模板,打印
                    grdList.Rows[0].Cells[0].Value = "*";
                    Report = new GridppReport();
                    Report.LoadFromFile(DBUtility.ClsPub.AppPath + @"\" + textBox_PrintModelParams.Text + ".grf");  //here .
                    Report.BeforePostRecord += new _IGridppReportEvents_BeforePostRecordEventHandler(ReportBeforePostRecord);
                    Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReportFetchRecordByDataTable);
                    Report.PrintEnd += new _IGridppReportEvents_PrintEndEventHandler(ReportPrintEnd);
                    if (comboBox_PrinterParams.Text != "")
                    {
                        Report.Printer.PrinterName = comboBox_PrinterParams.Text.Replace("(默认)", "");
                    }
                    Report.Print(false);
                }
                Report.Print(false);
                if (i == produceQty - 1)
                {
WarM/ÌõÂë´òÓ¡/Gy_BarCodeBill_automaticallyByPLC_New.designer.cs
@@ -148,6 +148,9 @@
            this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
            this.timer2 = new System.Windows.Forms.Timer(this.components);
            this.timer3 = new System.Windows.Forms.Timer(this.components);
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.radioButton_IsPrint_Yes = new System.Windows.Forms.RadioButton();
            this.radioButton_IsPrint_No = new System.Windows.Forms.RadioButton();
            this.Tool.SuspendLayout();
            this.P1.SuspendLayout();
            this.tabControl_MainInfo.SuspendLayout();
@@ -168,6 +171,7 @@
            this.tabControl1.SuspendLayout();
            this.tabPage4.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.grdBillBarCodeList)).BeginInit();
            this.groupBox1.SuspendLayout();
            this.SuspendLayout();
            // 
            // Tool
@@ -556,6 +560,7 @@
            // gbUp
            // 
            this.gbUp.BackColor = System.Drawing.Color.Transparent;
            this.gbUp.Controls.Add(this.groupBox1);
            this.gbUp.Controls.Add(this.cmdSourceBillNo);
            this.gbUp.Controls.Add(this.cmbHWorksNumber);
            this.gbUp.Controls.Add(this.label4);
@@ -1503,6 +1508,38 @@
            this.timer3.Interval = 5000;
            this.timer3.Tick += new System.EventHandler(this.timer3_Tick);
            // 
            // groupBox1
            //
            this.groupBox1.Controls.Add(this.radioButton_IsPrint_No);
            this.groupBox1.Controls.Add(this.radioButton_IsPrint_Yes);
            this.groupBox1.Location = new System.Drawing.Point(24, 162);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(200, 100);
            this.groupBox1.TabIndex = 45;
            this.groupBox1.TabStop = false;
            //
            // radioButton_IsPrint_Yes
            //
            this.radioButton_IsPrint_Yes.AutoSize = true;
            this.radioButton_IsPrint_Yes.Checked = true;
            this.radioButton_IsPrint_Yes.Location = new System.Drawing.Point(7, 13);
            this.radioButton_IsPrint_Yes.Name = "radioButton_IsPrint_Yes";
            this.radioButton_IsPrint_Yes.Size = new System.Drawing.Size(69, 22);
            this.radioButton_IsPrint_Yes.TabIndex = 0;
            this.radioButton_IsPrint_Yes.TabStop = true;
            this.radioButton_IsPrint_Yes.Text = "打印";
            this.radioButton_IsPrint_Yes.UseVisualStyleBackColor = true;
            //
            // radioButton_IsPrint_No
            //
            this.radioButton_IsPrint_No.AutoSize = true;
            this.radioButton_IsPrint_No.Location = new System.Drawing.Point(6, 68);
            this.radioButton_IsPrint_No.Name = "radioButton_IsPrint_No";
            this.radioButton_IsPrint_No.Size = new System.Drawing.Size(87, 22);
            this.radioButton_IsPrint_No.TabIndex = 1;
            this.radioButton_IsPrint_No.Text = "不打印";
            this.radioButton_IsPrint_No.UseVisualStyleBackColor = true;
            //
            // Gy_BarCodeBill_automaticallyByPLC_New
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
@@ -1552,6 +1589,8 @@
            this.tabControl1.ResumeLayout(false);
            this.tabPage4.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.grdBillBarCodeList)).EndInit();
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            this.ResumeLayout(false);
        }
@@ -1676,5 +1715,8 @@
        private System.Windows.Forms.PrintPreviewDialog printPreviewDialog1;
        private System.Windows.Forms.Timer timer2;
        private System.Windows.Forms.Timer timer3;
        private System.Windows.Forms.GroupBox groupBox1;
        private System.Windows.Forms.RadioButton radioButton_IsPrint_No;
        private System.Windows.Forms.RadioButton radioButton_IsPrint_Yes;
    }
}