Пример #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 Order SaveOrder(OrderViewModel model, string role, string orderUrl, string userId)
 {
     return(orderRepo.CreateOrder(model, role, orderUrl, userId));
 }