Exemple #1
0
 private void splBtnGetByName_Click(object sender, EventArgs e)
 {
     if (txtEdtName.Text != "")
     {
         account.Name = txtEdtName.Text;
         dgvAdminAccount.DataSource = accountBLL.GetByName(account);
     }
     else
     {
         GetAccount();
     }
 }
Exemple #2
0
        public ActionResult Login(string us, string pas)
        {
            if (ModelState.IsValid)
            {
                var result = abll.checkUser(us, Common.MD5Hash.MD5(pas));
                if (result == 1)
                {
                    var user       = abll.GetByName(us);
                    var cusSession = new Account();
                    cusSession.AccountID = user.AccountID;
                    cusSession.Password  = user.Password;
                    Session.Add("ADMIN", cusSession);

                    return(Redirect("/Admin/HomeAd/Index"));
                }
            }

            return(View());
        }