/// <summary> /// Saves the list menu widget. /// </summary> /// <param name="model">The model.</param> /// <returns></returns> public static ListMenuWidgetModel SaveListMenuWidget(ListMenuWidgetModel model) { var widgetService = ServiceLocator.Current.GetInstance<IListMenuWidgetService>(); var widget = model.MapTo(new ListMenuWidget()); widgetService.Save(widget); return new ListMenuWidgetModel().MapFrom(widget); }
/// <summary> /// Saves the list menu widget. /// </summary> /// <param name="model">The model.</param> /// <returns></returns> public static ListMenuWidgetModel SaveListMenuWidget(ListMenuWidgetModel model) { var widgetService = ServiceLocator.Current.GetInstance <IListMenuWidgetService>(); var widget = model.MapTo(new ListMenuWidget()); widgetService.Save(widget); return(new ListMenuWidgetModel().MapFrom(widget)); }
public virtual ActionResult UpdateWidget(ListMenuWidgetModel model) { if (ModelState.IsValid) { model = ListMenuWidgetHelper.SaveListMenuWidget(model); } return PartialView("EditWidget", model); }
public virtual ActionResult UpdateWidget(ListMenuWidgetModel model) { if (ModelState.IsValid) { model = ListMenuWidgetHelper.SaveListMenuWidget(model); } return(PartialView("EditWidget", model)); }