Exemplo n.º 1
0
        /// <summary>
        /// 更新数据
        /// </summary>
        /// <param name="dataList"></param>
        public void UpdateData(List <IntakeAndOutputData> dataList)
        {
            if (dataList == null || dataList.Count == 0)
            {
                return;
            }
            if (RowData.Count > 0 && dataList.FirstOrDefault().Name != RowData.FirstOrDefault().Name)
            {
                return;
            }

            RowData.Clear();
            RowData.AddRange(dataList);
            //foreach (IntakeAndOutputData item in dataList)
            //{
            //    IntakeAndOutputData orgData = RowData.Find(p =>
            //    {
            //        if (item.IsOneTime)
            //            return item.OnetimeData.ExcuteTime == p.OnetimeData.ExcuteTime;
            //        else
            //            return item.BeginTime == p.BeginTime && item.EndTime == p.EndTime;
            //    });
            //    if (orgData != null)
            //        orgData = item;
            //    else
            //        RowData.Add(item);
            //}
        }
Exemplo n.º 2
0
 public void Clear()
 {
     Columns.Clear();
     Rows.Clear();
     RowData.Clear();
     Graph.ReDraw();
     ColScrollBar.Value = 0;
     RowScrollBar.Value = 0;
 }