public bool Update(FlowTemplate item) { if (item == null) return false; _unitOfWork.FlowTemplateRepository.Edit(item); _unitOfWork.Save(); return true; }
public ActionResult CreateKendo([DataSourceRequest] DataSourceRequest request, FlowTemplate item) { if (item != null && ModelState.IsValid) { _FlowTemplateService.Add(item); } return Json(new[] { item }.ToDataSourceResult(request, ModelState)); }
public ActionResult AddFlow(FlowTemplate item) { if (item != null) { _FlowTemplateService.Add(item); // FlowTemplateID return Json(toFlowTemplatePOCO(item), JsonRequestBehavior.AllowGet); } return Json("{}"); }
public ActionResult Create(FlowTemplate item) { if (ModelState.IsValid) { _FlowTemplateService.Add(item); return RedirectToAction("Index"); } return View(item); }
private FlowTemplatePOCO toFlowTemplatePOCO(FlowTemplate item) { return new FlowTemplatePOCO() { FinalStateID = item.FinalStateID, FlowTemplateID = item.FlowTemplateID, InitialStateID = item.InitialStateID, ParentProcessTemplateID = item.ParentProcessTemplateID, Name = item.Name }; }
public ActionResult DeleteKendo([DataSourceRequest] DataSourceRequest request, FlowTemplate item) { if (item != null) { _FlowTemplateService.DeleteById(item.FlowTemplateID); } return Json(ModelState.ToDataSourceResult()); }
public ActionResult EditKendo([DataSourceRequest] DataSourceRequest request, FlowTemplate item) { if (ModelState.IsValid) { _FlowTemplateService.Update(item); return Json(ModelState.ToDataSourceResult()); } return Json(ModelState.ToDataSourceResult()); }
public bool Add(FlowTemplate item) { _unitOfWork.FlowTemplateRepository.Add(item); _unitOfWork.Save(); return true; }