public ActionResult List(SupplyListViewModel model)
        {
            Session[SessionNames.SupplyViewModel] = model;

            model.OrderItemList = CheckoutBL.GetOrderItemsNotInCollectionByLocation(model.LocationID, model.PurchasingGroupCode, base.UserID); //.GetOrderItemsByLocation(model.LocationID);

            var sort1 = GetSortField((PickUpOrderItemSort)model.Sort1);
            var sort2 = GetSortField((PickUpOrderItemSort)model.Sort2);
            model.UserName = this.UserName;

            model.OrderItemList = model.OrderItemList.OrderBy(sort1).ThenBy(sort2).ToList();

            model.SetRules(base.UserID);

            return View(model);
        }
        public ActionResult List()
        {
            SupplyListViewModel model = new SupplyListViewModel();

            if (Session[SessionNames.SupplyViewModel] != null)
            {
                model = Session[SessionNames.SupplyViewModel] as SupplyListViewModel;
            }
            else
            {
                List<UserLocationDO> userLocationInfo = UserLocationBL.GetUserLocationByUser(this.UserName);
                if (userLocationInfo != null && userLocationInfo.Count > 0)
                {
                    List<int> packagingLocationIDlist = userLocationInfo.Select(x => x.LocationID).ToList();
                    LocationDO firstPriortyLoc = LocationBL.GetAllCollectionLocation().Where(x => packagingLocationIDlist.Contains(x.ID)).OrderBy(x => x.Priority).ToList().FirstOrDefault();
                    if (firstPriortyLoc != null)
                    {
                        model.LocationID = firstPriortyLoc.ID;
                    }
                    else
                    {
                        model.LocationID = 0;
                    }
                }
                else
                {
                    model.LocationID = LocationBL.GetFirstPriorityLocation().ID;
                }

                model.Sort1 = (int)PickUpOrderItemSort.Marka;
                model.Sort2 = (int)PickUpOrderItemSort.Tip;
            }

            model.UserName = this.UserName;
            model.SetRules(base.UserID);
            model.PrivilegedLocationIDList = GetPrivilegedLocationIDList();
            return List(model);
        }