64 lines
2.9 KiB
C#
64 lines
2.9 KiB
C#
using DepartmentBusinessLogic.Enums;
|
|
using ModuleTools.Attributes;
|
|
using ModuleTools.Enums;
|
|
using ModuleTools.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")]
|
|
public class EducationDirectionViewModel : ElementViewModel
|
|
{
|
|
[ViewModelControlListProperty("Шифр", ColumnWidth = 80)]
|
|
[ViewModelControlElementProperty("Шифр", ControlType.ControlString, MustHaveValue = true)]
|
|
[MapConfiguration("Cipher")]
|
|
public string Cipher { get; set; }
|
|
|
|
[ViewModelControlListProperty("Сокращение", ColumnWidth = 80)]
|
|
[ViewModelControlElementProperty("Сокращение", ControlType.ControlString, MustHaveValue = true)]
|
|
[MapConfiguration("ShortName")]
|
|
public string ShortName { get; set; }
|
|
|
|
[ViewModelControlListProperty("Название")]
|
|
[ViewModelControlElementProperty("Название", ControlType.ControlString, MustHaveValue = true)]
|
|
[MapConfiguration("Title")]
|
|
public string Title { get; set; }
|
|
|
|
[ViewModelControlListProperty("Профиль")]
|
|
[ViewModelControlElementProperty("Профиль", ControlType.ControlString)]
|
|
[MapConfiguration("Profile")]
|
|
public string Profile { get; set; }
|
|
|
|
[ViewModelControlElementProperty("Руководитель ОПОП", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerList, DepartmentWindowsDesktop")]
|
|
[MapConfiguration("LecturerId")]
|
|
public Guid LecturerId { get; set; }
|
|
|
|
[ViewModelControlListProperty("Руководитель ОПОП", ColumnWidth = 120)]
|
|
[MapConfiguration("Lecturer.LastName", IsDifficle = true)]
|
|
public string LecturerName { get; set; }
|
|
|
|
[ViewModelControlElementProperty("Уровень обучения", ControlType.ControlEnum, MustHaveValue = true)]
|
|
[MapConfiguration("Qualification")]
|
|
public EducationDirectionQualification Qualification { get; set; }
|
|
|
|
[ViewModelControlListProperty("ровень обучения")]
|
|
public string QualificationTitle => Qualification.ToString("G");
|
|
|
|
[ViewModelControlListProperty("Описание")]
|
|
[ViewModelControlElementProperty("Описание", ControlType.ControlText, Height = 80)]
|
|
[MapConfiguration("Description")]
|
|
public string Description { get; set; }
|
|
|
|
public override string ToString() => $"{Cipher} {ShortName}";
|
|
}
|
|
} |