/// <summary> /// Constructor for form, is passed the database and 2 delegates as fields /// </summary> /// <param name="model">the transaction database model passed to this form</param> /// <param name="mt">the delegate to add a transaction to the model</param> /// <param name="ai">the delegate to add an item to a transaction</param> public CashierUI(TransactionDatabase model, MakeTransaction mt, AddItem ai) { InitializeComponent(); database = model; AddItem = ai; AddTransaction = mt; }
private void MakeTransactionToolStripMenuItemClick(object sender, EventArgs e) { MakeTransaction?.Invoke(sender, e); RefreshNeeded?.Invoke(sender, e); }
private void MakeTransactionButtonClick(object sender, EventArgs e) { MakeTransaction?.Invoke(sender, e); RefreshNeeded?.Invoke(sender, e); }
public ConsoleUI(TransactionDatabase transactionModel, MakeTransaction mt, AddItem ai) { TDB = transactionModel; AddItem = ai; AddTransaction = mt; }