Ejemplo n.º 1
0
        public HttpResponseMessage InsertWorkerBlackList(WorkerBlackList workerBlackList)
        {
            workerBlackList.Id = Guid.NewGuid();

            var result = _workerBlackListService.InsertWorkerBlackList(workerBlackList);

            return(result ? toJson(null, OperatingState.Success, "添加成功") : toJson(null, OperatingState.Failure, "添加失败"));
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        public bool DeleteWorkerBlackList(WorkerBlackList workerBlackList)
        {
            if (workerBlackList == null)
            {
                throw new ArgumentNullException("workerBlackList is null");
            }

            bool result = _workerBlackListRepository.Delete(workerBlackList);

            return(result);
        }
Ejemplo n.º 4
0
        public HttpResponseMessage UpdateWorkerBlackList(WorkerBlackList workerBlackList)
        {
            var result = _workerBlackListService.UpdateWorkerBlackList(workerBlackList);

            return(result ? toJson(null, OperatingState.Success, "修改成功") : toJson(null, OperatingState.Failure, "修改失败"));
        }