Esempio n. 1
0
        public DataTable GetWarnDetailData(string regionName, string hour1, string hour2, int page, int rows, ref int rowcount, ref int countPage)
        {
            string  sql     = "select * from T_Mid_AirForeCast where StationName='" + regionName + "' and CONVERT(varchar(30),MonitorTime,120)>CONVERT(varchar(30),'" + hour1 + "',120) and CONVERT(varchar(30),MonitorTime,120)<CONVERT(varchar(30),'" + hour2 + "',120) Order by MonitorTime desc";
            DataSet infoSet = ConsultReportDal.Paging(sql, page, rows, ref rowcount, ref countPage);

            if (infoSet != null && infoSet.Tables.Count == 3)
            {
                DataTable infoTable = infoSet.Tables[2];
                return(infoTable);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 2
0
        public DataTable GetWarnInfoData(string begin, string end, int page, int rows, ref int rowcount, ref int countPage)
        {
            string sql = "select f.ReportTime as FutureDate,f.ReportCode as ReportCode,f.AQI as AQI,g.Category as Category,g.ColorName as ColorName,g.ColorCode,g.Grade,g.RadiusColor from (select distinct e.ReportTime,d.AQI,d.ReportCode,d.QualityLevel from (select AQI,ReportCode,QualityLevel from T_Mid_ReportData) d inner join (select b.ReportCode,MIN(AQI) as AQI,b.ReportTime FROM T_Mid_ReportData a inner join T_Mid_Report b on a.ReportCode=b.ReportCode where a.AQI>=200 group by b.ReportTime,b.ReportCode) e on d.ReportCode=e.ReportCode and d.AQI=e.AQI) f inner join T_Bas_WarningLevel g on (f.QualityLevel-4)=g.id";

            sql += " where convert(varchar(15),f.ReportTime ,23)>=convert(varchar(15),'" + begin + "',23) and convert(varchar(15),f.ReportTime ,23)<= convert(varchar(15),'" + end + "',23) order by f.ReportTime desc";
            DataSet infodataset = ConsultReportDal.Paging(sql, page, rows, ref rowcount, ref countPage);

            if (infodataset != null && infodataset.Tables.Count == 3)
            {
                DataTable infoTable = infodataset.Tables[2];
                return(infoTable);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 3
0
        public DataTable GetForeCastCheckData(string beginDate, string endDate, string strCheckID, int forecastmodel, int page, int rows, ref int rowcount, ref int countPage)
        {
            SQLHelper sqlh = new SQLHelper();

            //string sql = @"select * from V_Mid_AirForeCastNew where Convert(varchar(30),MonitorTime,23)>=Convert(varchar(30),'" + beginDate + "',23) and Convert(varchar(30),MonitorTime,23)<=Convert(varchar(30),'" + endDate + "',23) and StationCode in(" + strCheckID + ") and forecastmodel=" + forecastmodel + " order by MonitorTime desc";
            string  sql         = @"select * from V_Mid_AirForeCastNew where MonitorTime>='" + beginDate + "' and MonitorTime<='" + endDate + "' and StationCode in(" + strCheckID + ") and forecastmodel=" + forecastmodel + " order by MonitorTime desc";
            DataSet infodataset = ConsultReportDal.Paging(sql, page, rows, ref rowcount, ref countPage);

            if (infodataset != null && infodataset.Tables.Count == 3)
            {
                DataTable infoTable = infodataset.Tables[2];
                return(infoTable);
            }
            else
            {
                return(null);
            }
        }