Esempio n. 1
0
        public ActionResult AdSearch(int CategoryId, int PageNumber)
        {
            ViewBag.CategoryId = CategoryId;

            int outTotalPageNumber = 0;

            ViewBag.CurrentPageNumber = PageNumber;
            InformationServiceWrapper objservice  = new InformationServiceWrapper();
            List <AdDetailsModel>     LisModelObj = new List <AdDetailsModel>();

            LisModelObj = objservice.SPRRGetADbyCategory(CategoryId, PageNumber, out outTotalPageNumber);


            foreach (AdDetailsModel item in LisModelObj)
            {
                if (item.Category == "Fruit" || item.Category == "Handloom" || item.Category == "Equipment" || item.Category == "Vegetable" || item.Category == "Others")
                {
                    item.Category = item.txtSubCategoryName;
                }
            }

            ViewBag.TotalPageNumber = outTotalPageNumber;
            ViewBag.Adlist          = LisModelObj;
            ViewBag.SearchData      = CategoryId;
            return(View("AdSearch"));
        }
Esempio n. 2
0
        public ActionResult _AdSearchCategory(int Category, int PageNumber)
        {
            int outTotalPageNumber = 0;

            ViewBag.CurrentPageNumber = PageNumber;
            InformationServiceWrapper objservice  = new InformationServiceWrapper();
            List <AdDetailsModel>     LisModelObj = new List <AdDetailsModel>();

            LisModelObj             = objservice.SPRRGetADbyCategory(Category, PageNumber, out outTotalPageNumber);
            ViewBag.TotalPageNumber = outTotalPageNumber;
            ViewBag.Adlist          = LisModelObj;

            ViewBag.SearchOption = "CATEGORY";
            ViewBag.SearchData   = Category;
            return(PartialView("_AdSearch"));
        }