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 }); }
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(); }
public ActionResult Edit(AliUserType obj) { base.Update<AliUserType>(obj); return Json(new { IsSuccess = true }); }