public virtual ActionResult MergeStyle() { LogI("MergeStyle"); var model = new MergeStyleViewModel(); ViewBag.PartialViewName = PopupContentView; return(View("EditNew", model)); }
public virtual ActionResult Submit(MergeStyleViewModel model) { LogI("Submit, model=" + model); //Save if (ModelState.IsValid) { var wasMerged = false; var errors = model.Validate(); if (!errors.Any()) { IList <MessageString> messages; wasMerged = model.Merge(LogService, Db, Cache, DateHelper.GetAppNowTime(), AccessManager.UserId, out messages); errors.AddRange(messages); } if (!wasMerged) { errors.Each(e => ModelState.AddModelError(e.Key, e.Message)); return(PartialView(PopupContentView, model)); } return(Json(new UpdateRowViewModel(model, "Styles", null, true))); } ViewBag.IsAdd = false; return(PartialView(PopupContentView, model)); }