コード例 #1
0
ファイル: StationCollection.cs プロジェクト: wwkkww1983/yh
        /// <summary>
        ///
        /// </summary>
        /// <param name="begin"></param>
        /// <param name="end"></param>
        /// <returns></returns>
        public DataTable GetDitchDataSectionAmount(DateTime begin, DateTime end)
        {
            //DataTable tbl = DitchDataDBI.GetDataByStationIDs(begin, end, this.GetStationIDs());
            DataTable tbl = DitchDataDayDBI.GetDayDataTableWithRow(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.vDitchDataDay.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);
        }
コード例 #2
0
ファイル: StationCollection.cs プロジェクト: wwkkww1983/yh
 /// <summary>
 ///
 /// </summary>
 /// <param name="begin"></param>
 /// <param name="end"></param>
 /// <returns></returns>
 public DataTable GetAmountDataTable(DateTime begin, DateTime end)
 {
     return(DitchDataDayDBI.GetDayDataTableWithRow(begin, end, GetStationIDs()));
 }