private void btn_Add_Click(object sender, EventArgs e) { frm_Cust f1 = new frm_Cust("add"); f1.Show(); this.Close(); }
private void btn_View_Details_Click(object sender, EventArgs e) { try { int currentID = Convert.ToInt32(dgv_Cust_Find.CurrentRow.Cells[0].Value); frm_Cust f1 = new frm_Cust(currentID, "view"); f1.Show(); } catch (Exception exp) { MessageBox.Show(" you must select Customer first"); } }