public override void deletebtn_Click(object sender, EventArgs e) { if (delStatus == 1) { DialogResult dr = MessageBox.Show("Want to delete this record?", "Question.", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dr == DialogResult.Yes) { Deletion.deleteData("st_deleteCustomer", "@cID", 0, custID); MainClass.resetDisable(leftpanel); RetrivalData.getCustomer(dataGridView1, custIDGV, NameGV, phoneGV, addressGV); } } }
public override void savebtn_Click(object sender, EventArgs e) { if (MainClass.checkControls(leftpanel).Count == 0) { if (edit == 0)//save { insertion.insertCustomer(nameTxt.Text, phoneTxt.Text, addressTxt.Text); MainClass.resetDisable(leftpanel); RetrivalData.getCustomer(dataGridView1, custIDGV, NameGV, phoneGV, addressGV); } else if (edit == 1)//update { Updates.updateCustomer(custID, nameTxt.Text, phoneTxt.Text, addressTxt.Text); MainClass.resetDisable(leftpanel); RetrivalData.getCustomer(dataGridView1, custIDGV, NameGV, phoneGV, addressGV); } } else { MessageBox.Show("Please enter all required fiels"); } }
public override void viewbtn_Click(object sender, EventArgs e) { RetrivalData.getCustomer(dataGridView1, custIDGV, NameGV, phoneGV, addressGV); }