public IList <ProductEntity> GetByHospital(string hospitalId) { var products = new List <ProductEntity>(); var filter = new Dictionary <string, string>(); var list = HospitalProductRepository.GetByHospital(hospitalId); foreach (var item in list) { if (!filter.Keys.Contains(item.ProductId)) { var product = this.Get(item.ProductId); if (product != null) { products.Add(product); } filter.Add(item.ProductId, "Y"); } } return(products); }
public void Save(HospitalProductEntity entity) { HospitalProductRepository.Save(entity); }
public IList <string> GetCategories(string hospitalId) { return(HospitalProductRepository.GetCategories(hospitalId)); }
public IList <HospitalProductEntity> GetByUnit(string unitId) { return(HospitalProductRepository.GetByUnit(unitId)); }
public HospitalProductEntity Get(string unitId, string productId) { return(HospitalProductRepository.Get(unitId, productId)); }