/// <summary> /// /// </summary> /// <returns></returns> public DateTime GetLastDateTimeForm10MinuteDataTable() { DateTime dt = DitchData10MinuteDBI.GetLastDateTime(this.DeviceID); if (dt.Year == 1900) { return(DitchDataDBI.GetFirstDateTime(this.DeviceID)); } else { return(dt); } }
/// <summary> /// /// </summary> /// <param name="begin"></param> /// <param name="end"></param> /// <returns></returns> public DataTable GetDitchDataSection(DateTime begin, DateTime end) { DataTable tbl = DitchDataDBI.GetDataByStationIDs(begin, end, this.GetStationIDs()); tbl.DefaultView.Sort = "DT desc"; DataTable result = tbl.Clone(); foreach (DataRowView rowView in tbl.DefaultView) { string stationName = rowView.Row[YongShuiGuanLiDBI.DBNames.vDitchData.StationName].ToString(); string filter = string.Format("{0} = '{1}'", YongShuiGuanLiDBI.DBNames.vDitchData.StationName, stationName); DataRow[] rows = result.Select(filter); if (rows.Length == 0) { result.Rows.Add(rowView.Row.ItemArray); } } return(result); }
/// <summary> /// /// </summary> /// <param name="begin"></param> /// <param name="end"></param> /// <returns></returns> public DataTable GetFluxDataTable(DateTime begin, DateTime end) { return(DitchDataDBI.GetDataByStationIDs(begin, end, this.GetStationIDs())); }
/// <summary> /// /// </summary> /// <param name="b"></param> /// <param name="e"></param> /// <returns></returns> public DataTable GetDitchDataHistoryDataTable(DateTime b, DateTime e) { int[] stationids = this.ChannelCollection.StationCollection.GetStationIDs(); return(DitchDataDBI.GetDataByStationIDs(b, e, stationids)); }