2022-03-18 22:08:29 +04:00
|
|
|
|
using CoreModels.Enums.Department;
|
|
|
|
|
using CoreModels.ModelsDepartment;
|
2021-04-12 16:57:29 +04:00
|
|
|
|
using System;
|
2022-03-20 10:10:44 +04:00
|
|
|
|
using ToolsModule.ManagmentEntity;
|
|
|
|
|
using ToolsModule.ManagmentMapping;
|
2021-04-12 16:57:29 +04:00
|
|
|
|
|
2022-03-19 22:48:13 +04:00
|
|
|
|
namespace DepartmentContract.ViewModels
|
2021-04-12 16:57:29 +04:00
|
|
|
|
{
|
2022-03-18 22:08:29 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Список студентов
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class StudentListViewModel : ListViewModel<StudentViewModel> { }
|
2021-04-12 16:57:29 +04:00
|
|
|
|
|
|
|
|
|
/// <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")]
|
2022-03-18 22:08:29 +04:00
|
|
|
|
public class StudentViewModel : ElementViewModel, IStudentModel
|
2021-04-12 16:57:29 +04:00
|
|
|
|
{
|
|
|
|
|
[ViewModelControlElementProperty("Пользователь", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlUserList, SecurityWindowsDesktop")]
|
|
|
|
|
public Guid UserId { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Группа", ControlType.ControlGuid, MustHaveValue = false, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlStudentGroupList, DepartmentWindowsDesktop")]
|
|
|
|
|
public Guid? StudentGroupId { get; set; }
|
|
|
|
|
|
2022-03-20 19:27:50 +04:00
|
|
|
|
[MapConfiguration("StudentGroup.ToString")]
|
2021-04-27 19:10:38 +04:00
|
|
|
|
public string StudentGroupName { get; set; }
|
|
|
|
|
|
2021-04-28 17:58:52 +04:00
|
|
|
|
[ViewModelControlElementProperty("Идентификатор универа", ControlType.ControlString, MustHaveValue = true, ReadOnly = true)]
|
|
|
|
|
public string Iduniv { get; set; }
|
|
|
|
|
|
2021-04-12 16:57:29 +04:00
|
|
|
|
[ViewModelControlListProperty("Номер зачетки")]
|
|
|
|
|
[ViewModelControlElementProperty("Номер зачетки", ControlType.ControlString, MustHaveValue = true, ReadOnly = true)]
|
|
|
|
|
public string NumberOfBook { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Фамилия")]
|
|
|
|
|
[ViewModelControlElementProperty("Фамилия", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
public string LastName { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Имя")]
|
|
|
|
|
[ViewModelControlElementProperty("Имя", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
public string FirstName { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Отчество")]
|
|
|
|
|
[ViewModelControlElementProperty("Отчество", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
public string Patronymic { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Эл. почта", ColumnWidth = 90)]
|
|
|
|
|
[ViewModelControlElementProperty("Эл. почта", ControlType.ControlString, MustHaveValue = true)]
|
|
|
|
|
public string Email { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Описание", ControlType.ControlText)]
|
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Статус", ControlType.ControlEnum, MustHaveValue = true)]
|
|
|
|
|
public StudentState StudentState { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Статус", ColumnWidth = 90)]
|
|
|
|
|
public string StudentStateTitle => StudentState.ToString("G");
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Фото", ControlType.ControlImage, Width = 200, Height = 200)]
|
|
|
|
|
public byte[] Photo { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Староста", ControlType.ControlBool, MustHaveValue = true)]
|
|
|
|
|
public bool IsSteward { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|