public ActionResult CalendarDisplay(CalendarViewModel model) { CalendarViewSettings settings = new CalendarViewSettings(); if (!String.IsNullOrEmpty(model.SerialSettings)) { settings = model.GetSettings(); model.AssignSettings(settings); } else { CalendarDisplaySettings payload = new CalendarDisplaySettings(); if (this.WidgetPayload is CalendarDisplaySettings) { payload = (CalendarDisplaySettings)this.WidgetPayload; payload.LoadData(); settings = model.ConvertSettings(payload); model.AssignSettings(settings); model.SetSettings(payload); } } ModelState.Clear(); model.LoadData(settings.SiteID, true); if (String.IsNullOrEmpty(settings.AlternateViewFile)) { return PartialView(model); } else { return PartialView(settings.AlternateViewFile, model); } }
public ActionResult Index(CalendarViewModel model) { if (ModelState.IsValid) { ModelState.Clear(); model.LoadData(this.SiteID, false); } return View(model); }
public ActionResult CalendarDisplaySimple(CalendarViewModel model) { CalendarSimpleSettings settings = new CalendarSimpleSettings(); if (this.WidgetPayload is CalendarSimpleSettings) { settings = (CalendarSimpleSettings)this.WidgetPayload; settings.LoadData(); model.SiteID = settings.SiteID; model.AlternateViewFile = settings.AlternateViewFile; } ModelState.Clear(); model.LoadData(model.SiteID, true); if (String.IsNullOrEmpty(model.AlternateViewFile)) { return PartialView(model); } else { return PartialView(model.AlternateViewFile, model); } }