public IHttpActionResult SaveBizStep(BizStepsViewModel step) { try { _setting.SaveBizStep(step); } catch (Exception err) { ResMessage.Fail(err.Message); } return(Ok(ResMessage.Success())); }
public BizSteps SaveBizStep(BizStepsViewModel step) { BizSteps bizStep = new BizSteps(); if (step.StepId > 0) { bizStep = this.GetStep(step.StepId); } bizStep.BizItem = this.GetBizItem(step.ItemId); bizStep.StepName = step.StepName; bizStep.SortIndex = step.SortIndex; _context.BizSteps.AddOrUpdate(bizStep); _context.SaveChanges(); return(bizStep); }