Beispiel #1
0
        public int SaveCompany(Company company, Credential credential)
        {
            credential.CredentialId = _credentialDal.GetNextCompanyId();
            var numberOfJobSeekerAdded  = companyDal.AddCompany(company);
            var numberOfCredentialAdded = _credentialDal.AddCredentials(credential);

            return(numberOfCredentialAdded == 1 &&
                   numberOfJobSeekerAdded == 1
                ? 1 : 0);
        }
Beispiel #2
0
        public bool AddCompany(CompanyBE company)
        {
            CompanyDAL companyDAL = new CompanyDAL();

            if (companyDAL.AddCompany(company))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #3
0
        public bool AddCompany(Company company)
        {
            List <Company> companies = GetCompanies();

            foreach (var item in companies)
            {
                if (item.Name == company.Name)
                {
                    return(false);
                }
            }
            return(companyDal.AddCompany(company));
        }
        public IHttpActionResult AddCompany(CompanyEntity company)
        {
            bool         isAddSuccess = false;
            ResultEntity result       = new ResultEntity();

            try
            {
                isAddSuccess = dal.AddCompany(company.ToCOMPANY());
                result.Data  = company;
            }
            catch (Exception e)
            {
                result.Message = e.Message;
                NtripProxyLogger.LogExceptionIntoFile("调用接口api/Company/AddCompany异常,异常信息为:" + e.Message);
            }

            result.IsSuccess = isAddSuccess;
            return(Json <ResultEntity>(result));
        }
Beispiel #5
0
 /// <summary>
 /// insert
 /// </summary>
 /// <param name="Obejto"></param>
 public void AddCompany(Company Obejto)
 {
     CompDAL.AddCompany(Obejto);
 }