2022-03-18 21:34:16 +04:00
|
|
|
|
using CoreModels.Enums.Department;
|
|
|
|
|
using CoreModels.ModelsDepartment;
|
2021-04-06 22:07:11 +04:00
|
|
|
|
using System;
|
2022-03-20 10:10:44 +04:00
|
|
|
|
using ToolsModule.ManagmentEntity;
|
|
|
|
|
using ToolsModule.ManagmentMapping;
|
2021-04-06 22:07:11 +04:00
|
|
|
|
|
2022-03-19 22:48:13 +04:00
|
|
|
|
namespace DepartmentContract.ViewModels
|
2021-04-06 22:07:11 +04:00
|
|
|
|
{
|
2022-03-18 21:34:16 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Список аудиторий
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class AcademicPlanRecordListViewModel : ListViewModel<AcademicPlanRecordViewModel> { }
|
2021-04-06 22:07:11 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Элемент аудитории
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
|
|
|
|
|
[ViewModelControlElementDependenceEntity(Title = "Часы по нагрузкам", Order = 1, ParentPropertyName = "AcademicPlanRecordId",
|
|
|
|
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlAcademicPlanRecordTimeNormHourList, DepartmentWindowsDesktop")]
|
2022-03-18 21:34:16 +04:00
|
|
|
|
public class AcademicPlanRecordViewModel : ElementViewModel, IAcademicPlanRecordModel
|
2021-04-06 22:07:11 +04:00
|
|
|
|
{
|
|
|
|
|
[ViewModelControlElementProperty("Учебный план", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlAcademicPlanList, DepartmentWindowsDesktop")]
|
|
|
|
|
public Guid AcademicPlanId { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Дисциплина", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlDisciplineList, DepartmentWindowsDesktop")]
|
|
|
|
|
public Guid DisciplineId { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Дисциплина")]
|
2021-04-13 12:52:45 +04:00
|
|
|
|
[MapConfiguration("Discipline.ToString", IsDifficle = true)]
|
2021-04-06 22:07:11 +04:00
|
|
|
|
public string DisciplineName { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Преподается на кафедре", ControlType.ControlBool, MustHaveValue = true)]
|
|
|
|
|
public bool InDepartment { get; set; }
|
|
|
|
|
|
2021-04-11 20:49:26 +04:00
|
|
|
|
[ViewModelControlListProperty("На кафедре", ColumnWidth = 100)]
|
2021-04-06 22:07:11 +04:00
|
|
|
|
public string InDepartmentValue => InDepartment ? "Да" : "Нет";
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Семестр", ControlType.ControlEnum, MustHaveValue = true)]
|
|
|
|
|
public Semester Semester { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Семестр", ColumnWidth = 80)]
|
|
|
|
|
public string SemesterTitle => Semester.ToString("G");
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Зет", ColumnWidth = 60)]
|
|
|
|
|
[ViewModelControlElementProperty("Зет", ControlType.ControlInt, MustHaveValue = true)]
|
|
|
|
|
public int Zet { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Родитель", ControlType.ControlGuid, MustHaveValue = false, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlAcademicPlanRecordList, DepartmentWindowsDesktop")]
|
|
|
|
|
public Guid? AcademicPlanRecordParentId { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Является родительской", ControlType.ControlBool, MustHaveValue = true)]
|
|
|
|
|
public bool IsParent { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("ДВ", ColumnWidth = 50)]
|
|
|
|
|
public string IsParentValue => IsParent ? "Да" : "Нет";
|
|
|
|
|
|
2021-04-11 20:49:26 +04:00
|
|
|
|
[ViewModelControlListProperty("По выбору", ColumnWidth = 100)]
|
2021-04-06 22:07:11 +04:00
|
|
|
|
public string IsChildValue => AcademicPlanRecordParentId.HasValue ? "Да" : "Нет";
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Является факультативной", ControlType.ControlBool, MustHaveValue = true)]
|
|
|
|
|
public bool IsFacultative { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Факульт", ColumnWidth = 80)]
|
|
|
|
|
public string IsFacultativeValue => IsFacultative ? "Да" : "Нет";
|
|
|
|
|
|
|
|
|
|
public override string ToString() => $"{DisciplineName} - {SemesterTitle} семестр";
|
|
|
|
|
}
|
|
|
|
|
}
|