public ActionResult ShowRandomFaq() { carrot_FaqItem model = new carrot_FaqItem(); FaqPublic payload = new FaqPublic(); if (this.WidgetPayload is FaqPublic) { payload = (FaqPublic)this.WidgetPayload; payload.LoadData(); } ModelState.Clear(); if (payload.FaqCategoryID != Guid.Empty) { model = payload.GetRandomItem(); } if (String.IsNullOrEmpty(payload.AlternateViewFile)) { return PartialView("FaqItem", model); } else { return PartialView(payload.AlternateViewFile, model); } }
public ActionResult ShowFaqList() { FaqItems model = new FaqItems(); FaqPublic payload = new FaqPublic(); if (this.WidgetPayload is FaqPublic) { payload = (FaqPublic)this.WidgetPayload; payload.LoadData(); } ModelState.Clear(); if (payload.FaqCategoryID != Guid.Empty) { model.Faq = payload.GetFaq(); model.Items = payload.GetList(); } if (String.IsNullOrEmpty(payload.AlternateViewFile)) { return PartialView("FaqList", model); } else { return PartialView(payload.AlternateViewFile, model); } }