コード例 #1
0
ファイル: HoursRecord.cs プロジェクト: AdamPetras/Manager
 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();
 }
コード例 #2
0
 protected bool Equals(WorkTime other)
 {
     return(Hours == other.Hours && Minutes == other.Minutes);
 }
コード例 #3
0
ファイル: HoursRecord.cs プロジェクト: AdamPetras/Manager
 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)
 {
 }