Class Worker
A worker.
[DataContract(IsReference = true)]
[KnownType(typeof(Group))]
public class Worker
- Inheritance
-
Worker
- Inherited Members
Constructors
Worker(int, string, string, string)
Initializes a new instance of the Worker class.
public Worker(int workerId, string badgeNumber, string lastName, string firstName)
Parameters
workerIdintThe worker identification number.
badgeNumberstringThe badge number.
lastNamestringThe last name.
firstNamestringThe first name.
Exceptions
- ArgumentNullException
badgeNumberis null.- ArgumentNullException
lastNameis null.- ArgumentNullException
firstNameis null.
Properties
BadgeNumber
Gets the badge number.
[DataMember]
public string BadgeNumber { get; }
Property Value
FirstName
Gets the first name.
[DataMember]
public string FirstName { get; }
Property Value
FullName
Gets the full name of the worker.
public string FullName { get; }
Property Value
Remarks
This property value is derived from the FirstName and LastName properties.
FullNameAndNumber
Gets the full name and id of the worker, in the form "FullName (BadgeNumber)".
public string FullNameAndNumber { get; }
Property Value
Remarks
This property value is derived from the FirstName, LastName, and BadgeNumber properties.
Groups
Gets the list of groups to which this worker belongs.
public IList<Group> Groups { get; }
Property Value
IsActive
Gets or sets whether this worker is an active worker (i.e., allowed to log on).
[DataMember]
public bool IsActive { get; set; }
Property Value
LastName
Gets the last name.
[DataMember]
public string LastName { get; }
Property Value
WorkerId
Gets the worker identification number.
[DataMember]
public int WorkerId { get; }
Property Value
Methods
ToString()
Returns the FullNameAndNumber value as a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.