Example #1
0
 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);
 }
Example #2
0
 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);
 }
Example #3
0
 //
 // GET: /System/
 public ActionResult Index(string id = "")
 {
     var model = new Dac_User().UserSelect(id).ToList();
     ViewBag.id = id;
     return View(model);
 }