示例#1
0
        /// <summary>
        /// 筛选电量信息,发起一个新的任务,后台刷新数据
        /// </summary>
        private void GetFilteredData()
        {
            ResetUISource();
            var task = new TaskElectricityFilter("检索数据",
                                                 new FilterCondition((DateTime)StartDatetimeCtr.EditValue, (DateTime)EndDatetimeCtr.EditValue,
                                                                     _nodeTreeControl.CurrentNodeMid, CurrentPID), SetElectricityData, false);

            TaskPool.AddTask(task, TaskScheduler.FromCurrentSynchronizationContext());
        }
示例#2
0
        private void RefreshAllData()
        {
            var task = new TaskElectricityFilter("更新数据",
                                                 new FilterCondition(DateTime.Now, DateTime.Now, _nodeTreeControl.CurrentNodeMid, CurrentPID),
                                                 SetElectricityData,
                                                 true);

            TaskPool.AddTask(task, TaskScheduler.FromCurrentSynchronizationContext());

            var taskNode = new TaskFetchNodes("更新节点", new ConditionBase(CurrentPID), SetNodesData);

            TaskPool.AddTask(taskNode, TaskScheduler.FromCurrentSynchronizationContext());

            var taskCharge = new TaskChargeFilter("获取当天计费信息", new ChargeFilterCondition(
                                                      new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, 0), DateTime.Now,
                                                      DateTime.Now, _nodeTreeControl.CurrentNodeMid, CurrentPID), SetChargeData);

            TaskPool.AddTask(taskCharge, TaskScheduler.FromCurrentSynchronizationContext());

//            var taskChargeEachDay =
        }
示例#3
0
文件: frmMain.cs 项目: wangboc/Arache
        private void RefreshAllData()
        {
            var task = new TaskElectricityFilter("更新数据",
                new FilterCondition(DateTime.Now, DateTime.Now, _nodeTreeControl.CurrentNodeMid, CurrentPID),
                SetElectricityData,
                true);
            TaskPool.AddTask(task, TaskScheduler.FromCurrentSynchronizationContext());

            var taskNode = new TaskFetchNodes("更新节点", new ConditionBase(CurrentPID), SetNodesData);
            TaskPool.AddTask(taskNode, TaskScheduler.FromCurrentSynchronizationContext());

            var taskCharge = new TaskChargeFilter("获取当天计费信息", new ChargeFilterCondition(
                new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, 0, 0, 0), DateTime.Now,
                DateTime.Now, _nodeTreeControl.CurrentNodeMid, CurrentPID), SetChargeData);
            TaskPool.AddTask(taskCharge, TaskScheduler.FromCurrentSynchronizationContext());

            //            var taskChargeEachDay =
        }
示例#4
0
文件: frmMain.cs 项目: wangboc/Arache
 /// <summary>
 /// 筛选电量信息,发起一个新的任务,后台刷新数据
 /// </summary>
 private void GetFilteredData()
 {
     ResetUISource();
     var task = new TaskElectricityFilter("检索数据",
         new FilterCondition((DateTime) StartDatetimeCtr.EditValue, (DateTime) EndDatetimeCtr.EditValue,
             _nodeTreeControl.CurrentNodeMid, CurrentPID), SetElectricityData, false);
     TaskPool.AddTask(task, TaskScheduler.FromCurrentSynchronizationContext());
 }