using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; using QMAPP.FJC.Entity.Injection; using ThoughtWorks.QRCode.Codec; using ThoughtWorks.QRCode.Codec.Data; using QMAPP.WinForm.Forms.Injection; namespace QMAPP.WinForm.UcControl { public partial class DetailHole : UserControl { InjectionInfo recorder = new InjectionInfo(); public DetailHole(string Charing) { recorder.CHARINGBARREL_CODE = Charing; InitializeComponent(); } /// /// 双击事件 /// /// /// private void DetailHole_DoubleClick(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.labBatch.Text)) { MessageBox.Show("此料孔未查到投料信息!"); return; } CreateBarCode(recorder); } /// /// 二维码 /// /// private void CreateBarCode(InjectionInfo recorder) { InjectIntoBarcode newfrom = new InjectIntoBarcode(recorder); newfrom.StartPosition = FormStartPosition.CenterScreen; DialogResult result = newfrom.ShowDialog(); } /// /// 写入详细信息 /// /// private void DetailHole_Load(object sender, EventArgs e) { QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); recorder = agent.InvokeServiceFunction("InjectionRecorderBLL_WriteMaterialDetail", recorder); if (recorder != null) { this.label1.Visible = true; this.label2.Visible = true; this.label3.Visible = true; this.labCharing.Text=""; this.labMaterial.Text = recorder.MATERIAL_CODE; this.labBatch.Text = recorder.MATERIALBATCH; this.labMemo.Text = recorder.MATERIAL_NAME; this.labCharing.Text = recorder.CHARINGBARREL_CODE+"号桶"; } else { this.label1.Visible = false; this.label2.Visible = false; this.label3.Visible = false; this.labCharing.Visible = false; this.labMaterial.Text = ""; this.labBatch.Text = ""; this.labMemo.Text = ""; } } } }