Beispiel #1
0
        public ActionResult DisplayPromotialMaterials(string Sorting_Order, string Search_Data, string Filter_Value, int?Page_No, string OrderType)
        {
            var materials = hrServices.GetAllMaterials();

            int Size_Of_Page = 10;
            int No_Of_Page   = (Page_No ?? 1);

            PromotialMaterialViewModel pVM = new PromotialMaterialViewModel();

            pVM.Materials  = materials.OrderByDescending(p => p.Id).ToPagedList(No_Of_Page, Size_Of_Page);
            pVM.PageCount  = (int)Math.Ceiling((double)materials.Count() / Size_Of_Page);
            pVM.PageNumber = Page_No ?? 1;

            return(View(pVM));
        }