public void LoadUser(object sender, LoginEventArgs e) { _user = e.User; _user.LoadCardsLocal(); FlierKey = _user.Cards[0][0]; var gateway = new CardsGateway(); var units = gateway.GetUnits(_user.ID, Database.Instance); foreach (var item in units) { UnitsBox.Add(item); } }
private void ClearButton_Click(object sender, EventArgs e) { DialogResult input = new Msg().Question("Confirm action?"); if (input == DialogResult.Yes) { ClearButton.Text = "Clear"; PriceLabel.Text = "Total"; OrderList.Rows.Clear(); UnitsBox.Clear(); TotalPriceBox.Clear(); PayButton.Enabled = true; AddItem.Enabled = true; QuantityButton.Enabled = true; } }