public InitWorkFlowOutput Create(OAPerformanceInputDto input) { var model = input.MapTo <OAPerformance>(); model.Status = 0; var ret = _oaPerformanceRepository.Insert(model); return(new InitWorkFlowOutput() { InStanceId = ret.Id.ToString() }); }
public void Update(OAPerformanceInputDto input) { var model = _oaPerformanceRepository.Get(input.Id.Value); if (model != null) { input.Main_id = model.Main_id; input.Title = model.Title; input.MapTo(model); } else { throw new UserFriendlyException((int)ErrorCode.DataAccessErr, "未找到该条数据。"); } var ret = _oaPerformanceRepository.Update(model); }