private void refillMachineButtons_Click(object sender, EventArgs e) { ATM a = ATM.GetInstance(); Cash dc = a.CashInDispenser(); Worker w = atMachine as Worker; Cash refillAmt = w.RefillATM(dc); a.Deposit(refillAmt); FillPersonInfo(); UpdateATMInfo(); ChangeTab(ATM.GetInstance().CurrentScreen); }
private void UpdateATMInfo() { ATM a = ATM.GetInstance(); Cash dc = a.CashInDispenser(); Cash rc = a.CashInReceiver(); d20Label.Text = dc.Twenties.ToString(); d10Label.Text = dc.Tens.ToString(); dTotalLabel.Text = dc.Total.ToString(); r100Label.Text = rc.Hundreds.ToString(); r50Label.Text = rc.Fifties.ToString(); r5Label.Text = rc.Fives.ToString(); r1Label.Text = rc.Ones.ToString(); rTotalLabel.Text = rc.Total.ToString(); machineChecks.Items.Clear(); Check[] checks = ATM.GetInstance().CheckInfo(); foreach (Check c in checks) { machineChecks.Items.Add(c); } }