using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using Terra.YaoGan.Common; namespace Terra.YaoGan.Service { public class DataLake { sqlserverDBhelper DB = new sqlserverDBhelper(); //获取当前选中的面积统计 public DataTable GetCurrentArea(string where) { string sql = @"SELECT SUM(CAST(area as FLOAT)) lakeArea,simName,[time] from SSHP WHERE name='" + where + "' GROUP BY [time],simName ORDER BY [time] "; DataTable dt = DB.QueryTable(sql); return dt; } //获取当前的选中的湖泊以及时间 public DataTable GetManyYearAndLake(string where) { string sql = @"SELECT SUM(CAST(area as FLOAT)) lakeArea,simName,[time] from SSHP " + where + " GROUP BY [time],simName ORDER BY [time] "; DataTable dt = DB.QueryTable(sql); return dt; } //获取多年多湖数据 public DataTable GetManyYearAndManyLake(string sql) { DataTable dt = DB.QueryTable(sql); return dt; } //获取湖泊的数据 public DataTable GetYear(string sql) { DataTable dt = DB.QueryTable(sql); return dt; } } }