Table of Contents

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

id Id

The Id.

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 Id

The Id.

name string

The name.

comment string

The comment.

holidayGroup WorkTimeHolidayGroupId

The 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 WorkTime

The 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

string

Comment

Details

Gets or sets the list of WorkTimeDetail(s).

public virtual List<WorkTimeDetail>? Details { get; set; }

Property Value

List<WorkTimeDetail>

Details

HolidayGroup

Gets or sets the WorkTimeHolidayGroupId.

public virtual WorkTimeHolidayGroupId? HolidayGroup { get; set; }

Property Value

WorkTimeHolidayGroupId

WorkTimeHolidayGroupId

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

string

string

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 Id

The id.

Returns

WorkTime

The worktime represented by the given Id.