private void deleteToolStripMenuItem3_Click(object sender, EventArgs e) { frm_Find_Cust form_Search_Customer = new frm_Find_Cust(); form_Search_Customer.ShowDialog(); }
private void btn_save_Click(object sender, EventArgs e) { try { if (edit_or_add == "add") { Boolean PK_Test = primary_Test(); // first if ::: must enter ID and First name at least if (string.IsNullOrWhiteSpace(txt_ID.Text) || string.IsNullOrWhiteSpace(txt_Name.Text)) { MessageBox.Show("you must enter ID and First name at least"); } else { if (PK_Test == true) { MessageBox.Show("This ID Is Already Exist"); } else { try { most_inseert(); phone(); MessageBox.Show("Saved"); this.Close(); frm_Find_Cust f = new frm_Find_Cust(); f.Show(); } catch (Exception exp) { MessageBox.Show(exp.Message); } } } } else if (edit_or_add == "edit") { try { most_edit(); //delete and then insert Delete_All_Phones(); // insertohm mn 2wel w gdeed phone(); MessageBox.Show("Edited"); this.Close(); frm_Find_Cust f = new frm_Find_Cust(); f.Show(); } catch (Exception exp) { MessageBox.Show(exp.Message); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void button1_Click_1(object sender, EventArgs e) { frm_Find_Cust form_Search_Customer = new frm_Find_Cust(); form_Search_Customer.ShowDialog(); }