示例#1
0
        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);
        }
示例#2
0
 public void Save(HospitalProductEntity entity)
 {
     HospitalProductRepository.Save(entity);
 }
示例#3
0
 public IList <string> GetCategories(string hospitalId)
 {
     return(HospitalProductRepository.GetCategories(hospitalId));
 }
示例#4
0
 public IList <HospitalProductEntity> GetByUnit(string unitId)
 {
     return(HospitalProductRepository.GetByUnit(unitId));
 }
示例#5
0
 public HospitalProductEntity Get(string unitId, string productId)
 {
     return(HospitalProductRepository.Get(unitId, productId));
 }