private void btnModifyCustomer_Click(object sender, EventArgs e) { var selectedCustomer = (Customer)dgCustomers.SelectedRows[0].DataBoundItem; var modifyCustomerForm = new CustomerDetail(DetailMode.Modify, this, AddressRepo, CustomerRepo, selectedCustomer); modifyCustomerForm.Show(); }
private void btnGoToCustomer_Click(object sender, EventArgs e) { var customer = CustomerRepo.GetCustomer(AppointmentToModify.CustomerId); var modifyCustomerForm = new CustomerDetail(DetailMode.Modify, Dashboard, AddressRepo, CustomerRepo, customer); modifyCustomerForm.Show(); }
private void btnAddCustomer_Click(object sender, EventArgs e) { var addCustomerForm = new CustomerDetail(DetailMode.Add, this, AddressRepo, CustomerRepo); addCustomerForm.Show(); }