示例#1
0
文件: frmMain.cs 项目: wangboc/Arache
 private void barCheckItemCurrentDay_CheckedChanged(object sender, ItemClickEventArgs e)
 {
     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());
 }
示例#2
0
        private void barCheckItemCurrentYear_CheckedChanged(object sender, ItemClickEventArgs e)
        {
            var taskCharge = new TaskChargeFilter("获取本年计费信息",
                                                  new ChargeFilterCondition(new DateTime(DateTime.Now.Year, 1, 1, 0, 0, 0), DateTime.Now, DateTime.Now,
                                                                            _nodeTreeControl.CurrentNodeMid, CurrentPID), SetChargeData);

            TaskPool.AddTask(taskCharge, TaskScheduler.FromCurrentSynchronizationContext());
        }
示例#3
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 =
        }
示例#4
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            PopupControlContainer popup = ChargeDateSelectBtn.DropDownControl as PopupControlContainer;

            popup.HidePopup();

            DateEdit startDate  = popup.Controls.Find("startDate", true)[0] as DateEdit;
            DateEdit middleDate = popup.Controls.Find("middleDate", true)[0] as DateEdit;
            DateEdit lastDate   = popup.Controls.Find("lastDate", true)[0] as DateEdit;

            if (startDate.EditValue != null && startDate.EditValue != "" && middleDate.EditValue != null &&
                middleDate.EditValue != "" && lastDate.EditValue != null && lastDate.EditValue != "" &&
                startDate.DateTime <= middleDate.DateTime && middleDate.DateTime <= lastDate.DateTime)
            {
                var taskCharge = new TaskChargeFilter("获取自定义时段计费信息",
                                                      new ChargeFilterCondition(startDate.DateTime, middleDate.DateTime, lastDate.DateTime,
                                                                                _nodeTreeControl.CurrentNodeMid, CurrentPID), SetChargeData);
                TaskPool.AddTask(taskCharge, TaskScheduler.FromCurrentSynchronizationContext());
            }
            else
            {
                MessageBox.Show("计费时间设定错误");
            }
        }
示例#5
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 =
        }
示例#6
0
文件: frmMain.cs 项目: wangboc/Arache
        private void btnOK_Click(object sender, EventArgs e)
        {
            PopupControlContainer popup = ChargeDateSelectBtn.DropDownControl as PopupControlContainer;
            popup.HidePopup();

            DateEdit startDate = popup.Controls.Find("startDate", true)[0] as DateEdit;
            DateEdit middleDate = popup.Controls.Find("middleDate", true)[0] as DateEdit;
            DateEdit lastDate = popup.Controls.Find("lastDate", true)[0] as DateEdit;

            if (startDate.EditValue != null && startDate.EditValue != "" && middleDate.EditValue != null &&
                middleDate.EditValue != "" && lastDate.EditValue != null && lastDate.EditValue != "" &&
                startDate.DateTime <= middleDate.DateTime && middleDate.DateTime <= lastDate.DateTime)
            {
                var taskCharge = new TaskChargeFilter("获取自定义时段计费信息",
                    new ChargeFilterCondition(startDate.DateTime, middleDate.DateTime, lastDate.DateTime,
                        _nodeTreeControl.CurrentNodeMid, CurrentPID), SetChargeData);
                TaskPool.AddTask(taskCharge, TaskScheduler.FromCurrentSynchronizationContext());
            }
            else MessageBox.Show("计费时间设定错误");
        }