public ActionResult List(HTTPRequestsListViewModel httpRequestsListViewModel) { questStatus status = null; /*---------------------------------------------------------------------------------------------------------------------------------- * Log Operation *---------------------------------------------------------------------------------------------------------------------------------*/ status = LogOperation(); if (!questStatusDef.IsSuccess(status)) { httpRequestsListViewModel.questStatus = status; return(Json(httpRequestsListViewModel, JsonRequestBehavior.AllowGet)); } /*---------------------------------------------------------------------------------------------------------------------------------- * Authorize *---------------------------------------------------------------------------------------------------------------------------------*/ status = Authorize(httpRequestsListViewModel._ctx); if (!questStatusDef.IsSuccess(status)) { httpRequestsListViewModel.questStatus = status; return(Json(httpRequestsListViewModel, JsonRequestBehavior.AllowGet)); } /*---------------------------------------------------------------------------------------------------------------------------------- * Get list of items. *---------------------------------------------------------------------------------------------------------------------------------*/ HTTPRequestsListViewModel tablesetsListViewModelNEW = null; HTTPRequestsListModeler httpRequestsListModeler = new HTTPRequestsListModeler(this.Request, this.UserSession); status = httpRequestsListModeler.List(out tablesetsListViewModelNEW); if (!questStatusDef.IsSuccess(status)) { httpRequestsListViewModel.questStatus = status; return(Json(httpRequestsListViewModel, JsonRequestBehavior.AllowGet)); } /*---------------------------------------------------------------------------------------------------------------------------------- * Return result view model or as Excel *---------------------------------------------------------------------------------------------------------------------------------*/ if (httpRequestsListViewModel.bExportToExcel) { string filename = "HTTPReqestsLog_" + DateTime.Now.ToString(); Response.ClearContent(); Response.AddHeader("content-disposition", "atachment;filename=" + filename + ".xls"); Response.AddHeader("Content-Type", "application/vnd.ms-excel"); writeTsv(tablesetsListViewModelNEW, Response.Output); Response.Flush(); Response.End(); return(new EmptyResult()); } else { status = new questStatus(Severity.Success); tablesetsListViewModelNEW.questStatus = status; return(Json(tablesetsListViewModelNEW, JsonRequestBehavior.AllowGet)); } }
public ActionResult Next(HTTPRequestsListViewModel httpRequestsListViewModel) { questStatus status = null; /*---------------------------------------------------------------------------------------------------------------------------------- * Log Operation *---------------------------------------------------------------------------------------------------------------------------------*/ status = LogOperation(); if (!questStatusDef.IsSuccess(status)) { status = new questStatus(Severity.Success); httpRequestsListViewModel.questStatus = status; return(Json(httpRequestsListViewModel, JsonRequestBehavior.AllowGet)); } /*---------------------------------------------------------------------------------------------------------------------------------- * Authorize *---------------------------------------------------------------------------------------------------------------------------------*/ status = Authorize(httpRequestsListViewModel._ctx); if (!questStatusDef.IsSuccess(status)) { status = new questStatus(Severity.Success); httpRequestsListViewModel.questStatus = status; return(Json(httpRequestsListViewModel, JsonRequestBehavior.AllowGet)); } /*---------------------------------------------------------------------------------------------------------------------------------- * Get list of items. *---------------------------------------------------------------------------------------------------------------------------------*/ // TODO. HTTPRequestsListViewModel tablesetsListViewModelNEW = null; HTTPRequestsListModeler usersListModeler = new HTTPRequestsListModeler(this.Request, this.UserSession); status = usersListModeler.List(out tablesetsListViewModelNEW); if (!questStatusDef.IsSuccess(status)) { status = new questStatus(Severity.Success); httpRequestsListViewModel.questStatus = status; return(Json(httpRequestsListViewModel, JsonRequestBehavior.AllowGet)); } /*---------------------------------------------------------------------------------------------------------------------------------- * Return view *---------------------------------------------------------------------------------------------------------------------------------*/ status = new questStatus(Severity.Success); tablesetsListViewModelNEW.questStatus = status; return(Json(tablesetsListViewModelNEW, JsonRequestBehavior.AllowGet)); }