DepartmentProject/DepartmentPortal/Department/DepartmentBusinessLogic/ViewModels/EducationDirectionViewModels.cs

58 lines
2.9 KiB
C#

using CoreModels.Enums.Department;
using CoreModels.ModelsDepartment;
using ToolsModule.Attributes;
using ToolsModule.Enums;
using ToolsModule.ViewModels;
using System;
namespace DepartmentBusinessLogic.ViewModels
{
/// <summary>
/// Список напарвлений обучений
/// </summary>
public class EducationDirectionListViewModel : ListViewModel<EducationDirectionViewModel> { }
/// <summary>
/// Элемент направления обучения
/// </summary>
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
[ViewModelControlElementDependenceEntity(Title = "Учебные планы", Order = 1, ParentPropertyName = "EducationDirectionId",
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlAcademicPlanList, DepartmentWindowsDesktop")]
[ViewModelControlElementDependenceEntity(Title = "Группы", Order = 2, ParentPropertyName = "EducationDirectionId",
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlStudentGroupList, DepartmentWindowsDesktop")]
public class EducationDirectionViewModel : ElementViewModel, IEducationDirectionModel
{
[ViewModelControlListProperty("Шифр", ColumnWidth = 80)]
[ViewModelControlElementProperty("Шифр", ControlType.ControlString, MustHaveValue = true)]
public string Cipher { get; set; }
[ViewModelControlListProperty("Сокращение", ColumnWidth = 80)]
[ViewModelControlElementProperty("Сокращение", ControlType.ControlString, MustHaveValue = true)]
public string ShortName { get; set; }
[ViewModelControlListProperty("Название")]
[ViewModelControlElementProperty("Название", ControlType.ControlString, MustHaveValue = true)]
public string Title { get; set; }
[ViewModelControlListProperty("Профиль")]
[ViewModelControlElementProperty("Профиль", ControlType.ControlString)]
public string Profile { get; set; }
[ViewModelControlElementProperty("Руководитель ОПОП", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerList, DepartmentWindowsDesktop")]
public Guid LecturerId { get; set; }
[ViewModelControlListProperty("Руководитель ОПОП", ColumnWidth = 120)]
[MapConfiguration("Lecturer.LastName", IsDifficle = true)]
public string LecturerName { get; set; }
[ViewModelControlElementProperty("Уровень обучения", ControlType.ControlEnum, MustHaveValue = true)]
public EducationDirectionQualification Qualification { get; set; }
[ViewModelControlListProperty("Уровень обучения")]
public string QualificationTitle => Qualification.ToString("G");
[ViewModelControlListProperty("Описание")]
[ViewModelControlElementProperty("Описание", ControlType.ControlText, Height = 80)]
public string Description { get; set; }
}
}