示例#1
0
        private void Add_Click(object sender, EventArgs e)
        {
            CandidateEmployee obj = new CandidateEmployee();

            obj.EName     = textEName.Text;
            obj.Email     = textEmail.Text;
            obj.Epassword = textEpassword.Text;

            obj.ConfirmPassword  = textConfirmPassword.Text;
            obj.MobileNumber     = textMobileNumber.Text;
            obj.EducationalLevel = textEducationalLevel.Text;
            obj.ExperienceYears  = int.Parse(textExperienceYears.Text);
            obj.CVPath           = textCVPath.Text;
            obj.CoverLetterPath  = textCoverLetterPath.Text;

            if (textEpassword.Text == textConfirmPassword.Text)
            {
                int result = candidatedbhelper.AddCandidate(obj);
                if (result > 0)
                {
                    MessageBox.Show("Registration Sucessfull");
                    this.Hide();
                    CandidateLogin jobopen = new CandidateLogin();
                    jobopen.ShowDialog();
                }
            }
            else
            {
                validations.Text = "* password and conform password do not match";
                textEName.Text   = obj.EName;
            }
        }
示例#2
0
 public ActionResult SignUpCandidate(CandidateEmployee candidate)
 {
     if (ModelState.IsValid)
     {
         int result = candidatedbhelper.AddCandidate(candidate);
         if (result > 0)
         {
             ViewBag.Issuccess = "Registered Successfully";
             ModelState.Clear();
             return(View());
             //return RedirectToAction("Login", "NucesJobAccount");
         }
         else
         {
             ViewBag.Issuccess = "Problem Registering";
             ModelState.Clear();
             return(View());
         }
     }
     else
     {
         ModelState.AddModelError("", "Invalid Data");
         return(View());
     }
 }