using CoreModels.Enums.Department; using CoreModels.ModelsDepartment; using System; using ToolsModule.ManagmentEntity; using ToolsModule.ManagmentMapping; namespace DepartmentContract.ViewModels { /// /// Список студентов /// public class StudentListViewModel : ListViewModel { } /// /// Элемент студент /// [ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)] [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 { [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; } [MapConfiguration("StudentGroup.ToString")] public string StudentGroupName { get; set; } [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; } [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; } [ViewModelControlListProperty("Базовая кафедра")] public bool IsBasicDepartmentId => BasicDepartmentId.HasValue; [ViewModelControlListProperty("Описание")] [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; } } }