public ActionResult Index()
        {
            PagedProduct ProductModel = new PagedProduct();

            ProductModel = Mapper.Map <PagedProduct>(_productservice.GetPagedProductByProductName("", GlobalConst.Records.Skip, GlobalConst.Records.Take));
            ProductModel.PagedRecords = GlobalConst.Records.LandingTake;
            return(View(ProductModel));
        }
        public ActionResult getProducts(int skip)
        {
            PagedProduct ProModel = new PagedProduct();
            var          pro      = _productservice.GetPagedProduct(skip, GlobalConst.Records.Take20);

            ProModel.Products   = Mapper.Map <IEnumerable <Product> >(pro.Products);
            ProModel.TotalCount = pro.TotalCount;
            return(Json(ProModel, GlobalConst.Message.text_html));
        }
        public ActionResult Index()
        {
            PagedProduct ProductModel = new PagedProduct();

            var pro = _productservice.GetPagedProduct(GlobalConst.Records.Skip, GlobalConst.Records.Take20);

            ProductModel.Products   = Mapper.Map <IEnumerable <Product> >(pro.Products);
            ProductModel.TotalCount = pro.TotalCount;
            return(View(ProductModel));
        }
        public ActionResult SearchProduct(string searchText, int?skip)
        {
            PagedProduct ProductModel = new PagedProduct();

            if (searchText == null)
            {
                ProductModel = Mapper.Map <PagedProduct>(_productservice.GetPagedProductByProductName("", skip.Value, GlobalConst.Records.Take));
            }
            else
            {
                ProductModel = Mapper.Map <PagedProduct>(_productservice.GetPagedProductByProductName(searchText, GlobalConst.Records.Skip, GlobalConst.Records.Take));
            }
            ProductModel.PagedRecords = GlobalConst.Records.LandingTake;
            return(Json(ProductModel, GlobalConst.Message.text_html));
        }