public async Task <ActionResult> Index(CancellationToken cancellationToken) { ViewData[Constant.FormTitle] = "ADD Theme"; IThemeModel model = await _service.IndexAsync(this.HttpContext.ApplicationInstance.Context, GetCanellationToken(cancellationToken)); return(View(model)); }
public async Task <ActionResult> IndexEdit(string hdnThemeId, CancellationToken cancellationToken) { if (System.Convert.ToInt64(hdnThemeId) > 0) { ViewData[Constant.FormTitle] = "EDIT Theme"; IThemeModel model = await _service.IndexAsync(this.HttpContext.ApplicationInstance.Context, hdnThemeId, GetCanellationToken(cancellationToken)); ViewData[Constant.QuerySuccess] = HttpContext.Items[Constant.QuerySuccess]; return(View("Index", model)); } else { return(Redirect("~/ThemeSearch/Index")); } }