Ejemplo n.º 1
0
 private void btnAddAct_Click(object sender, EventArgs e)
 {
     if (RBActor.Checked == true)
     {
         if (ControllerObj.Add_Celeb(txtActFname.Text + " " + txtActLName.Text, Int32.Parse(txtActAge.Text), 0) != 0)
         {
             MessageBox.Show("Done");                                                                                                         //the sql will contains if-else //0->Actor
         }
         else
         {
             MessageBox.Show("Failed");
         }
     }
     else if (RBDir.Checked == true)
     {
         if (ControllerObj.Add_Celeb(txtActFname.Text + " " + txtActLName.Text, Int32.Parse(txtActAge.Text), 1) != 0)
         {
             MessageBox.Show("Done");                                                                                                            //the sql will contains if-else //1->Director
         }
         else
         {
             MessageBox.Show("Failed");
         }
     }
     else
     {
         MessageBox.Show("Please choose Actor or Director!");
         return;
     }
     Fill_Commbo();
     Refresh_All();
 }