예제 #1
0
        //Toutes les recherches sont inclusives et non "strictes" methode contains utilisée au lieu de equals...
        public List<Company> GetCompanyByCriteria(string NameSearchCriteria, string MarketSearchCriteria, string MailSearchCriteria)
        {
            CompanyDAOEntity companyDao = new CompanyDAOEntity();

            if ((!string.IsNullOrEmpty(NameSearchCriteria)) && string.IsNullOrEmpty(MarketSearchCriteria) && string.IsNullOrEmpty(MailSearchCriteria))
            {
                 return companyDao.GetCompanyByName(NameSearchCriteria);
            }
            else if (string.IsNullOrEmpty(NameSearchCriteria) && (!string.IsNullOrEmpty(MarketSearchCriteria)) && string.IsNullOrEmpty(MailSearchCriteria))
            {
                return companyDao.GetAllCompanyByMarket(MarketSearchCriteria);
            }
            else if (string.IsNullOrEmpty(NameSearchCriteria) && string.IsNullOrEmpty(MarketSearchCriteria) && (!string.IsNullOrEmpty(MailSearchCriteria)))
            {
                return companyDao.GetAllCompanyByMail(MailSearchCriteria);
            }
            else
            {
                return companyDao.GetCompanyByCriteria(NameSearchCriteria, MarketSearchCriteria, MailSearchCriteria);
            }
        }
예제 #2
0
 public bool UpdateCompany(Company companyfromVM)
 {
     CompanyDAOEntity companyDao = new CompanyDAOEntity();
     return companyDao.UpdateCompany(companyfromVM);
 }
예제 #3
0
 public List<Company> GetAllCompanyForMarket(string market)
 {
     CompanyDAOEntity companyDao = new CompanyDAOEntity();
     return companyDao.GetAllCompanyForMarket(market);
 }
예제 #4
0
 public Model.Company GetCompagnyByID(int ID)
 {
     CompanyDAOEntity companyDao = new CompanyDAOEntity();
     return companyDao.GetCompagnyByID(ID);
 }
예제 #5
0
 public List<Model.Company> GetAllCompany()
 {
     CompanyDAOEntity companyDao = new CompanyDAOEntity();
        return companyDao.GetAllCompany();
 }