//[ValidateInput(false)] public ActionResult Edit(WorkHistorySectionModels model, SubmitType submitType) { var page = base._webPageService.GetById(model.WebPageId); if (submitType == SubmitType.Cancel) { return(Redirect(GetBasePath() + page.VirtualPath)); } if (submitType == SubmitType.Save) { if (!ModelState.IsValid) { ErrorNotification("An error occured during updating."); return(View(model)); } var entity = (WorkHistorySection)_sectionService.GetById(model.Id); entity = model.ToEntity(entity); _sectionService.Update(entity); SuccessNotification("Updated successfully. ", false); } return(View(model)); }
public static WorkHistorySection ToEntity(this WorkHistorySectionModels model, WorkHistorySection destination) { return(model.MapTo(destination)); }
public static WorkHistorySection ToEntity(this WorkHistorySectionModels model) { return(model.MapTo <WorkHistorySectionModels, WorkHistorySection>()); }