Esempio n. 1
0
        private void Login()
        {
            if (txtUsername.Text.Trim() == string.Empty)
            {
                MessageBox.Show("Username is required", "Message");
            }
            else if (txtPassword.Text.Trim() == string.Empty)
            {
                MessageBox.Show("Password is required", "Message");
            }
            else
            {
                CheckLoginDto checkedLogin = new CheckLoginDto();
                DALCheckedLogin checkedLoginAPI = new DALCheckedLogin();
                checkedLogin = checkedLoginAPI.CheckedLogin(txtUsername.Text.Trim(), txtPassword.Text.Trim());
                if (!checkedLogin.IsSuccess)
                {
                    MessageBox.Show(checkedLogin.Message, "Message");
                    return;
                }
                this.Hide();
                CRMain frm = new CRMain();
                frm.Show();
                //frm.ShowDialog();

            }
        }
 public CheckLoginDto CheckedLogin(string username, string password)
 {
     DALCheckedLogin checkedLoginDAL = new DALCheckedLogin();
     return checkedLoginDAL.CheckedLogin(username, password);
 }
        public CheckLoginDto CheckedLogin(string username, string password)
        {
            DALCheckedLogin checkedLoginDAL = new DALCheckedLogin();

            return(checkedLoginDAL.CheckedLogin(username, password));
        }