public DynamicReport GovReportSummary(DateTime FromDate, DateTime ToDate) { List <SqlParameter> paramsList = new List <SqlParameter>(); paramsList.Add(new SqlParameter("@FromDate", FromDate)); paramsList.Add(new SqlParameter("@ToDate", ToDate)); ReportingDbContext reportingDbContext = new ReportingDbContext(this.connStr); DataSet dsCtrUsrs = DALFunctions.GetDatasetFromStoredProc("SP_Report_Gov_Summary", paramsList, reportingDbContext); if (dsCtrUsrs != null && dsCtrUsrs.Tables.Count > 0) { DynamicReport dReport = new DynamicReport(); //return an anonymous type with counter and user collection.. var reports = new { OutNEmergServices = dsCtrUsrs.Tables[0], DiagnosticService = dsCtrUsrs.Tables[1] }; dReport.JsonData = JsonConvert.SerializeObject(reports, new IsoDateTimeConverter() { DateTimeFormat = "yyyy-MM-dd" }); return(dReport); } return(null); }
//public DataSet BilTxnItemsDateWise(DateTime FromDate, DateTime ToDate) //{ // // AccountingDbContext accountingDBContext = new AccountingDbContext(connString); // List<SqlParameter> paramList = new List<SqlParameter>() // { // new SqlParameter("@FromDate", FromDate), // new SqlParameter("@ToDate", ToDate) // }; // DataSet txn = DALFunctions.GetDatasetFromStoredProc("SP_ACC_GetBillingTransactions", paramList, this); // return txn; //} #endregion #region Get phrm TxnItems datewise for transfer to accounting public DataSet InvTxnsDateWise(DateTime FromDate, DateTime ToDate) { // AccountingDbContext accountingDBContext = new AccountingDbContext(connString); List <SqlParameter> paramList = new List <SqlParameter>() { new SqlParameter("@FromDate", FromDate), new SqlParameter("@ToDate", ToDate) }; DataSet txn = DALFunctions.GetDatasetFromStoredProc("SP_ACC_GetInventoryTransactions", paramList, this); return(txn); }
///// Get DataTable From SP without Any Input Parameters public static DataTable GetDataTableFromStoredProc(string storedProcName, DbContext dbContext) { try { DataSet ds = DALFunctions.GetDatasetFromStoredProc(storedProcName, null, dbContext); return(ds.Tables[0]); } catch (Exception ex) { throw ex; } }
public DynamicReport PHRM_Daily_StockValue() { List <SqlParameter> paramsList = new List <SqlParameter>(); ReportingDbContext reportingDbContext = new ReportingDbContext(this.connStr); DataSet dsDailyRev = DALFunctions.GetDatasetFromStoredProc("SP_Report_PHRM_Daily_StockValue", paramsList, reportingDbContext); DynamicReport dReport = new DynamicReport(); dReport.Schema = null;//we have only one table returning from the database.. //wee need datetime in yyyy-MM-dd format. dReport.JsonData = JsonConvert.SerializeObject(dsDailyRev.Tables[0], new IsoDateTimeConverter() { DateTimeFormat = "yyyy-MM-dd" }); return(dReport); }