protected override DriverResult Display(FaqWidgetAjaxPart part, string displayType, dynamic shapeHelper) { var types = _faqTypeService.GetFaqTypes(); return(ContentShape("Parts_FaqWidgetAjax", () => shapeHelper.Parts_FaqWidgetAjax( FaqTypes: types))); }
protected override DriverResult Display(FaqWidgetPart part, string displayType, dynamic shapeHelper) { var types = _faqTypeService.GetFaqTypes(); var faqs = _faqService.GetLastFaqs(null, null); return(ContentShape("Parts_FaqWidget", () => shapeHelper.Parts_FaqWidget( FaqTypes: types, Faqs: faqs))); }
private EditFaqViewModel BuildEditorViewModel(FaqPart part) { var avm = new EditFaqViewModel { Question = part.Question, FaqTypes = _faqTypeService.GetFaqTypes(false) }; if (part.FaqTypeId > 0) { avm.FaqType = part.FaqTypeId; } return(avm); }