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

78 lines
4.0 KiB
C#
Raw Normal View History

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
namespace DepartmentContract.ViewModels
2021-04-12 16:57: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")]
[ViewModelControlElementDependenceEntity(Title = "Оценки студента", Order = 1, ParentPropertyName = "StudentId",
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlStudentMarkPassedDisciplineList, DepartmentWindowsDesktop")]
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")]
public string StudentGroupName { get; set; }
2022-03-27 14:51:27 +04:00
[ViewModelControlElementProperty("Базовая кафедра", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlBasicDepartmentList, DepartmentWindowsDesktop")]
public Guid? BasicDepartmentId { get; set; }
[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; }
2022-03-27 14:51:27 +04:00
[ViewModelControlListProperty("Базовая кафедра")]
2022-12-16 17:43:23 +04:00
public bool IsBasicDepartmentId => BasicDepartmentId.HasValue;
2022-03-27 14:51:27 +04:00
2022-12-16 17:43:23 +04:00
[ViewModelControlListProperty("Описание")]
2021-04-12 16:57:29 +04:00
[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; }
}
2021-04-12 16:57:29 +04:00
}