Esempio n. 1
0
 public static Boolean Login(string email, string password)
 {
     //if (email != "" && password != "")//* Email & pswd cannot be empty.
     //{
     if (DataUser.Login(email, password) == false)
     {
         Debug.WriteLine("Email: " + email + "or password are incorrect");
         return(false);
     }
     Debug.WriteLine("User: "******" logged in successfully.");
     return(true);
     //}
     //return false;
 }
Esempio n. 2
0
 private void Ok_Click(object sender, EventArgs e)
 {
     if (DataUser.Login(Login_Access.Text, Pass_Access.Text, out DataUser listUser))
     {
         if (listUser.access_level == 1)
         {
             Connection f_con = new Connection();
             f_con.Show();
         }
         else
         {
             MessageBox.Show("Ваш пользователь не имеет доступа!");
         }
     }
     else
     {
         MessageBox.Show("Неверный логин или пароль!");
     }
 }
Esempio n. 3
0
 private void Ok_Autorization_Click(object sender, EventArgs e)
 {
     if (DataUser.Login(tb_login.Text, tb_password.Text, out DataUser listUser))
     {
         if (listUser.access_level == 1)
         {
             Home_page f_hp = new Home_page();
             f_hp.Show();
             Hide();
         }
         else
         {
             Student_access f_sa = new Student_access();
             f_sa.Show();
             Hide();
         }
     }
     else
     {
         MessageBox.Show("Неверный логин или пароль!");
     }
 }
Esempio n. 4
0
 public bool LoginUser(string user, string pass)
 {
     return(userDAO.Login(user, pass));
 }