Ejemplo n.º 1
0
        public IActionResult LocationOrders(int?LocationID = null, int?SortBy = null)
        {
            ViewBag.SortOptions = GetSortOptions();
            var locations = _locationBL.GetLocations();

            ViewBag.Locations = locations
                                .Select(i => new SelectListItem
            {
                Value = i.LocationID.ToString(),
                Text  = $"{i.LocationName}, {i.State}"
            }).ToList();


            var locationOrdersVM = _orderBL.GetLocationOrdersVM(LocationID, SortBy);

            return(View(locationOrdersVM));
        }