private void pbInvoice_Click(object sender, EventArgs e) { Scanner scan = new Scanner("Scan Invoice Number."); if (scan.ShowDialog() == DialogResult.OK) { CERPInventory.Invoice = scan.tbBarcode.Text; tbInvoice.Text = CERPInventory.Invoice; } }
private void pbMatLot_Click(object sender, EventArgs e) { Scanner scan = new Scanner("Scan Material Lot Number."); if (scan.ShowDialog() == DialogResult.OK) { CERPInventory.MatLot = scan.tbBarcode.Text; tbMatLot.Text = CERPInventory.MatLot; } }
// Save a reference to the form so it can // be notified when messages are received. public MsgWindow(Scanner msgform) { this.msgform = msgform; }
private void pbDetails_Click(object sender, EventArgs e) { if (!has_item) { MessageBox.Show("No item was scanned yet."); Scanner scan = new Scanner("Scan Item Barcode"); if (scan.ShowDialog() == DialogResult.OK) { CERPInventory.BarCode = scan.tbBarcode.Text; if (GetItemDetails() > 0) { has_item = true; Details det = new Details(); det.ShowDialog(); } } } else { Details det = new Details(); det.ShowDialog(); } }