// [Authorize] public ActionResult AchievementState(FormCollection formCollection) { //if ((String)Session["UserId"] != (String)formCollection["userid"]) // return Json(false); var localAchievements = Newtonsoft.Json.JsonConvert.DeserializeObject<AchievementStateDto[]>(formCollection["localachievementstate"]); var svc = new AchievementsService(new SessionManager()); return Json(svc.UploadAchievementState(formCollection["userid"], localAchievements)); }
public ActionResult AchievementState(String id, String lastUpdated) { if (String.IsNullOrEmpty(id)) return Redirect("~/Home"); if (String.IsNullOrEmpty(lastUpdated)) return Redirect("~/Home"); var svc = new AchievementsService(new SessionManager()); return Json(svc.GetAchievementState(id, DateTime.Parse(lastUpdated, CultureInfo.InvariantCulture.DateTimeFormat)), JsonRequestBehavior.AllowGet); }
public ActionResult AchievementDefinitions(String lastUpdated) { var svc = new AchievementsService(new SessionManager()); return Json(svc.GetAchievementDefinitions(DateTime.Parse(lastUpdated, CultureInfo.InvariantCulture.DateTimeFormat)), JsonRequestBehavior.AllowGet); }