public static DataTable GetBondByTimeAndCountryAndType(DateTime start, DateTime end, String country, int type) { string __strConn = System.Configuration.ConfigurationManager.ConnectionStrings["FinanceChannelConnSnap"].ToString(); object val1 = start == DateTime.MinValue ? "" : (object)start; object val2 = end == DateTime.MinValue ? "" : (object)end; SqlAccessLayerUpd sqlDal = new SqlAccessLayerUpd(__strConn); string[] pPara = new string[] { "@Start", "@End", "@Country", "@Type" }; object[] pValue = new object[] { start, end, country, type }; DataTable tbl = sqlDal.ExecuteStoreProcedure("pr_Bond_SelectByTimeAndCountryAndType", pPara, pValue); return tbl; }
public static int V2_FC_tblLichSuKien_Search_Old_Total(string symbol, DateTime d1, DateTime d2, int pagesize, int type) { string __strConn = System.Configuration.ConfigurationManager.ConnectionStrings["MasterDB_FinanceChannel"].ToString(); object val1 = d1 == DateTime.MinValue ? "" : (object)d1; object val2 = d2 == DateTime.MinValue ? "" : (object)d2; SqlAccessLayerUpd sqlDal = new SqlAccessLayerUpd(__strConn); string[] pPara = new string[] { "@StockSymbol", "@FromDate", "@EndDate", "@Type" }; object[] pValue = new object[] { symbol, val1, val2, type }; DataTable __tbl = sqlDal.ExecuteStoreProcedure("V2_FC_tblLichSuKien_Search_Old_Total", pPara, pValue); if (__tbl != null && __tbl.Rows.Count > 0) { int totalR = int.Parse(__tbl.Rows[0][0].ToString()); int totalP = 0; int CountPaging = 0; totalP = totalR / pagesize; if (totalP % pagesize > 0) totalP++; if (totalP == 0) totalP = 1; CountPaging = totalP; return CountPaging; } return 0; }
public static DataTable H_Category_SelectParent() { string key = "H_tblCategory_SelectParent"; DataTable tbl = HttpContext.Current.Cache[key] as DataTable; if (tbl != null) return tbl; SqlAccessLayerUpd sqlDal = new SqlAccessLayerUpd(__strConnNapShop); tbl = sqlDal.ExecuteStoreProcedure("H_tblCategory_SelectParent"); if (tbl != null) { HttpContext.Current.Cache.Insert(key, tbl, new SqlCacheDependency("FinanceChannel", "tblCategory")); } return tbl; }
public static void H_AnalyseReport_Update_DownloadNum(int ID) { var __strConn = ConfigurationManager.ConnectionStrings["MasterDB_FinanceChannel"].ToString(); var __sqlDal = new SqlAccessLayerUpd(__strConn); //SqlCacheDependency __sqlDep = new SqlCacheDependency(Const.DATABASE_NAME, "NewsPublished"); string[] __param = new string[] { "@ID" }; object[] __value = new object[] { ID }; __sqlDal.ExecuteStoreProcedure("AnalyzeReport_Update_DownloadNum", __param, __value); }
public static DataTable H_AnalyzeReportSource_All() { string key = "H_AnalyzeReportSource_All"; DataTable tbl = HttpContext.Current.Cache[key] as DataTable; if (tbl != null) return tbl; SqlAccessLayerUpd sqlDal = new SqlAccessLayerUpd(__strConnNapShop); tbl = sqlDal.ExecuteStoreProcedure("H_AnalyzeReportSource_All"); if (tbl != null) { HttpContext.Current.Cache.Insert(key, tbl, new SqlCacheDependency("FinanceChannel", "AnalyzeReportSource")); } return tbl; }
public static DataTable SearchEventCalendar(string symbol, int topEvents, int month, int year) { //DataTable dtResult = null; //using (Cafef_DAL.MainDB_Finance db = new MainDB_Finance()) //{ // dtResult = db.FinanceStoredProcedures.SearchEventCalendar(topEvents, symbol, month, year); //} //return dtResult; string __strConn = System.Configuration.ConfigurationManager.ConnectionStrings["MasterDB_FinanceChannel"].ToString(); SqlAccessLayerUpd sqlDal = new SqlAccessLayerUpd(__strConn); string[] pPara = new string[] { "@top", "@symbol", "@month", "@year" }; object[] pValue = new object[] { topEvents, symbol, month, year }; DataTable tbl = sqlDal.ExecuteStoreProcedure("V2_FC_tblLichSuKien_Search", pPara, pValue); return tbl; }
public static DataTable V2_FC_tblLichSuKien_Search_Paging(string symbol, DateTime d1, DateTime d2, int PageIndex, int PageSize, int type) { string __strConn = System.Configuration.ConfigurationManager.ConnectionStrings["MasterDB_FinanceChannel"].ToString(); object val1 = d1 == DateTime.MinValue ? "" : (object)d1; object val2 = d2 == DateTime.MinValue ? "" : (object)d2; SqlAccessLayerUpd sqlDal = new SqlAccessLayerUpd(__strConn); string[] pPara = new string[] { "@StartIndex", "@PageSize", "@StockSymbol", "@FromDate", "@EndDate", "@Type" }; object[] pValue = new object[] { PageIndex, PageSize, symbol, val1, val2,type }; DataTable tbl = sqlDal.ExecuteStoreProcedure("V2_FC_tblLichSuKien_Search_Paging", pPara, pValue); return tbl; }