Пример #1
0
        public ActionResult GetfilteredAds(string State, string District, string Mandal, string CategoryId, string Keyword)
        {
            int TotalPageNumber = 0;

            InformationServiceWrapper objservice = new InformationServiceWrapper();
            DropDownWrapperModel      ModelObj   = new DropDownWrapperModel();

            ModelObj             = objservice.GetDropDownValues();
            ViewBag.DistrictLIst = ModelObj.District;
            ViewBag.MandalList   = ModelObj.Mandal;

            AdFilterModel Model = new AdFilterModel();

            Model.txtState    = State == ""?null:State;            // form["ddlStateText"];
            Model.txtDistrict = District == "" ? null : District;; //form["ddlDistrict"];
            Model.txtMandal   = Mandal == "" ? null :Mandal;       // form["ddlMandal"];
            Model.CategoryId  = Convert.ToInt32(CategoryId);       //Convert.ToInt32(form["ddlCategory"]);
            Model.TxtKeyWord  = Keyword == "" ? null :Keyword;     //form["txtSearchWord"];

            List <AdDetailsModel> LisModelObj = new List <AdDetailsModel>();

            LisModelObj             = objservice.GetfilteredAds(Model, out TotalPageNumber);
            ViewBag.Adlist          = LisModelObj;
            ViewBag.TotalPageNumber = TotalPageNumber;

            return(View("FilteredAds"));
        }
Пример #2
0
        public ActionResult _AdSearch(string State, string District, string DistrictId, string Mandal, string MandalId, string CategoryId, Int32 PageNumber)
        {
            int TotalPageNumber = 0;

            ViewBag.CurrentPageNumber = PageNumber;

            InformationServiceWrapper objservice = new InformationServiceWrapper();

            AdFilterModel Model = new AdFilterModel();

            Model.txtState    = State == "" ? null : State;       //form["ddlStateText"];
            Model.txtDistrict = District == "" ? null : District; //form["ddlDistrict"];
            Model.txtMandal   = Mandal == "" ? null : Mandal;     //form["ddlMandal"];
            Model.CategoryId  = Convert.ToInt32(CategoryId);      //form["ddlCategory"];
            // Model.TxtKeyWord = Keyword == "" ? null : Keyword; //form["txtSearchWord"];
            Model.INTPAGENUMBER = PageNumber;
            Model.INTPAGESIZE   = 10;
            List <AdDetailsModel> LisModelObj = new List <AdDetailsModel>();

            LisModelObj             = objservice.GetfilteredAds(Model, out TotalPageNumber);
            ViewBag.Adlist          = LisModelObj;
            ViewBag.TotalPageNumber = TotalPageNumber;

            @ViewBag.CategoryId         = Model.CategoryId;
            @ViewBag.selectedState      = Model.txtState;
            @ViewBag.SelectedDistrictId = DistrictId;
            @ViewBag.selectedMandalId   = MandalId;

            return(PartialView("AdSearch"));
        }