public override void edit_button_Click(object sender, EventArgs e) { if (name_textBox.Text == "" || phone_number_textBox.Text == "" || email_textBox.Text == "" || password_textBox.Text == "") { MainClass.ShowMsg("Please enter a record to edit.", "error"); MainClass.disbale_reset(left_panel_sample2); enable_crude_buttons(); } else { edit = 1; temp_name = name_textBox.Text; temp_phone = phone_number_textBox.Text; temp_password = password_textBox.Text; temp_mail = email_textBox.Text; temp_status = status_comboBox.Text; save_button.Enabled = true; add_button.Enabled = false; MainClass.enable(left_panel_sample2); } }
public override void edit_button_Click(object sender, EventArgs e) { if (supplier_name_textBox.Text == "" || contact_person_textBox.Text == "" || phone1_textBox.Text == "" || address_textBox_suppliers.Text == "" || NTN_textBox.Text == "" || supplier_status_comboBox.SelectedIndex == -1) { MainClass.ShowMsg("Please enter a record to edit.", "error"); MainClass.disbale_reset(left_panel_sample2); enable_crude_buttons(); } else { edit = true; save_button.Enabled = true; add_button.Enabled = false; MainClass.enable(left_panel_sample2); } }