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();
            }
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            CandidateLogin id = new CandidateLogin();

            id.Show();
        }