/////////////////////////////////////////////////////////////////////////////////////////Buttons Customer private void btEditCustomer_Click_1(object sender, EventArgs e)//editbuttonCus //WORKS { if (listViewCust.SelectedItems.Count > 0) { int outcome = 1; int.TryParse(listViewCust.SelectedItems[0].Name, out outcome); Customer customer = Program.db.Customers.Find(outcome); EditCustomer customeredit = new EditCustomer(customer); customeredit.Show(); } }
private void btAddCustomers_Click(object sender, EventArgs e)//addbuttonCus //WORKS { EditCustomer customEdit = new EditCustomer(); customEdit.Show(); }