天津投入产出系统后端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

89 lines
2.7 KiB

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();
}
/// <summary>
/// 双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void DetailHole_DoubleClick(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.labBatch.Text))
{
MessageBox.Show("此料孔未查到投料信息!");
return;
}
CreateBarCode(recorder);
}
/// <summary>
/// 二维码
/// </summary>
/// <param name="recorder"></param>
private void CreateBarCode(InjectionInfo recorder)
{
InjectIntoBarcode newfrom = new InjectIntoBarcode(recorder);
newfrom.StartPosition = FormStartPosition.CenterScreen;
DialogResult result = newfrom.ShowDialog();
}
/// <summary>
/// 写入详细信息
/// </summary>
/// <param name="model"></param>
private void DetailHole_Load(object sender, EventArgs e)
{
QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent();
recorder = agent.InvokeServiceFunction<InjectionInfo>("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 = "";
}
}
}
}