using CoreModels.Enums.Department;
using CoreModels.ModelsDepartment;
using System;
using ToolsModule.ManagmentEntity;
using ToolsModule.ManagmentMapping;
namespace DepartmentContract.ViewModels
{
///
/// Список напарвлений обучений
///
public class EducationDirectionListViewModel : ListViewModel { }
///
/// Элемент направления обучения
///
[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")]
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; }
}
}