2021-04-12 16:57:29 +04:00
|
|
|
|
using DepartmentBusinessLogic.Enums;
|
|
|
|
|
using ModuleTools.Attributes;
|
|
|
|
|
using ModuleTools.Enums;
|
|
|
|
|
using ModuleTools.ViewModels;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace DepartmentBusinessLogic.ViewModels
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Список студентов
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class StudentListViewModel : ListViewModel<StudentViewModel> { }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Элемент студент
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
|
2021-04-13 12:52:45 +04:00
|
|
|
|
[ViewModelControlElementDependenceEntity(Title = "Приказы по студенту", Order = 1, ParentPropertyName = "StudentId",
|
|
|
|
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlOrderStudentRecordList, DepartmentWindowsDesktop")]
|
2021-04-12 16:57:29 +04:00
|
|
|
|
public class StudentViewModel : ElementViewModel
|
|
|
|
|
{
|
|
|
|
|
[ViewModelControlElementProperty("Пользователь", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlUserList, SecurityWindowsDesktop")]
|
|
|
|
|
[MapConfiguration("UserId")]
|
|
|
|
|
public Guid UserId { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Группа", ControlType.ControlGuid, MustHaveValue = false, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlStudentGroupList, DepartmentWindowsDesktop")]
|
|
|
|
|
[MapConfiguration("StudentGroupId")]
|
|
|
|
|
public Guid? StudentGroupId { get; set; }
|
|
|
|
|
|
2021-04-27 19:10:38 +04:00
|
|
|
|
[MapConfiguration("StudentGroup.ToString", IsDifficle = true)]
|
|
|
|
|
public string StudentGroupName { get; set; }
|
|
|
|
|
|
2021-04-12 16:57:29 +04:00
|
|
|
|
[ViewModelControlListProperty("Номер зачетки")]
|
|
|
|
|
[ViewModelControlElementProperty("Номер зачетки", ControlType.ControlString, MustHaveValue = true, ReadOnly = true)]
|
|
|
|
|
[MapConfiguration("NumberOfBook")]
|
|
|
|
|
public string NumberOfBook { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Фамилия")]
|
|
|
|
|
[ViewModelControlElementProperty("Фамилия", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
[MapConfiguration("LastName")]
|
|
|
|
|
public string LastName { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Имя")]
|
|
|
|
|
[ViewModelControlElementProperty("Имя", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
[MapConfiguration("FirstName")]
|
|
|
|
|
public string FirstName { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Отчество")]
|
|
|
|
|
[ViewModelControlElementProperty("Отчество", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
[MapConfiguration("Patronymic")]
|
|
|
|
|
public string Patronymic { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Эл. почта", ColumnWidth = 90)]
|
|
|
|
|
[ViewModelControlElementProperty("Эл. почта", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
[MapConfiguration("Email")]
|
|
|
|
|
public string Email { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Описание", ControlType.ControlText)]
|
|
|
|
|
[MapConfiguration("Description")]
|
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Статус", ControlType.ControlEnum, MustHaveValue = true)]
|
|
|
|
|
[MapConfiguration("StudentState")]
|
|
|
|
|
public StudentState StudentState { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Статус", ColumnWidth = 90)]
|
|
|
|
|
public string StudentStateTitle => StudentState.ToString("G");
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Фото", ControlType.ControlImage, Width = 200, Height = 200)]
|
|
|
|
|
[MapConfiguration("Photo")]
|
|
|
|
|
public byte[] Photo { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Староста", ControlType.ControlBool, MustHaveValue = true)]
|
|
|
|
|
[MapConfiguration("IsSteward")]
|
|
|
|
|
public bool IsSteward { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|