public RedirectResult Login(string id = "", string pwd = "") { string url = "/Login/Index"; LoginModel model = new Dac_User().UserSelectOne(id, pwd); if (model != null && model.email == id) { FormsAuthentication.SetAuthCookie(model.name, true); url = "/Home/Index"; } return Redirect(url); }
public JsonResult Proc(string id = "", string pwd = "") { bool result = false; LoginModel model = new Dac_User().UserSelectOne(id, pwd); if (model != null && model.email == id) { FormsAuthentication.SetAuthCookie(model.name, true); result = true; } return Json(result); }
// // GET: /System/ public ActionResult Index(string id = "") { var model = new Dac_User().UserSelect(id).ToList(); ViewBag.id = id; return View(model); }