Ejemplo n.º 1
0
 public ActionResult UpdateInfo()
 {
     if (Session["id"] != null)
     {
         ViewBag.Info = UserAction.Find((string)Session["id"]);
         return(View());
     }
     else
     {
         return(Redirect("~/Home/Index"));
     }
 }
Ejemplo n.º 2
0
 public ActionResult Login(string Id_Number, string Password)
 {
     if (UserAction.CheckLogin(Id_Number, Password) != null)
     {
         var user = UserAction.Find(Id_Number);
         Session["id"]   = user.id_number;
         Session["role"] = user.role;
         Session["name"] = user.sub_name + " " + user.name;
         Session.Timeout = 24;
         return(Redirect("~/Home/Index"));
     }
     else
     {
         return(Redirect("~/"));
     }
 }
Ejemplo n.º 3
0
 public JsonResult AllInfo(string Id)
 {
     return(Json(UserAction.Find(Id), JsonRequestBehavior.AllowGet));
 }