Exemple #1
0
 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);
         }
     }
 }
Exemple #2
0
 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");
     }
 }
Exemple #3
0
 public override void viewbtn_Click(object sender, EventArgs e)
 {
     RetrivalData.getCategory(dataGridView1, catIDGV, catGV);
 }