Exemple #1
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 private WorkArgs calculateamout(worktype wt)
 {
     if (wt == worktype.avg)
     {
         return(new WorkArgs()
         {
             currentdone = 0, total = Calculator.GetAvgCount(pointstrselected.Count, DateTime.Parse(StartdateTimePicker.Text), DateTime.Parse(EnddateTimePicker.Text)), wt = wt
         });
     }
     else if (wt == worktype.real)
     {
         return(new WorkArgs()
         {
             currentdone = 0, total = Calculator.GetRealCount(pointstrselected.Count, DateTime.Parse(StartdateTimePicker.Text), DateTime.Parse(EnddateTimePicker.Text)), wt = wt
         });
     }
     else if (wt == worktype.both)
     {
         return(new WorkArgs()
         {
             currentdone = 0, total = Calculator.GetRealCount(pointstrselected.Count, DateTime.Parse(StartdateTimePicker.Text), DateTime.Parse(EnddateTimePicker.Text)) + Calculator.GetAvgCount(pointstrselected.Count, DateTime.Parse(StartdateTimePicker.Text), DateTime.Parse(EnddateTimePicker.Text)), wt = wt
         });
     }
     else
     {
         return(null);
     }
 }
Exemple #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <returns></returns>
 private WorkArgs calculateamout(worktype wt)
 {
     if (wt == worktype.avg)
     {
         return new WorkArgs() { currentdone = 0, total = Calculator.GetAvgCount(pointstrselected.Count, DateTime.Parse(StartdateTimePicker.Text), DateTime.Parse(EnddateTimePicker.Text)), wt = wt };
     }
     else if (wt == worktype.real)
     {
         return new WorkArgs() { currentdone = 0, total = Calculator.GetRealCount(pointstrselected.Count, DateTime.Parse(StartdateTimePicker.Text), DateTime.Parse(EnddateTimePicker.Text)), wt = wt };
     }
     else if (wt == worktype.both)
     {
         return new WorkArgs() { currentdone = 0, total = Calculator.GetRealCount(pointstrselected.Count, DateTime.Parse(StartdateTimePicker.Text), DateTime.Parse(EnddateTimePicker.Text)) + Calculator.GetAvgCount(pointstrselected.Count, DateTime.Parse(StartdateTimePicker.Text), DateTime.Parse(EnddateTimePicker.Text)), wt = wt };
     }
     else
         return null;
 }