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")); }
public ActionResult AdManagement(int PageNumber) { HttpCookie nameCookie = Request.Cookies["_RRAUN"]; InformationServiceWrapper objservice = new InformationServiceWrapper(); DropDownWrapperModel ModelObj = new DropDownWrapperModel(); ModelObj = objservice.GetDropDownValues(); ViewBag.DistrictLIst = ModelObj.District; ViewBag.MandalList = ModelObj.Mandal; if (nameCookie != null) { int TotalPageNumber = 0; ViewBag.CurrentPageNumber = PageNumber; List <AdDetailsModel> AdList = new List <AdDetailsModel>(); InformationServiceWrapper Obj = new InformationServiceWrapper(); AdList = Obj.FetAdDetailsForAdminPageVerifiedAds(PageNumber, out TotalPageNumber); ViewBag.Adlist = AdList; ViewBag.TotalPageNumber = TotalPageNumber; return(View("AdManagement")); } else { return(RedirectToAction("AdminLogin", "Admin")); } }
public ActionResult Home() { InformationServiceWrapper objservice = new InformationServiceWrapper(); DropDownWrapperModel ModelObj = new DropDownWrapperModel(); ModelObj = objservice.GetDropDownValues(); ViewBag.DistrictLIst = ModelObj.District; ViewBag.MandalList = ModelObj.Mandal; return(View()); }
public ActionResult GetDropDownValues() { InformationServiceWrapper objservice = new InformationServiceWrapper(); DropDownWrapperModel ModelObj = new DropDownWrapperModel(); ModelObj = objservice.GetDropDownValues(); ViewBag.DistrictLIst = ModelObj.District; ViewBag.MandalList = ModelObj.Mandal; return(Json(1, JsonRequestBehavior.AllowGet)); }
public ActionResult UserAccount() { HttpCookie KeyCookie = Request.Cookies["_RRPS"]; HttpCookie UserIdCookie = Request.Cookies["_RRUID"]; HttpCookie UserNameCookie = Request.Cookies["_RRUN"]; HttpCookie PhoneNumberCookie = Request.Cookies["_RRUPn"]; HttpCookie OTPCookie = Request.Cookies["_ROTP_"]; Utility en = new Utility(); if (PhoneNumberCookie != null && KeyCookie != null) { Int64 PhoneNumber = Convert.ToInt64(en.Decrypt(PhoneNumberCookie["_RRUPn"])); string PassWord = en.Decrypt(KeyCookie["_RRPS"]); UserDetailsModel DetObj = new UserDetailsModel(); InformationServiceWrapper Obj = new InformationServiceWrapper(); DetObj = Obj.GetUserDetailsWithPassword(PhoneNumber, PassWord); DropDownWrapperModel ModelObj = new DropDownWrapperModel(); ModelObj = Obj.GetDropDownValues(); ViewBag.DistrictLIst = ModelObj.District; ViewBag.MandalList = ModelObj.Mandal; if (DetObj != null) { ViewBag.txtUserName = DetObj.txtUserName; // ViewBag.txtMailId = DetObj.txtMailId; ViewBag.txtPhoneNumber = DetObj.txtPhoneNumber; ViewBag.txtVillage = DetObj.txtVillage; ViewBag.ddlState = DetObj.ddlState; ViewBag.ddlMandal = DetObj.ddlMandal; ViewBag.ddlDistrict = DetObj.ddlDistrict; } return(View("UserAccount")); } else if (PhoneNumberCookie != null && OTPCookie != null) { Int64 PhoneNumber = Convert.ToInt64(en.Decrypt(PhoneNumberCookie["_RRUPn"])); Utility UtilOBJ = new Utility(); int OTP = Convert.ToInt32(UtilOBJ.Decrypt(en.Decrypt(OTPCookie["_ROTP_"]))); UserDetailsModel DetObj = new UserDetailsModel(); InformationServiceWrapper Obj = new InformationServiceWrapper(); DetObj = Obj.GetUserDetailsWithOTP(OTP, PhoneNumber); DropDownWrapperModel ModelObj = new DropDownWrapperModel(); ModelObj = Obj.GetDropDownValues(); ViewBag.DistrictLIst = ModelObj.District; ViewBag.MandalList = ModelObj.Mandal; if (DetObj != null) { ViewBag.txtUserName = DetObj.txtUserName; //ViewBag.txtMailId = DetObj.txtMailId; ViewBag.txtPhoneNumber = DetObj.txtPhoneNumber; ViewBag.txtVillage = DetObj.txtVillage; ViewBag.ddlState = DetObj.ddlState; ViewBag.ddlMandal = DetObj.ddlMandal; ViewBag.ddlDistrict = DetObj.ddlDistrict; } return(View("UserAccount")); } else { return(RedirectToAction("Login", "User")); } }