2021-04-03 08:05:01 +04:00
|
|
|
|
using ModuleTools.Attributes;
|
|
|
|
|
using ModuleTools.Enums;
|
|
|
|
|
using ModuleTools.ViewModels;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace DepartmentBusinessLogic.ViewModels
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2021-04-03 09:18:19 +04:00
|
|
|
|
/// Список сотрудников
|
2021-04-03 08:05:01 +04:00
|
|
|
|
/// </summary>
|
|
|
|
|
public class EmployeeListViewModel : ListViewModel<EmployeeViewModel> { }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2021-04-03 09:18:19 +04:00
|
|
|
|
/// Элемент сотрудник
|
2021-04-03 08:05:01 +04:00
|
|
|
|
/// </summary>
|
2021-04-03 11:41:02 +04:00
|
|
|
|
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 700)]
|
|
|
|
|
[ViewModelControlElementDependenceEntity(Title = "Должности", Order = 1, ParentPropertyName = "EmployeeId",
|
2021-04-05 12:25:10 +04:00
|
|
|
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlEmployeePostList, DepartmentWindowsDesktop")]
|
2021-04-03 13:41:19 +04:00
|
|
|
|
[ViewModelControlElementDependenceEntity(Title = "Аудитории", Order = 1, ParentPropertyName = "EmployeeId",
|
|
|
|
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlClassroomList, DepartmentWindowsDesktop")]
|
2021-04-03 08:05:01 +04:00
|
|
|
|
public class EmployeeViewModel : ElementViewModel
|
|
|
|
|
{
|
2021-04-03 11:41:02 +04:00
|
|
|
|
[ViewModelControlElementProperty("Пользователь", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlUserList, SecurityWindowsDesktop")]
|
2021-04-03 08:05:01 +04:00
|
|
|
|
[MapConfiguration("UserId")]
|
|
|
|
|
public Guid UserId { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Фамилия")]
|
|
|
|
|
[ViewModelControlElementProperty("Фамилия", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
[MapConfiguration("LastName")]
|
|
|
|
|
public string LastName { get; set; }
|
|
|
|
|
|
2021-04-03 11:41:02 +04:00
|
|
|
|
[ViewModelControlListProperty("Имя")]
|
|
|
|
|
[ViewModelControlElementProperty("Имя", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
[MapConfiguration("FirstName")]
|
|
|
|
|
public string FirstName { get; set; }
|
|
|
|
|
|
2021-04-03 08:05:01 +04:00
|
|
|
|
[ViewModelControlListProperty("Отчество")]
|
|
|
|
|
[ViewModelControlElementProperty("Отчество", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
[MapConfiguration("Patronymic")]
|
|
|
|
|
public string Patronymic { get; set; }
|
|
|
|
|
|
2021-04-03 13:50:58 +04:00
|
|
|
|
[ViewModelControlListProperty("Дата рожд.", ColumnWidth = 100, DefaultCellStyleFormat = "dd.MM.yyyy")]
|
2021-04-03 11:41:02 +04:00
|
|
|
|
[ViewModelControlElementProperty("Дата рожд.", ControlType.ControlDateTime, MustHaveValue = true )]
|
2021-04-03 09:18:19 +04:00
|
|
|
|
[MapConfiguration("DateBirth", AllowCopyWithoutRigth = false)]
|
2021-04-03 08:05:01 +04:00
|
|
|
|
public DateTime DateBirth { get; set; }
|
|
|
|
|
|
2021-04-03 13:50:58 +04:00
|
|
|
|
[ViewModelControlListProperty("Адрес", ColumnWidth = 90)]
|
2021-04-03 08:05:01 +04:00
|
|
|
|
[ViewModelControlElementProperty("Адрес", ControlType.ControlString, MustHaveValue = true)]
|
2021-04-03 09:18:19 +04:00
|
|
|
|
[MapConfiguration("Address", AllowCopyWithoutRigth = false)]
|
2021-04-03 08:05:01 +04:00
|
|
|
|
public string Address { get; set; }
|
|
|
|
|
|
2021-04-03 13:50:58 +04:00
|
|
|
|
[ViewModelControlListProperty("Эл. почта", ColumnWidth = 90)]
|
2021-04-03 08:05:01 +04:00
|
|
|
|
[ViewModelControlElementProperty("Эл. почта", ControlType.ControlString, MustHaveValue = true)]
|
2021-04-03 09:18:19 +04:00
|
|
|
|
[MapConfiguration("Email", AllowCopyWithoutRigth = false)]
|
2021-04-03 08:05:01 +04:00
|
|
|
|
public string Email { get; set; }
|
|
|
|
|
|
2021-04-03 13:50:58 +04:00
|
|
|
|
[ViewModelControlListProperty("Моб. номер", ColumnWidth = 100)]
|
2021-04-03 08:05:01 +04:00
|
|
|
|
[ViewModelControlElementProperty("Моб. номер", ControlType.ControlString, MustHaveValue = true)]
|
2021-04-03 09:18:19 +04:00
|
|
|
|
[MapConfiguration("MobileNumber", AllowCopyWithoutRigth = false)]
|
2021-04-03 08:05:01 +04:00
|
|
|
|
public string MobileNumber { get; set; }
|
|
|
|
|
|
2021-04-03 13:50:58 +04:00
|
|
|
|
[ViewModelControlListProperty("Дом. номер", ColumnWidth = 100)]
|
2021-04-03 11:41:02 +04:00
|
|
|
|
[ViewModelControlElementProperty("Дом. номер", ControlType.ControlString)]
|
2021-04-03 09:18:19 +04:00
|
|
|
|
[MapConfiguration("HomeNumber", AllowCopyWithoutRigth = false)]
|
2021-04-03 08:05:01 +04:00
|
|
|
|
public string HomeNumber { get; set; }
|
|
|
|
|
|
2021-04-03 11:41:02 +04:00
|
|
|
|
[ViewModelControlElementProperty("Описание", ControlType.ControlText)]
|
2021-04-03 08:05:01 +04:00
|
|
|
|
[MapConfiguration("Description")]
|
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
|
2021-04-03 11:41:02 +04:00
|
|
|
|
[ViewModelControlElementProperty("Фото", ControlType.ControlImage, Width = 200, Height = 200)]
|
2021-04-03 08:05:01 +04:00
|
|
|
|
[MapConfiguration("Photo")]
|
|
|
|
|
public byte[] Photo { get; set; }
|
|
|
|
|
|
2021-04-03 13:50:58 +04:00
|
|
|
|
[ViewModelControlListProperty("Гр. эл.без.", ColumnWidth = 90)]
|
2021-04-03 08:05:01 +04:00
|
|
|
|
[ViewModelControlElementProperty("Группа эл.безоп", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
[MapConfiguration("GroupElectricalSafety")]
|
|
|
|
|
public string GroupElectricalSafety { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|