void Btn_AddNewCustomer_Click(object sender, EventArgs e) { Frm_CustomerEdit frm = new Frm_CustomerEdit(); frm.ShowDialog(); UpdateCustomers(); }
void Btn_Edit_Click(object sender, EventArgs e) { Frm_CustomerEdit frm = new Frm_CustomerEdit(CUSTOMER_ID); frm.ShowDialog(); frm.Dispose(); UpdateDetails(); }
void Btn_ModCustomer_Click(object sender, EventArgs e) { if (DGV_Customers.SelectedRows.Count > 0) { Frm_CustomerEdit frm = new Frm_CustomerEdit(int.Parse(DGV_Customers.SelectedRows[0].Cells[0].Value.ToString())); frm.ShowDialog(); UpdateCustomers(); } else { MessageBox.Show("Please select a customer!"); } }