Ejemplo n.º 1
0
 public ActionResult CheckForAction()
 {
     if (Session["action"] != null)
     {
         ActionModel result = new ActionModel();
         result.Action = (Session["action"] as ActionModel).Action;
         result.ActivityDate = (Session["action"] as ActionModel).ActivityDate;
         result.ActivityKey = (Session["action"] as ActionModel).ActivityKey;
         result.NumberOfAdults = (Session["action"] as ActionModel).NumberOfAdults;
         result.NumberOfChildren = (Session["action"] as ActionModel).NumberOfChildren;
         result.ReturnURL = (Session["action"] as ActionModel).ReturnURL;
         result.Time = (Session["action"] as ActionModel).Time;
         return Json(result,JsonRequestBehavior.AllowGet);
     }
     else
     {
         return Json(new ActionModel(), JsonRequestBehavior.AllowGet);
     }
 }
Ejemplo n.º 2
0
 public ActionResult StoreAction(string userAction, string returnURL, string activityKey)
 {
     ActionModel actionModel = new ActionModel();
     actionModel.Action = userAction;
     actionModel.ReturnURL = returnURL;
     actionModel.ActivityKey = activityKey;
     Session.Add("action", actionModel);
     return Json(true, JsonRequestBehavior.AllowGet);
 }