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()); }
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()); }
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 = }
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("计费时间设定错误"); } }
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("计费时间设定错误"); }