void EditClick(object sender, EventArgs e) { GF.selected_id = Convert.ToInt32(btn_dgv.DGV.SelectedRows[0].Cells["customer_id"].Value); using (customer_manage managePage = new customer_manage()) { managePage.Owner = this; managePage.manage_btn.Text = "UPDATE"; managePage.Text = "EDIT CUSTOMER"; managePage.ShowDialog(); } }
void AddClick(object sender, EventArgs e) { GF.selected_id = 0; using (customer_manage managePage = new customer_manage()) { managePage.Owner = this; managePage.manage_btn.Text = "ADD"; managePage.Text = "ADD CUSTOMER"; managePage.history_btn.Visible = false; managePage.membercard_btn.Visible = false; managePage.ShowDialog(); } }