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

55 lines
2.6 KiB
C#
Raw Permalink Normal View History

using CoreModels.Enums.Department;
using CoreModels.ModelsDepartment;
using System;
2022-03-20 10:10:44 +04:00
using ToolsModule.ManagmentEntity;
using ToolsModule.ManagmentMapping;
namespace DepartmentContract.ViewModels
{
/// <summary>
/// Список напарвлений обучений
/// </summary>
public class EducationDirectionListViewModel : ListViewModel<EducationDirectionViewModel> { }
/// <summary>
/// Элемент направления обучения
/// </summary>
2021-04-06 22:07:11 +04:00
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
[ViewModelControlElementDependenceEntity(Title = "Учебные планы", Order = 1, ParentPropertyName = "EducationDirectionId",
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlAcademicPlanList, 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)]
2022-03-20 19:27:50 +04:00
[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; }
}
}