Пример #1
0
        public bool InsertSubContractorCertifications(SubContractorCertifications subContractorCertifications)
        {
            if (subContractorCertifications == null)
            {
                throw new ArgumentNullException("subContractorCertifications is null");
            }

            bool result = _subContractorCertificationsRepository.Insert(subContractorCertifications);

            return(result);
        }
Пример #2
0
        public bool DeleteSubContractorCertifications(SubContractorCertifications subContractorCertifications)
        {
            if (subContractorCertifications == null)
            {
                throw new ArgumentNullException("company_employe is null");
            }

            bool result = _subContractorCertificationsRepository.Delete(subContractorCertifications);

            return(result);
        }
        public HttpResponseMessage InsertSubContractorCertifications(SubContractorCertifications subContractorCertifications)
        {
            var obj = _subContractorCertificationsService.GetSubContractorCertificationsByOrganizationCode(subContractorCertifications.OrganizationCode);

            if (obj != null)
            {
                _subContractorCertificationsService.DeleteSubContractorCertifications(obj);
            }
            subContractorCertifications.Id = Guid.NewGuid();
            var result = _subContractorCertificationsService.InsertSubContractorCertifications(subContractorCertifications);

            return(result ? toJson(null, OperatingState.Success, "添加成功") : toJson(null, OperatingState.Failure, "添加失败"));
        }
        public HttpResponseMessage UpdateSubContractorCertifications(SubContractorCertifications subContractorCertifications)
        {
            var result = _subContractorCertificationsService.UpdateSubContractorCertifications(subContractorCertifications);

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