//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); } }
public bool UpdateCompany(Company companyfromVM) { CompanyDAOEntity companyDao = new CompanyDAOEntity(); return companyDao.UpdateCompany(companyfromVM); }
public List<Company> GetAllCompanyForMarket(string market) { CompanyDAOEntity companyDao = new CompanyDAOEntity(); return companyDao.GetAllCompanyForMarket(market); }
public Model.Company GetCompagnyByID(int ID) { CompanyDAOEntity companyDao = new CompanyDAOEntity(); return companyDao.GetCompagnyByID(ID); }
public List<Model.Company> GetAllCompany() { CompanyDAOEntity companyDao = new CompanyDAOEntity(); return companyDao.GetAllCompany(); }