36 lines
964 B
C#
36 lines
964 B
C#
using System.ComponentModel;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
namespace ProductionInCehOTP.Entities;
|
|
|
|
public class Worker
|
|
{
|
|
|
|
public int Id { get; private set; }
|
|
[Browsable(false)]
|
|
public string Name { get; private set; } = string.Empty;
|
|
[DisplayName("ФИО(разряд)")]
|
|
public string NameClass => $"{Name}({Class})";
|
|
|
|
[DisplayName("Рабочий стаж")]
|
|
public DateTime Experience { get; private set; }
|
|
|
|
[Browsable(false)]
|
|
public int Class { get; private set; }
|
|
|
|
[DisplayName("Дневная норма выработки")]
|
|
public int PlanWork { get; private set; }
|
|
|
|
public static Worker CreateWorker(int id, string name, DateTime experience, int classOfWorker, int planWorkID)
|
|
{
|
|
return new Worker
|
|
{
|
|
Id = id,
|
|
Name = name,
|
|
Experience = experience,
|
|
Class = classOfWorker,
|
|
PlanWork = planWorkID
|
|
};
|
|
}
|
|
}
|