public OrderViewModel GetDataForOrderCreate() { var model = new OrderViewModel { Locations = griddingRepo.GetLocations().ToList(), Estates = griddingRepo.GetEstates().ToList(), Products = orderRepo.GetFFProducts(), ISPProducts = ispRepo.GetProducts().ToList() }; return(model); }
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); }