Class WorkTime
- Namespace
- Geotab.Checkmate.ObjectModel
- Assembly
- Geotab.Checkmate.ObjectModel.dll
The set of WorkTimeDetail(s) defining periods during the week that are considered as part of regular working hours. Work times that apply to all times are represented by "WorkTimeAllHoursId".
[ReportClass]
public class WorkTime : NameEntity, IEntity, IComparable, IIdentifiable, IDefaultable
- Inheritance
-
WorkTime
- Implements
- Derived
- Inherited Members
Constructors
WorkTime()
Initializes a new instance of the WorkTime class.The default work times constructor.
public WorkTime()
WorkTime(Id?)
Initializes a new instance of the WorkTime class.
public WorkTime(Id? id)
Parameters
WorkTime(Id?, string?, string?, WorkTimeHolidayGroupId?, List<WorkTimeDetail>?)
Initializes a new instance of the WorkTime class.
public WorkTime(Id? id, string? name, string? comment, WorkTimeHolidayGroupId? holidayGroup, List<WorkTimeDetail>? workTimesDetails)
Parameters
id
IdThe Id.
name
stringThe name.
comment
stringThe comment.
holidayGroup
WorkTimeHolidayGroupIdThe holiday group ID.
workTimesDetails
List<WorkTimeDetail>The WorkTimes Detail.
WorkTime(WorkTime)
Initializes a new instance of the WorkTime class.
protected WorkTime(WorkTime workTime)
Parameters
workTime
WorkTimeThe work times header.
Properties
Comment
Gets or sets free text field where any user information can be stored and referenced for this entity. Default [""].
public virtual string? Comment { get; set; }
Property Value
Details
Gets or sets the list of WorkTimeDetail(s).
public virtual List<WorkTimeDetail>? Details { get; set; }
Property Value
HolidayGroup
Gets or sets the WorkTimeHolidayGroupId.
public virtual WorkTimeHolidayGroupId? HolidayGroup { get; set; }
Property Value
Name
Gets or sets the name of this entity which identifies it and is used when displaying this entity. Maximum length [50].
[ExcelColumnHeader(new ReportHeading[] { ReportHeading.WorkTimeName })]
public override string? Name { get; set; }
Property Value
Methods
Clone()
Creates a new object that is a copy of the current instance.
public override IEntity Clone()
Returns
- IEntity
A new object that is a copy of this instance.
PopulateDefaults()
Populate non-required empty (null) properties with default values.
public void PopulateDefaults()
SortDetails()
Sorts the details.
public void SortDetails()
SystemFromId(Id?)
Returns a system WorkTime from the provided system Id else null if its a not a system WorkTime.
public static WorkTime? SystemFromId(Id? id)
Parameters
id
IdThe id.
Returns
- WorkTime
The worktime represented by the given Id.