DepartmentProject/DepartmentPortal/Department/DepartmentContract/ViewModels/EmployeeViewModels.cs

69 lines
3.4 KiB
C#
Raw Normal View History

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