예제 #1
0
        public OrderViewModel GetDataForOrderCreate(string userId)
        {
            var user = userRepo.GetUser(userId);

            var model = new OrderViewModel
            {
                Locations   = griddingRepo.GetLocations().Where(l => l.IsActive).ToList(),
                Estates     = griddingRepo.GetEstates().ToList(),
                Products    = orderRepo.GetFFProducts(),
                ISPProducts = ispRepo.GetProducts().Where(u => u.ISPId == user.ISPId).ToList(),
                Discounts   = ispRepo.GetEstateDiscounts(userId)
            };

            return(model);
        }
예제 #2
0
 public List <Estate> GetEstates()
 {
     return(griddingRepo.GetEstates().ToList());
 }