File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,9 +38,6 @@ public abstract class Named
3838 // description
3939 private string description ;
4040
41- // database primary key
42- private int primaryKey ;
43-
4441 protected Named ( )
4542 {
4643
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ public void SetStartDateTime(LocalDateTime startDateTime)
8181 /// <returns>Period end</returns>
8282 public LocalDateTime GetEndDateTime ( )
8383 {
84- return startDateTime . PlusSeconds ( duration . Seconds ) ;
84+ return startDateTime . PlusSeconds ( ( long ) duration . TotalSeconds ) ;
8585 }
8686
8787 /// <summary>
@@ -99,7 +99,7 @@ public Duration GetDuration()
9999 /// <param name="duration">Duration</param>
100100 public void SetDuration ( Duration duration )
101101 {
102- if ( duration == null || duration . Seconds == 0 )
102+ if ( duration == null || duration . TotalSeconds == 0 )
103103 {
104104 throw new Exception ( WorkSchedule . GetMessage ( "duration.not.defined" ) ) ;
105105 }
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ public Team GetTeam()
9797 */
9898 public int CompareTo ( ShiftInstance other )
9999 {
100- throw new NotImplementedException ( ) ;
100+ return GetStartTime ( ) . CompareTo ( other . GetStartTime ( ) ) ;
101101 }
102102
103103 /**
Original file line number Diff line number Diff line change 6464 <None Include =" packages.config" />
6565 </ItemGroup >
6666 <ItemGroup >
67- <Folder Include =" NewFolder1 \" />
67+ <Folder Include =" Resources \" />
6868 </ItemGroup >
6969 <Import Project =" $(MSBuildToolsPath)\Microsoft.CSharp.targets" />
7070</Project >
Original file line number Diff line number Diff line change @@ -66,12 +66,12 @@ public Duration GetDuration()
6666 /// <param name="duration">Duration</param>
6767 public void SetDuration ( Duration duration )
6868 {
69- if ( duration == null || duration . Seconds == 0 )
69+ if ( duration == null || duration . TotalSeconds == 0 )
7070 {
7171 throw new Exception ( WorkSchedule . GetMessage ( "duration.not.defined" ) ) ;
7272 }
7373
74- if ( duration . Seconds > SECONDS_PER_DAY )
74+ if ( duration . TotalSeconds > SECONDS_PER_DAY )
7575 {
7676 throw new Exception ( WorkSchedule . GetMessage ( "duration.not.allowed" ) ) ;
7777 }
@@ -106,7 +106,7 @@ public void SetStart(LocalTime startTime)
106106 /// <returns>Period end time</returns>
107107 public LocalTime GetEnd ( )
108108 {
109- return startTime . PlusSeconds ( duration . Seconds ) ;
109+ return startTime . PlusSeconds ( ( long ) duration . TotalSeconds ) ;
110110 }
111111
112112 // breaks are considered to be in the shift's working period
You can’t perform that action at this time.
0 commit comments