public ActionResult GetOperationPartialList(Enums.PartialTypes PartialTypeId, Guid?OperationId, string Culture) { if (string.IsNullOrEmpty(Culture)) { Culture = SessionParameters.Culture; } List <Partials> customeIdpartials = null; switch (PartialTypeId) { case Enums.PartialTypes.ContentManager: if (SessionParameters.CurrentCongress != null) { customeIdpartials = CongressComponent.Instance.BaseInfoComponents.CongressHtmlFacade.GetWebDesignContent(SessionParameters.CurrentCongress.Id, Culture); } else { customeIdpartials = ContentManagerComponent.Instance.PartialsFacade.GetContentPartials(Culture); } break; case Enums.PartialTypes.Modual: if (OperationId.HasValue) { customeIdpartials = ContentManagerComponent.Instance.PartialsFacade.GetOperationPartials((Guid)OperationId); } break; } return(PartialView("PVOperationPartial", customeIdpartials)); }
public ActionResult GetOperationPartialListJson(Enums.PartialTypes PartialTypeId, Guid?OperationId, string Culture) { try { if (string.IsNullOrEmpty(Culture)) { Culture = SessionParameters.Culture; } List <Partials> customeIdpartials = null; switch (PartialTypeId) { case Enums.PartialTypes.ContentManager: if (SessionParameters.CurrentCongress != null) { customeIdpartials = CongressComponent.Instance.BaseInfoComponents.CongressHtmlFacade.GetWebDesignContent(SessionParameters.CurrentCongress.Id, Culture); } else { customeIdpartials = ContentManagerComponent.Instance.PartialsFacade.GetContentPartials(Culture); } break; case Enums.PartialTypes.Modual: if (OperationId.HasValue) { customeIdpartials = ContentManagerComponent.Instance.PartialsFacade.GetOperationPartials((Guid)OperationId); } break; } object obj = new object(); List <object> result = new List <object>(); foreach (var item in customeIdpartials) { obj = new { Id = item.StringId, Name = item.Title }; result.Add(obj); } return(Json(result, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(null); } }
public ActionResult LookUpHtml(Enums.PartialTypes type, string partialId) { Partials partials = new Partials(); switch (type) { case Enums.PartialTypes.ContentManager: { partials.Html = ContentManagerComponent.Instance.ContentFacade.GetHtml(partialId.ToInt(), SessionParameters.Culture); partials.Type = Enums.PartialTypes.ContentManager; break; } case Enums.PartialTypes.Modual: { partials = ContentManagerComponent.Instance.PartialsFacade.Get(partialId); partials.Type = Enums.PartialTypes.Modual; break; } } return(PartialView("PVViewPartialHtml", partials)); }