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

42 lines
2.1 KiB
C#

using CoreModels.ModelsDepartment;
using System;
using ToolsModule.ManagmentEntity;
using ToolsModule.ManagmentMapping;
namespace DepartmentContract.ViewModels
{
/// <summary>
/// Список аудиторий
/// </summary>
public class BasicDepartmentListViewModel : ListViewModel<BasicDepartmentViewModel> { }
/// <summary>
/// Элемент аудитории
/// </summary>
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 700)]
[ViewModelControlElementDependenceEntity(Title = "Дисциплины", Order = 1, ParentPropertyName = "BasicDepartmentId",
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlDisciplineList, DepartmentWindowsDesktop")]
[ViewModelControlElementDependenceEntity(Title = "Студенты", Order = 2, ParentPropertyName = "BasicDepartmentId",
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlStudentList, DepartmentWindowsDesktop")]
public class BasicDepartmentViewModel : ElementViewModel, IBasicDepartmentModel
{
[ViewModelControlElementProperty("Ответственный", ControlType.ControlGuid, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerList, DepartmentWindowsDesktop")]
public Guid? LecturerId { get; set; }
[ViewModelControlListProperty("Ответственный")]
[MapConfiguration("Lecturer.LastName")]
public string LecturerName { get; set; }
[ViewModelControlListProperty("Название", ColumnWidth = 100)]
[ViewModelControlElementProperty("Название", ControlType.ControlString, MustHaveValue = true)]
public string BasicDepartmentName { get; set; }
[ViewModelControlListProperty("Описание", ColumnWidth = 100)]
[ViewModelControlElementProperty("Описание", ControlType.ControlString)]
public string BasicDepartmentDescription { get; set; }
[ViewModelControlListProperty("Предприятие", ColumnWidth = 100)]
[ViewModelControlElementProperty("Предприятие", ControlType.ControlString, MustHaveValue = true)]
public string EnterprisesName { get; set; }
}
}