public HttpResponseMessage InsertWorkerGoodRecords(WorkerGoodRecords workerGoodRecords) { workerGoodRecords.Id = Guid.NewGuid(); var result = _workerGoodRecordsService.InsertWorkerGoodRecords(workerGoodRecords); return(result ? toJson(null, OperatingState.Success, "添加成功") : toJson(null, OperatingState.Failure, "添加失败")); }
public bool UpdateWorkerGoodRecords(WorkerGoodRecords workerGoodRecords) { if (workerGoodRecords == null) { throw new ArgumentNullException("workerGoodRecords is null"); } bool result = _workerGoodRecordsRepository.SingleUpdate(workerGoodRecords); return(result); }
public bool InsertWorkerGoodRecords(WorkerGoodRecords workerGoodRecords) { if (workerGoodRecords == null) { throw new ArgumentNullException("workerGoodRecords is null"); } bool result = _workerGoodRecordsRepository.Insert(workerGoodRecords); return(result); }
public HttpResponseMessage UpdateWorkerGoodRecords(WorkerGoodRecords workerGoodRecords) { var result = _workerGoodRecordsService.UpdateWorkerGoodRecords(workerGoodRecords); return(result ? toJson(null, OperatingState.Success, "修改成功") : toJson(null, OperatingState.Failure, "修改失败")); }