private void buttonLogin_Click(object sender, EventArgs e) { Login job = new Login(); job.Username = textUserName.Text; job.Password = textPassword.Text; List <CandidateEmployee> AllCandidate = candidatedbhelper.GetAllCandidates(); int count = 0; foreach (CandidateEmployee item in AllCandidate) { if (item.Email == job.Username && item.Epassword == job.Password) { LoginID = item.ECandidateID; count = 1; this.Hide(); CandidatePanal jobopen = new CandidatePanal(); jobopen.Show(); } } if (count != 1) { MessageBox.Show("invalid login"); CandidateLogin cd = new CandidateLogin(); this.Hide(); cd.Show(); } }
private void button1_Click_1(object sender, EventArgs e) { this.Hide(); CandidatePanal cd = new CandidatePanal(); cd.Show(); }