12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- using FastReport;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using UAS_LabelMachine.Entity;
- using UAS_LabelMachine.PublicMethod;
- namespace UAS_LabelMachine
- {
- public partial class 内部标签打印 : Form
- {
- DataHelper dh = SystemInf.dh;
- string PrintList;
- Report InsideLabel = new Report();
- public 内部标签打印(string printli)
- {
- PrintList = printli;
- InitializeComponent();
- }
- bool IninLoad = true;
- private void 附件内容打印_Load(object sender, EventArgs e)
- {
- }
- private void Confirm_Click(object sender, EventArgs e)
- {
- }
- private void Button_CheckedChanged(object sender, EventArgs e)
- {
- }
- private void Y_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyCode == Keys.Enter)
- {
- string[] data = Barcode.Text.Split(',');
- if (data.Length < 5)
- {
- MessageBox.Show("采集数据格式不正确,请重新采集");
- }
- InsideLabel.Load(@"C:\打印标签\S8柏怡LP.frx");
- InsideLabel.SetParameterValue("物料编号", data[0]);
- InsideLabel.SetParameterValue("数量", data[1].Replace("Q",""));
- InsideLabel.SetParameterValue("DC", data[2].Replace("9D",""));
- InsideLabel.SetParameterValue("品牌", Brand.Text);
- InsideLabel.SetParameterValue("LotNo", data[4]);
- InsideLabel.PrintSettings.ShowDialog = false;
- InsideLabel.PrintSettings.Printer = PrintList;
- InsideLabel.Print();
- }
- }
- }
- }
|