// GET: DashBoard/AccomodationType
        public ActionResult Index(string searchTerm, int?accomodationTypeID, int?page)
        {
            AccomodationPackagesListingViewModel model = new AccomodationPackagesListingViewModel();

            //var dummyItems = Enumerable.Range(1, 150).Select(x => "Item " + x);



            //model.AccomodationPackages = accomodationPackageService.GetAllAccomodationPackages();
            model.AccomodationPackages = accomodationPackageService.SearchAccomodationPackages(searchTerm, accomodationTypeID);
            model.totalRecord          = model.AccomodationPackages.Count();

            //pagination logic start from here
            var pager = new Pager(model.totalRecord, page);

            model.AccomodationPackages =
                model.AccomodationPackages.Skip((pager.CurrentPage - 1) * pager.PageSize).Take(pager.PageSize).ToList();

            model.SearchTerm         = searchTerm;
            model.AccomodationTypes  = accomodationTypesService.GetAllAccomodationTypes();
            model.AccomodationTypeID = accomodationTypeID;
            model.pager = pager;



            return(View(model));
        }
        public ActionResult Listing()
        {
            AccomodationPackagesListingViewModel model = new AccomodationPackagesListingViewModel();

            model.AccomodationPackages = accomodationPackageService.GetAllAccomodationPackages();
            return(PartialView("_Listing", model));
        }
        // GET: Dashboard/AccomodationPackages
        public ActionResult Index(string searchTerm, int?accomodationTypeId, int?pageNo)
        {
            int recordSize = 5;

            pageNo = pageNo ?? 1;

            AccomodationPackagesListingViewModel model = new AccomodationPackagesListingViewModel();

            model.AccomodationTypeId = accomodationTypeId;

            model.AccomodationPackages = accomodationPackageService.SearchAccomodationPackages(searchTerm, accomodationTypeId, pageNo.Value, recordSize);
            model.AccomodationTypes    = accomodationTypeService.GetAllAccomodationTypes();

            var totalRecords = accomodationPackageService.SearchAccomodationPackagesCount(searchTerm, accomodationTypeId);

            model.Pager = new Pager(totalRecords, pageNo, recordSize);

            return(View(model));
        }