コード例 #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_deleteCustomer", "@cID", 0, custID);
             MainClass.resetDisable(leftpanel);
             RetrivalData.getCustomer(dataGridView1, custIDGV, NameGV, phoneGV, addressGV);
         }
     }
 }
コード例 #2
0
 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");
     }
 }
コード例 #3
0
 public override void viewbtn_Click(object sender, EventArgs e)
 {
     RetrivalData.getCustomer(dataGridView1, custIDGV, NameGV, phoneGV, addressGV);
 }