Exemple #1
0
        //
        // GET: /ManageDiscount/
        public ActionResult Index(String an, String en, bool?per, int PageSize = PAGE_SIZE, int page = 1, Sorts sb = Sorts.IdUp, Int32 Id = 0)
        {
            //List<OptionManagerDTO> optionsDTOs = _productManagerService.GetAllOptions();
            List <DiscountDTO> discountsDTOs = _discountService.Filter(an, en, per, Id, sb, CurrentLanguage, CurrentCurrency);
            DiscountIndexVM    discounts     = new DiscountIndexVM
            {
                Discounts = discountsDTOs.ToPagedList(page, PageSize),
                filters   = new DiscountFiltersVM
                {
                    ArabicName   = an,
                    EnglishName  = en,
                    PageNum      = page,
                    PageSize     = PageSize,
                    Id           = Id,
                    IsPercentage = per,
                    SortBy       = sb
                }
            };

            return(View(discounts));
        }