public ActionResult GetModify(short?Id) { ViewBag.effecttypeEnums = new SelectList(EnumUtils.ConvertEnumToIEnumerable <Radyn.Slider.Definition.Enums.SliderCycleFxType>(), "Key", "Value"); return(PartialView("PVModify", Id.HasValue ? SliderComponent.Instance.SlideFacade.Get(Id) : new Slide())); }
public IActionResult Create(Guid bookId) { ViewBag.Message = ""; ViewBag.Janre = new SelectList(EnumUtils.ConvertEnumToIEnumerable <Janre>(), "Key", "Value"); return(View(new BookPart { BookId = bookId })); }
public ActionResult Index(Guid Id) { ViewBag.HideMenu = true; var html = ContentManagerComponent.Instance.HtmlDesginFacade.Get(Id); ViewBag.OperationList = new SelectList(SessionParameters.UserOperation, "Id", "Title"); ViewBag.PartialTypes = new SelectList(EnumUtils.ConvertEnumToIEnumerable <Enums.PartialTypes>(), "Key", "Value"); ViewBag.LanguageList = CommonComponent.Instance.LanguageFacade.GetValidList(); return(View(html)); }
private void GetValue() { ViewBag.ThemeUrl = CongressComponent.Instance.BaseInfoComponents.ConfigurationFacade.SelectFirstOrDefault(c => c.ThemeColorURL, c => c.CongressId == this.Homa.Id); ViewBag.IntroPages = new SelectList(CongressComponent.Instance.BaseInfoComponents.CongressContentFacade.SelectKeyValuePair(x => x.ContentId, x => x.Content.Title, x => x.CongressId == this.Homa.Id), "Key", "Value"); ViewBag.SupportType = new SelectList(CongressComponent.Instance.BaseInfoComponents.SupportTypeFacade.SelectKeyValuePair(x => x.Id, x => x.Title), "Key", "Value"); ViewBag.Themes = new SelectList(Web.Mvc.UI.Theme.ThemeManager.ThemeList(false)); ViewBag.Slides = new SelectList( CongressComponent.Instance.BaseInfoComponents.CongessSlideFacade.SelectKeyValuePair(x => x.SlideId, x => x.Slide.Title, news => news.CongressId == Homa.Id), "Key", "Value"); ViewBag.Languages = new SelectList(CommonComponent.Instance.LanguageFacade.SelectKeyValuePair(x => x.Id, x => x.DisplayName), "Key", "Value"); ViewBag.ArticlePaymentSteps = new SelectList( EnumUtils.ConvertEnumToIEnumerableInLocalization <Enums.ArticlePaymentSteps>().Select( keyValuePair => new KeyValuePair <byte, string>((byte)keyValuePair.Key.ToEnum <Enums.ArticlePaymentSteps>(), keyValuePair.Value)), "Key", "Value"); ViewBag.Banks = new SelectList( EnumUtils.ConvertEnumToIEnumerable <Radyn.PaymentGateway.Tools.Enums.Bank>().Select( keyValuePair => new KeyValuePair <byte, string>((byte)keyValuePair.Key.ToEnum <Radyn.PaymentGateway.Tools.Enums.Bank>(), keyValuePair.Value)), "Key", "Value"); ViewBag.InformTypes = new SelectList( EnumUtils.ConvertEnumToIEnumerableInLocalization <Enums.UserInformType>().Select( keyValuePair => new KeyValuePair <byte, string>((byte)keyValuePair.Key.ToEnum <Enums.UserInformType>(), keyValuePair.Value)), "Key", "Value"); ViewBag.ArticleCertificateTypes = new SelectList( EnumUtils.ConvertEnumToIEnumerableInLocalization <Enums.ArticleCertificateType>().Select( keyValuePair => new KeyValuePair <byte, string>((byte)keyValuePair.Key.ToEnum <Enums.ArticleCertificateType>(), keyValuePair.Value)), "Key", "Value"); ViewBag.Sections = EnumUtils.ConvertEnumToIEnumerableInLocalization <Enums.PaymentSection>().Select( keyValuePair => new KeyValuePair <byte, string>((byte)keyValuePair.Key.ToEnum <Enums.PaymentSection>(), keyValuePair.Value)).ToList(); ViewBag.ArticleCertificateStatList = new SelectList(EnumUtils.ConvertEnumToIEnumerableInLocalization <Enums.FinalState>().Select( keyValuePair => new KeyValuePair <byte, string>((byte)keyValuePair.Key.ToEnum <Enums.FinalState>(), keyValuePair.Value)).ToList(), "Key", "Value"); ViewBag.Contrainers = new SelectList(CongressComponent.Instance.BaseInfoComponents.CongressContainerFacade.SelectKeyValuePair(x => x.ContainerId, x => x.Container.Title, x => x.CongressId == this.Homa.Id, new OrderByModel <CongressContainer>() { Expression = x => x.Container.Title }), "Key", "Value"); ViewBag.Htmls = new SelectList(CongressComponent.Instance.BaseInfoComponents.CongressHtmlFacade.SelectKeyValuePair(x => x.HtmlDesginId, x => x.HtmlDesgin.Title, x => x.CongressId == this.Homa.Id, new OrderByModel <CongressHtml>() { Expression = x => x.HtmlDesgin.Title }), "Key", "Value"); ViewBag.MenuHtmls = new SelectList(CongressComponent.Instance.BaseInfoComponents.CongressMenuHtmlFacade.SelectKeyValuePair(x => x.MenuHtmlId, x => x.MenuHtml.Title, x => x.CongressId == this.Homa.Id), "Key", "Value"); }
public ActionResult GetFormAssigment(Guid formId) { if (SessionParameters.UserOperation == null) { return(null); } ViewBag.Oprations = new SelectList(SessionParameters.UserOperation, "Id", "Title"); ViewBag.Status = new SelectList( EnumUtils.ConvertEnumToIEnumerable <FormState>().Select( keyValuePair => new KeyValuePair <byte, string>((byte)keyValuePair.Key.ToEnum <FormState>(), keyValuePair.Value)), "Key", "Value"); ViewBag.formId = formId; return(PartialView("PartialViewFormAssigment")); }
// GET: Security/Log public ActionResult Index(string id, string title) { var tracker = new Tracker() { RootId = id }; ViewBag.Operationlist = new SelectList(EnumUtils.ConvertEnumToIEnumerable <OperationLogType>(), "Value", "Value"); if (!string.IsNullOrEmpty(id)) { ViewBag.UserNames = new SelectList( SecurityComponent.Instance.TrackerFacade.GroupBy(new Expression <Func <Tracker, object> >[] { x => x.UserName }, x => x.RootId == id, true).Select(x => x.UserName).ToList()); } ViewBag.Title = title; return(View(tracker)); }
public ActionResult Modify(string PartialId, string CustomId, Guid HtmlDesginId, PageMode pageMode) { PartialLoad partialLoad = new PartialLoad(); switch (pageMode) { case PageMode.Edit: var instanceContentFacade = ContentManagerComponent.Instance.ContentFacade; var instancePartialsFacade = ContentManagerComponent.Instance.PartialsFacade; partialLoad = ContentManagerComponent.Instance.PartialLoadFacade.Get(PartialId, CustomId, HtmlDesginId); partialLoad.Type = partialLoad.PartialId.ToGuid() != Guid.Empty ? Enums.PartialTypes.Modual : Enums.PartialTypes.ContentManager; switch (partialLoad.Type) { case Enums.PartialTypes.ContentManager: partialLoad.Content = instanceContentFacade.Get(partialLoad.PartialId.ToInt()); break; case Enums.PartialTypes.Modual: partialLoad.Partials = instancePartialsFacade.Get(partialLoad.PartialId); partialLoad.OperationId = partialLoad.Partials.OperationId; break; } break; case PageMode.Create: partialLoad.HtmlDesginId = HtmlDesginId; ViewBag.OperationList = new SelectList(SessionParameters.UserOperation, "Id", "Title"); ViewBag.CustomIdList = new SelectList(ContentManagerComponent.Instance.HtmlDesginFacade.ReturnCustomeAttributes(HtmlDesginId), "Key", "Value"); ViewBag.PartialTypes = new SelectList(EnumUtils.ConvertEnumToIEnumerable <Enums.PartialTypes>(), "Key", "Value"); break; } PrepareViewBags(partialLoad, pageMode); return(PartialView("PVModify", partialLoad)); }