public JsonResult WatchList_Print(string watchName) { ReportsWatchListModel reportWatchListModel = new ReportsWatchListModel(); string json = string.Empty; List <ReportsModel> reportsList = new List <ReportsModel>(); try { ReportsWatchListBase reportsWatchListBase = new ReportsWatchListBase(); reportsWatchListBase.WatchName = watchName; actionResult = reportsAction.WatchList_Print(reportsWatchListBase); if (actionResult.IsSuccess) { reportsList = CommonMethods.ConvertTo <ReportsModel>(actionResult.dtResult); } else { json = "fail"; } reportWatchListModel.reportsList = reportsList; } catch (Exception ex) { json = "-1"; ErrorReporting.WebApplicationError(ex); } return(Json(reportsList, JsonRequestBehavior.AllowGet)); }
public ActionResult WatchList_Print(ReportsWatchListBase reportsWatchList) { actionResult = new ActionResult(); try { actionResult.dtResult = reportsDL.WatchList_Print(reportsWatchList); if (actionResult.dtResult != null && actionResult.dtResult.Rows.Count > 0) { actionResult.IsSuccess = true; } } catch (Exception ex) { throw ex; } return(actionResult); }
public DataTable WatchList_Print(ReportsWatchListBase reportWatchList) { dtContainer = new DataTable(); try { MyParameter[] myParams = { new MyParameter("@WatchName", reportWatchList.WatchName) }; Common.Set_Procedures("WatchList_Print"); Common.Set_ParameterLength(myParams.Length); Common.Set_Parameters(myParams); dtContainer = Common.Execute_Procedures_LoadData(); } catch (Exception ex) { throw ex; } return(dtContainer); }