コード例 #1
0
 public JsonResult Create(AliUserType obj)
 {
     obj.Status = 1;
     obj.Type = 0;
     obj.EndOn = DateTime.Now.AddMonths(1);
     obj.BeginOn = DateTime.Now;
     base.Save<AliUserType>(obj);
     return Json(new { IsSuccess = true });
 }
コード例 #2
0
        public ActionResult Login(AliUserType user)
        {

            List<AliUserType> userlist = base.GetList<AliUserType>("UserName", user.UserName, " o.PassWord='******'");
            if (userlist.Count > 0)
            {
                Session["aliUser"] = userlist[0];
                return RedirectToAction("Index", "Home");
            }

            ModelState.AddModelError("Username", "用户名或者密码出错。");
            return View();
        }
コード例 #3
0
 public ActionResult Edit(AliUserType obj)
 {
     base.Update<AliUserType>(obj);
     return Json(new { IsSuccess = true });
 }