public ActionResult Login(string UserName, string UserPwd) { JObject data = new JObject(); string md5Pwd = ITOrm.Utility.Encryption.EncryptionHelper.MD5_32(UserPwd); data["msg"] = ""; var result = adminUserDao.Single(" UserName=@UserName and Password=@md5Pwd ", new { UserName, md5Pwd }); if (result == null) { data["msg"] = "登录失败"; } else if (result != null && result.State < 0) { data["msg"] = "账户已冻结"; } else { Session["AdminUser"] = result; return(RedirectToAction("Index", "Home")); } return(View(data)); }