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

66 lines
3.7 KiB
C#

using CoreModels.Enums.Department;
using CoreModels.ModelsDepartment;
using ToolsModule.Attributes;
using ToolsModule.Enums;
using ToolsModule.ViewModels;
using System;
namespace DepartmentContract.ViewModels
{
/// <summary>
/// Список норм времени
/// </summary>
public class TimeNormListViewModel : ListViewModel<TimeNormViewModel> { }
/// <summary>
/// Элемент нормы времени
/// </summary>
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
[ViewModelControlElementDependenceEntity(Title = "Нагрузки в планах", Order = 1, ParentPropertyName = "TimeNormId",
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlAcademicPlanRecordTimeNormHourList, DepartmentWindowsDesktop")]
public class TimeNormViewModel : ElementViewModel, ITimeNormModel
{
[ViewModelControlElementProperty("Блок дисциплин", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlDisciplineBlockList, DepartmentWindowsDesktop")]
public Guid DisciplineBlockId { get; set; }
[ViewModelControlListProperty("Название")]
[ViewModelControlElementProperty("Название", ControlType.ControlString, MustHaveValue = true)]
public string TimeNormName { get; set; }
[ViewModelControlListProperty("Сокращение", ColumnWidth = 100)]
[ViewModelControlElementProperty("Сокращение", ControlType.ControlString, MustHaveValue = true)]
public string TimeNormShortName { get; set; }
[ViewModelControlListProperty("Порядок", ColumnWidth = 100)]
[ViewModelControlElementProperty("Порядок", ControlType.ControlInt, MustHaveValue = true)]
public int TimeNormOrder { get; set; }
[ViewModelControlElementProperty("Обучение", ControlType.ControlEnum, MustHaveValue = false)]
public EducationDirectionQualification? TimeNormEducationDirectionQualification { get; set; }
[ViewModelControlListProperty("Обучение", ColumnWidth = 100)]
public string TimeNormEducationDirectionQualificationTitle => TimeNormEducationDirectionQualification?.ToString("G") ?? string.Empty;
[ViewModelControlListProperty("Тип нагрузки", ColumnWidth = 300)]
[ViewModelControlElementProperty("Тип нагрузки", ControlType.ControlString)]
public string KindOfLoadName { get; set; }
[ViewModelControlElementProperty("Атрибут для поиска в старой версии", ControlType.ControlString)]
public string KindOfLoadAttributeName { get; set; }
[ViewModelControlElementProperty("Название нагрузки в справочнике видов работ", ControlType.ControlString)]
public string KindOfLoadBlueAsteriskName { get; set; }
[ViewModelControlElementProperty("Название нагрузки в справочнике видов работ", ControlType.ControlString)]
public string KindOfLoadBlueAsteriskAttributeName { get; set; }
[ViewModelControlElementProperty("Название атрибута по которму извлекать часы", ControlType.ControlString)]
public string KindOfLoadBlueAsteriskPracticName { get; set; }
[ViewModelControlElementProperty("Учитывается в учебной нагрузке", ControlType.ControlBool, MustHaveValue = true)]
public bool UseInLearningProgress { get; set; }
[ViewModelControlElementProperty("Выводить для сайта", ControlType.ControlBool, MustHaveValue = true)]
public bool UseInSite { get; set; }
}
}