public async Task <ActionResult> Index(CancellationToken cancellationToken) { IAdvertisementModel model = await _service.IndexAsync(this.HttpContext.ApplicationInstance.Context, GetCanellationToken(cancellationToken)); ViewData[Constant.FormTitle] = "ADD Advertisement"; return(View(model)); }
public async Task <ActionResult> IndexEdit(string hdnAdvertisementId, CancellationToken cancellationToken) { if (System.Convert.ToInt64(hdnAdvertisementId) > 0) { ViewData[Constant.FormTitle] = "EDIT Advertisement"; IAdvertisementModel model = await _service.IndexAsync(this.HttpContext.ApplicationInstance.Context, GetCanellationToken(cancellationToken), hdnAdvertisementId); ViewData[Constant.QuerySuccess] = HttpContext.Items[Constant.QuerySuccess]; return(View("Index", model)); } else { return(Redirect("~/AdvertisementSearch/Index")); } }
public async Task <ActionResult> Detail(string advertisementId, CancellationToken cancellationToken) { IAdvertisementModel model = await _service.IndexAsync(this.HttpContext.ApplicationInstance.Context, GetCanellationToken(cancellationToken), Convert.ToString(advertisementId)); return(View("~/Views/PublicAdvertisement/Detail.cshtml", model)); }
public async Task <ActionResult> Index(CancellationToken cancellationToken) { IAdvertisementModel model = await _service.IndexAsync(this.HttpContext.ApplicationInstance.Context, GetCanellationToken(cancellationToken)); return(View("~/Views/PublicAdvertisement/Index.cshtml", model)); }