Beispiel #1
0
 private void btnModify_Click(object sender, EventArgs e)
 {
     if (checkBoxGrup.Checked == true && checkBoxProvenienta.Checked == true)
     {
         Panel_Modifica.BringToFront();
     }
     else
     if (checkBoxGrup.Checked == false && checkBoxProvenienta.Checked == true)
     {
         Panel_Modifica2.BringToFront();
     }
     else
     if (checkBoxGrup.Checked == true && checkBoxProvenienta.Checked == false)
     {
         Panel_Modifica3.BringToFront();
     }
     else
     {
         checkBoxGrup.ForeColor        = Color.Red;
         checkBoxProvenienta.ForeColor = Color.Red;
     }
 }
Beispiel #2
0
 private void btnModify_Click(object sender, EventArgs e)
 {
     if (checkBoxGrup.Checked == true && checkBoxProvenienta.Checked == true)
     {
         checkBoxGrup.SendToBack();
         checkBoxProvenienta.SendToBack();
         btnCauta.SendToBack();
         lblNume1.SendToBack();
         lblPrenume1.SendToBack();
         txtPrenume1.SendToBack();
         txtNume1.SendToBack();
         label1.SendToBack();
         btnModifica.SendToBack();
         btnModificaPers.SendToBack();
         Agenda persoana1 = adminPersoane.GetPersoana(txtNume1.Text, txtPrenume1.Text);
         persoana1.DataActualizare = DateTime.Now;
         using (Forma_Destinatie frmDest = new Forma_Destinatie(persoana1))
         {
             var dr = frmDest.ShowDialog(this);
             frmDest.Close();
         }
     }
     else
     if (checkBoxGrup.Checked == false && checkBoxProvenienta.Checked == true)
     {
         Panel_Modifica2.BringToFront();
     }
     else
     if (checkBoxGrup.Checked == true && checkBoxProvenienta.Checked == false)
     {
         Panel_Modifica3.BringToFront();
     }
     else
     {
         checkBoxGrup.ForeColor        = Color.Red;
         checkBoxProvenienta.ForeColor = Color.Red;
     }
 }