public HttpResponseMessage InsertWorkerBlackList(WorkerBlackList workerBlackList) { workerBlackList.Id = Guid.NewGuid(); var result = _workerBlackListService.InsertWorkerBlackList(workerBlackList); return(result ? toJson(null, OperatingState.Success, "添加成功") : toJson(null, OperatingState.Failure, "添加失败")); }
public bool InsertWorkerBlackList(WorkerBlackList workerBlackList) { if (workerBlackList == null || workerBlackList.BlackReason == null || workerBlackList.IDCardType == null || workerBlackList.IDCardNumber == null || workerBlackList.ProjectCode == null || workerBlackList.ContractorOrgCode == null || workerBlackList.OrganizationCode == null) { throw new ArgumentNullException("BlackReason/IDCardType/ProjectCode/ContractorOrgCode/OrganizationCode is null"); } bool result = _workerBlackListRepository.Insert(workerBlackList); return(result); }
public bool DeleteWorkerBlackList(WorkerBlackList workerBlackList) { if (workerBlackList == null) { throw new ArgumentNullException("workerBlackList is null"); } bool result = _workerBlackListRepository.Delete(workerBlackList); return(result); }
public HttpResponseMessage UpdateWorkerBlackList(WorkerBlackList workerBlackList) { var result = _workerBlackListService.UpdateWorkerBlackList(workerBlackList); return(result ? toJson(null, OperatingState.Success, "修改成功") : toJson(null, OperatingState.Failure, "修改失败")); }