private void btnBack_Click(object sender, RoutedEventArgs e)
 {
     View.wCandidatMenu pg = new View.wCandidatMenu(candidate);
     pg.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
     pg.Show();
     this.Close();
 }
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            List <string> lstString = new List <string>();

            if ((tb1.Text == "") || (tb2.Text == "") || (tb3.Text == "") || (tb4.Text == "") || (tb5.Text == "") || (tb6.Text == "") || (tb7.Text == "") || (tb8.Text == "") || (tb9.Text == "") || (tb10.Text == ""))
            {
                MessageBox.Show("Veuillez renseigner tous les champs");
            }
            else
            {
                lstString.Add(tb1.Text);
                lstString.Add(tb2.Text);
                lstString.Add(tb3.Text);
                lstString.Add(tb4.Text);
                lstString.Add(tb5.Text);
                lstString.Add(tb6.Text);
                lstString.Add(tb7.Text);
                lstString.Add(tb8.Text);
                lstString.Add(tb9.Text);
                lstString.Add(tb10.Text);


                candidate.LstInfoCandidate = lstString;

                candidate.SaveInfoInBase();

                View.wCandidatMenu pg = new View.wCandidatMenu(candidate.Test_Game.Candidate);
                pg.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
                pg.Show();
                this.Close();
            }
        }
示例#3
0
 private void btnCandidate_Click(object sender, RoutedEventArgs e)
 {
     if ((tbLogin.Text == "Login") || (tbLogin.Text == ""))
     {
         MessageBox.Show("Veuillez renseigner un nom d'utilisateur");
     }
     else
     {
         Model.Candidate candidate = new Model.Candidate(vmStart.lstjobs);
         candidate.Surname = tbLogin.Text;
         View.wCandidatMenu pg = new View.wCandidatMenu(candidate);
         pg.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
         pg.Show();
         this.Close();
     }
 }