public ActionResult GetLocalities(string Type, int Id) { //TO DO //Take care later List <etblIndianLocalityCordinate> polygonData; var list = BL_Bidding.GetAreaLocalityForBid(Type, Id, out polygonData); return(Json(new { list, polygonData = polygonData }, JsonRequestBehavior.AllowGet)); }
public ActionResult Index(PropSearchRequestModel model) { string type = ""; if (HttpContext.Request.Params["type"] != null && HttpContext.Request.Params["type"] != "") { type = HttpContext.Request.Params["type"]; } ViewBag.type = type == "" ? null : type; eBiddingSearch obj = new eBiddingSearch(); if (User.Identity.IsAuthenticated) { var user = BL_WebsiteUser.GetSingleRecordById(User.Identity.GetUserId <long>()); obj.sUserTitle = user.Title; obj.sUserFirstName = user.FirstName; obj.sUserLastName = user.LastName; obj.sUserEmail = user.Email; obj.sUserMobileNo = user.PhoneNumber; obj.iStateId = user.StateId.HasValue? user.StateId.Value:0; } obj.sSearchId = Convert.ToInt32(model.cid); obj.sSearchName = model.cname; obj.sSearchType = model.ctype == "City" ? "C" : model.ctype == "Locality" ? "L" : "A"; obj.ctype = model.ctype; obj.sJsonRoomData = model.sRoomData; obj.sCheckIn = model.sCheckIn; obj.sCheckOut = model.sCheckOut; obj.cname = model.cname; obj.type = ViewBag.type; obj.CountryCodePhoneList = BL_Country.GetAllCountryPhoneCodes(); List <etblIndianLocalityCordinate> cordinatesList; var list = BL_Bidding.GetAreaLocalityForBid(obj.sSearchType, obj.sSearchId, out cordinatesList); obj.lstPolygonData = cordinatesList; obj.sJsonLocality = OneFineRateAppUtil.clsUtils.ConvertToJson(list); obj.BidSearchData = "BidSearchData" + Guid.NewGuid().ToString(); obj.BidData = "BidData" + Guid.NewGuid().ToString(); Session[obj.BidSearchData] = obj; Session[obj.BidData] = model; //TempData.Keep(); return(View(obj)); }