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_deleteCategory", "@id", catID); MainClass.resetDisable(leftpanel); RetrivalData.getCategory(dataGridView1, catIDGV, catGV); } } }
public override void savebtn_Click(object sender, EventArgs e) { if (MainClass.checkControls(leftpanel).Count == 0) { if (edit == 0)//save { insertion.insertCategory(categoryTxt.Text); MainClass.resetDisable(leftpanel); RetrivalData.getCategory(dataGridView1, catIDGV, catGV); } else if (edit == 1)//update { Updates.updateCategory(categoryTxt.Text, catID); MainClass.resetDisable(leftpanel); RetrivalData.getCategory(dataGridView1, catIDGV, catGV); } } else { MessageBox.Show("Please enter all required fields"); } }
public override void viewbtn_Click(object sender, EventArgs e) { RetrivalData.getCategory(dataGridView1, catIDGV, catGV); }