Beispiel #1
0
 public HoursRecord(DateTime date, TimeSpan from, TimeSpan to, double price, double bonus, string description, int overTimeHours, int overTimeMinutes, WorkTime breakTime)
 {
     Id                       = Guid.NewGuid();
     Date                     = date;
     WorkTimeFrom             = from;
     WorkTimeTo               = to;
     (int hours, int minutes) = CalculateHoursAndMinutes();
     BreakTime                = breakTime;
     Time                     = new WorkTime(hours, minutes);
     Time                    -= BreakTime;
     Price                    = price;
     Bonus                    = bonus;
     Description              = description ?? "";
     OverTime                 = new WorkTime(overTimeHours, overTimeMinutes);
     Type                     = ERecordType.Hours;
     GetRecordType            = AppResource.HoursType;
     Value                    = (Time + OverTime).ToString();
 }
Beispiel #2
0
 protected bool Equals(WorkTime other)
 {
     return(Hours == other.Hours && Minutes == other.Minutes);
 }
Beispiel #3
0
 public HoursRecord(DateTime date, TimeSpan from, TimeSpan to, double price, double bonus, string description, WorkTime overTime, WorkTime breakTime) : this(date, from, to, price, bonus, description, overTime.Hours, overTime.Minutes, breakTime)
 {
 }