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

77 lines
4.3 KiB
C#

using CoreModels.Enums.Department;
using ModuleTools.Attributes;
using ModuleTools.Enums;
using ModuleTools.ViewModels;
using System;
namespace DepartmentBusinessLogic.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
{
[ViewModelControlElementProperty("Блок дисциплин", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlDisciplineBlockList, DepartmentWindowsDesktop")]
[MapConfiguration("DisciplineBlockId")]
public Guid DisciplineBlockId { get; set; }
[ViewModelControlListProperty("Название")]
[ViewModelControlElementProperty("Название", ControlType.ControlString, MustHaveValue = true)]
[MapConfiguration("TimeNormName")]
public string TimeNormName { get; set; }
[ViewModelControlListProperty("Сокращение", ColumnWidth = 100)]
[ViewModelControlElementProperty("Сокращение", ControlType.ControlString, MustHaveValue = true)]
[MapConfiguration("TimeNormShortName")]
public string TimeNormShortName { get; set; }
[ViewModelControlListProperty("Порядок", ColumnWidth = 100)]
[ViewModelControlElementProperty("Порядок", ControlType.ControlInt, MustHaveValue = true)]
[MapConfiguration("TimeNormOrder")]
public int TimeNormOrder { get; set; }
[ViewModelControlElementProperty("Обучение", ControlType.ControlEnum, MustHaveValue = false)]
[MapConfiguration("TimeNormEducationDirectionQualification")]
public EducationDirectionQualification? TimeNormEducationDirectionQualification { get; set; }
[ViewModelControlListProperty("Обучение", ColumnWidth = 100)]
public string TimeNormEducationDirectionQualificationTitle => TimeNormEducationDirectionQualification?.ToString("G") ?? string.Empty;
[ViewModelControlListProperty("Тип нагрузки", ColumnWidth = 300)]
[ViewModelControlElementProperty("Тип нагрузки", ControlType.ControlString)]
[MapConfiguration("KindOfLoadName")]
public string KindOfLoadName { get; set; }
[ViewModelControlElementProperty("Атрибут для поиска в старой версии", ControlType.ControlString)]
[MapConfiguration("KindOfLoadAttributeName")]
public string KindOfLoadAttributeName { get; set; }
[ViewModelControlElementProperty("Название нагрузки в справочнике видов работ", ControlType.ControlString)]
[MapConfiguration("KindOfLoadBlueAsteriskName")]
public string KindOfLoadBlueAsteriskName { get; set; }
[ViewModelControlElementProperty("Название нагрузки в справочнике видов работ", ControlType.ControlString)]
[MapConfiguration("KindOfLoadBlueAsteriskAttributeName")]
public string KindOfLoadBlueAsteriskAttributeName { get; set; }
[ViewModelControlElementProperty("Название атрибута по которму извлекать часы", ControlType.ControlString)]
[MapConfiguration("KindOfLoadBlueAsteriskPracticName")]
public string KindOfLoadBlueAsteriskPracticName { get; set; }
[ViewModelControlElementProperty("Учитывается в учебной нагрузке", ControlType.ControlBool, MustHaveValue = true)]
[MapConfiguration("UseInLearningProgress")]
public bool UseInLearningProgress { get; set; }
[ViewModelControlElementProperty("Выводить для сайта", ControlType.ControlBool, MustHaveValue = true)]
[MapConfiguration("UseInSite")]
public bool UseInSite { get; set; }
}
}