public ActionResult GetMyGroups() { try { var session = new PrivateSession().Current; var groups = PageLangManager.GetGroupsContent(session.CurrentLang.ToString()); return(Json(new { IsSuccess = true, Groups = groups }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { _log.AddError("GetMyGroups", ex.Message); return(Json(new { IsSuccess = false }, JsonRequestBehavior.AllowGet)); } }
// /MyUser/GetMyGroups public ActionResult GetMyGroups() { try { var session = new PrivateSession().Current; var groups = PageLangManager.GetGroupsContent(session.CurrentLang.ToString()); if (session.User == null) { return(Json(new { IsSuccess = true, Groups = groups })); } var subscribedResult = _users.GetSubscribedGroups(session.User.Pk); return(subscribedResult.IsSuccess ? Json(new { IsSuccess = true, Groups = groups, Subscribed = subscribedResult.Data.SubscribedGroups, EmailDelivery = subscribedResult.Data.EmailDelivery, SmsDelivery = subscribedResult.Data.SmsDelivery, PushUpDelivery = subscribedResult.Data.PushUpDelivery }) : Json(new { IsSuccess = false })); } catch (Exception ex) { _log.AddError("[MyUser]/[GetMyGroups]", ex.Message); return(Json(new { IsSuccess = false })); } }
// GET: Modderator public ActionResult Parlour() { ViewData["Groups"] = new JavaScriptSerializer().Serialize(PageLangManager.GetGroupsContent(new PrivateSession().Current.CurrentLang.ToString())); return(View()); }