..
This commit is contained in:
@@ -13,14 +13,75 @@ namespace Project.Dialog
|
||||
{
|
||||
public partial class fManualPrint0 : Form
|
||||
{
|
||||
public Class.Reel reelinfo = null;
|
||||
public string NewID { get; set; }
|
||||
|
||||
[Flags]
|
||||
public enum eOpt : byte
|
||||
{
|
||||
reelid = 1,
|
||||
sid = 2,
|
||||
vlot = 4,
|
||||
vname = 8,
|
||||
partno = 16,
|
||||
qty = 32,
|
||||
mfg = 64,
|
||||
}
|
||||
|
||||
public fManualPrint0()
|
||||
{
|
||||
InitializeComponent();
|
||||
SetControlStates(eOpt.reelid | eOpt.sid | eOpt.vlot | eOpt.vname | eOpt.partno | eOpt.qty | eOpt.mfg);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 사용하고자하는 컨트롤을 or 값으로 전달해주세요
|
||||
/// </summary>
|
||||
/// <param name="enabledOptions"></param>
|
||||
|
||||
public fManualPrint0(eOpt enabledOptions)
|
||||
{
|
||||
InitializeComponent();
|
||||
SetControlStates(enabledOptions);
|
||||
}
|
||||
|
||||
private void SetControlStates(eOpt enabledOptions)
|
||||
{
|
||||
tbRid.Enabled = enabledOptions.HasFlag(eOpt.reelid);
|
||||
tbRid.BackColor = tbRid.Enabled ? Color.White : Color.LightGray;
|
||||
|
||||
tbSid.Enabled = enabledOptions.HasFlag(eOpt.sid);
|
||||
tbSid.BackColor = tbSid.Enabled ? Color.White : Color.LightGray;
|
||||
|
||||
tbVLot.Enabled = enabledOptions.HasFlag(eOpt.vlot);
|
||||
tbVLot.BackColor = tbVLot.Enabled ? Color.White : Color.LightGray;
|
||||
|
||||
tbVName.Enabled = enabledOptions.HasFlag(eOpt.vname);
|
||||
tbVName.BackColor = tbVName.Enabled ? Color.White : Color.LightGray;
|
||||
|
||||
tbPartNo.Enabled = enabledOptions.HasFlag(eOpt.partno);
|
||||
tbPartNo.BackColor = tbPartNo.Enabled ? Color.White : Color.LightGray;
|
||||
|
||||
tbQty.Enabled = enabledOptions.HasFlag(eOpt.qty);
|
||||
tbQty.BackColor = tbQty.Enabled ? Color.White : Color.LightGray;
|
||||
|
||||
tbMFGDate.Enabled = enabledOptions.HasFlag(eOpt.mfg);
|
||||
tbMFGDate.BackColor = tbMFGDate.Enabled ? Color.White : Color.LightGray;
|
||||
}
|
||||
private void fNewReelID_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (PUB.Result != null && PUB.Result.ItemDataC != null)
|
||||
{
|
||||
var vdata = PUB.Result.ItemDataC.VisionData;
|
||||
this.tbRid.Text = vdata.RID;
|
||||
this.tbVLot.Text = vdata.VLOT;
|
||||
this.tbVName.Text = vdata.VNAME;
|
||||
this.tbPartNo.Text = vdata.PARTNO;
|
||||
this.tbQty.Text = vdata.QTY;
|
||||
this.tbSid.Text = vdata.SID;
|
||||
this.tbMFGDate.Text = vdata.MFGDATE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void btOK_Click(object sender, EventArgs e)
|
||||
@@ -28,27 +89,27 @@ namespace Project.Dialog
|
||||
|
||||
int qty = 0;
|
||||
int.TryParse(tbQty.Text, out qty);
|
||||
string rid, lot, manu, mfg, partnum,sid;
|
||||
rid = lot = manu = mfg =sid= partnum = "";
|
||||
if (tbRid.Text.isEmpty() == false) rid = tbRid.Text.Trim();
|
||||
if (tbSid.Text.isEmpty() == false) sid = tbSid.Text.Trim();
|
||||
if (tbMfg.Text.isEmpty() == false) mfg = tbMfg.Text.Trim();
|
||||
if (tbPart.Text.isEmpty() == false) partnum = tbPart.Text.Trim();
|
||||
if (tbLot.Text.isEmpty() == false) lot = tbLot.Text.Trim();
|
||||
if (tbManu.Text.isEmpty() == false) manu = tbManu.Text.Trim();
|
||||
var rlt = PUB.PrinterR.Print(new Class.Reel
|
||||
string rid, lot, manu, mfg, partnum, sid;
|
||||
rid = lot = manu = mfg = sid = partnum = "";
|
||||
rid = tbRid.Text.Trim();
|
||||
sid = tbSid.Text.Trim();
|
||||
mfg = tbMFGDate.Text.Trim();
|
||||
partnum = tbPartNo.Text.Trim();
|
||||
lot = tbVLot.Text.Trim();
|
||||
manu = tbVName.Text.Trim();
|
||||
reelinfo = new Class.Reel
|
||||
{
|
||||
id = rid,
|
||||
lot = lot,
|
||||
manu = manu,
|
||||
venderLot = lot,
|
||||
venderName = manu,
|
||||
mfg = mfg,
|
||||
partnum =partnum,
|
||||
PartNo = partnum,
|
||||
qty = qty,
|
||||
sid = sid,
|
||||
}, true, false);
|
||||
SID = sid,
|
||||
};
|
||||
DialogResult = DialogResult.OK;
|
||||
|
||||
PUB.log.Add($"manual print:{PUB.PrinterR.qrData}");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user