public ActionResult ServiceList(int CategoryId    = 0, string CategoryName    = "",
                                        int SubCategoryId = 0, string SubCategoryName = "", int source = 0, int pagenumber = 1)
        {
            string currentCurrency = Session["currentCurrency"] != null ? Session["currentCurrency"].ToString() : "Rs. ";
            int    currentCountry  = Session["currentyCountry"] != null?Convert.ToInt32(Session["currentCountry"].ToString()) : 101;

            int currentPage  = pagenumber;
            int fromRecords  = (pagenumber - 1) * 10;
            int toRecords    = fromRecords + 10;
            int totalRecords = 0;

            List <USPGetYPAdsByCountryResponse> finalResult = new List <USPGetYPAdsByCountryResponse>();

            if (SubCategoryId > 0)
            {
                totalRecords = context.Usp_GetYPAdsBySubCategory(SubCategoryId).ToList().Count();
                List <Usp_GetYPAdsBySubCategory_Result> tempList = context.Usp_GetYPAdsBySubCategory(SubCategoryId).Take(30).ToList();
                CloneObjects.CopyPropertiesTo(tempList, finalResult);
            }
            else
            {
                totalRecords = context.Usp_GetYPAdsByCategory(CategoryId).ToList().Count();
                List <Usp_GetYPAdsByCategory_Result> tempList = new List <Usp_GetYPAdsByCategory_Result>();
                tempList = context.Usp_GetYPAdsByCategory(CategoryId).Take(30).ToList();
                CloneObjects.CopyPropertiesTo(tempList, finalResult);
            }



            List <CategoryDropHomeResponse> catDropsHome = new List <CategoryDropHomeResponse>();

            if (Session["CatDrop"] != null)
            {
                catDropsHome = (List <CategoryDropHomeResponse>)Session["CatDrop"];
            }
            else
            {
                catDropsHome       = new CommonController().GetHomeDropdowns();
                Session["CatDrop"] = catDropsHome;
            }
            ViewBag.CatsDrop = catDropsHome;
            List <ServiceCategoriesResponse> serviceDrop = new List <ServiceCategoriesResponse>();

            if (Session["ServiceDrop"] != null)
            {
                serviceDrop = (List <ServiceCategoriesResponse>)Session["ServiceDrop"];
            }
            else
            {
                serviceDrop            = new CommonController().GetServiceCategories();
                Session["ServiceDrop"] = serviceDrop;
            }
            ViewBag.ServiceDrop = serviceDrop;

            List <ServiceSubCategory> SubCats = new List <ServiceSubCategory>();
            SubCategoryListRequest    slrs    = new SubCategoryListRequest();

            slrs.CategoryId = CategoryId;
            var apiResponse = _categoryManagementService.GetServicesSubCategories(slrs);

            SubCats = apiResponse.Response;

            ViewBag.SubCats           = SubCats;
            ViewBag.CategoryId        = CategoryId;
            ViewBag.CategoryName      = CategoryName;
            ViewBag.SubCategoryName   = SubCategoryName;
            ViewBag.SubCategoryId     = SubCategoryId;
            ViewBag.currentCurrency   = currentCurrency;
            ViewBag.TotalRecords      = totalRecords;
            ViewBag.CurrentPageNumber = pagenumber;
            return(View(finalResult));
        }