Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        public bool AddCompany(CompanyBE company)
        {
            CompanyDAL companyDAL = new CompanyDAL();

            if (companyDAL.AddCompany(company))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 4
0
        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));
        }
Ejemplo n.º 5
0
 /// <summary>
 /// insert
 /// </summary>
 /// <param name="Obejto"></param>
 public void AddCompany(Company Obejto)
 {
     CompDAL.AddCompany(Obejto);
 }