public ActionResult Index(long PageId) { Models.StaticHtmlPageModel data = new Models.StaticHtmlPageModel(); data.PageId = PageId; CLayer.StaticPage obj = BLayer.StaticPage.GetPage(PageId); List <CLayer.SearchResult> dtlist1 = BLayer.Property.GetStaticPagePrpty(PageId); data.PropertyList = dtlist1; string url = Request.Url.AbsoluteUri; data.PageTitle = obj.PageTitle; data.Description = obj.Description; data.Image = obj.Image; data.ShowInWidget = obj.ShowInWidget; data.Location = obj.Location; data.City = obj.City; return(View(data)); }
// // GET: /Admin/PropertyAdd/ public async Task <ActionResult> Index(long PageId) { Models.StaticHtmlPageModel data = new Models.StaticHtmlPageModel(); data.PageId = PageId; CLayer.StaticPage dt = BLayer.StaticPage.GetPage(PageId); data.PageTitle = dt.PageTitle; data.Location = dt.Location; data.City = dt.City; data.PageTitle = dt.PageTitle; data.Destination = dt.City; List <CLayer.SearchResult> dtlist1 = BLayer.Property.GetAllPrptyStatic(); SearchResults result = await SearchFilter(data); data.PropertyList = result.Results; List <CLayer.SearchResult> dtlist2 = BLayer.Property.GetStaticPagePrpty(PageId); data.MaxCount = result.TotalRows; data.PropertyAdd = dtlist2; data.MaxCount = result.TotalRows; data.CurrentPage = 1; return(View(data)); }
public async Task <ActionResult> Remove(long PropertyId, long PageId, string Destination, Models.StaticHtmlPageModel model) { try { CLayer.StaticPage dt = BLayer.StaticPage.GetPage(PageId); BLayer.StaticPage.RemoveStaticProperty(PropertyId); model.PageTitle = dt.PageTitle; model.Destination = Destination; model.City = Destination; return(await Search(model)); } catch (Exception ex) { Common.LogHandler.HandleError(ex); return(Redirect("~/ErrorPage")); } }
public async Task <ActionResult> AddProperty(IEnumerable <int> Propertyselected, Models.StaticHtmlPageModel model) { long PageId = model.PageId; if (Propertyselected != null) { foreach (var PropertyId in Propertyselected) { CLayer.StaticPage dt = new CLayer.StaticPage(); dt.PropertyId = PropertyId; dt.PageId = PageId; BLayer.StaticPage.SaveProperty(dt); } } return(await Search(model)); //return RedirectToAction("Index", new { PageId = model.PageId }); }