コード例 #1
0
ファイル: LoginController.cs プロジェクト: tomochandv/SND
 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);
 }
コード例 #2
0
ファイル: LoginController.cs プロジェクト: tomochandv/SND
 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);
 }
コード例 #3
0
ファイル: SystemController.cs プロジェクト: tomochandv/SND
 //
 // GET: /System/
 public ActionResult Index(string id = "")
 {
     var model = new Dac_User().UserSelect(id).ToList();
     ViewBag.id = id;
     return View(model);
 }