2022-03-18 21:44:04 +04:00
|
|
|
|
using CoreModels.ModelsDepartment;
|
|
|
|
|
using ModuleTools.Attributes;
|
2021-04-03 22:04:11 +04:00
|
|
|
|
using ModuleTools.Enums;
|
|
|
|
|
using ModuleTools.ViewModels;
|
|
|
|
|
|
|
|
|
|
namespace DepartmentBusinessLogic.ViewModels
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2021-04-05 12:25:10 +04:00
|
|
|
|
/// Список должностей
|
2021-04-03 22:04:11 +04:00
|
|
|
|
/// </summary>
|
2021-04-05 12:25:10 +04:00
|
|
|
|
public class PostListViewModel : ListViewModel<PostViewModel> { }
|
2021-04-03 22:04:11 +04:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2021-04-05 12:25:10 +04:00
|
|
|
|
/// Элемент должности
|
2021-04-03 22:04:11 +04:00
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
|
2021-04-05 12:25:10 +04:00
|
|
|
|
[ViewModelControlElementDependenceEntity(Title = "Сотрудники", Order = 1, ParentPropertyName = "PostId",
|
|
|
|
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlEmployeePostList, DepartmentWindowsDesktop")]
|
|
|
|
|
[ViewModelControlElementDependenceEntity(Title = "Преподаватели", Order = 1, ParentPropertyName = "PostId",
|
|
|
|
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlLecturerPostList, DepartmentWindowsDesktop")]
|
2022-03-18 21:44:04 +04:00
|
|
|
|
public class PostViewModel : ElementViewModel, IPostModel
|
2021-04-03 22:04:11 +04:00
|
|
|
|
{
|
|
|
|
|
[ViewModelControlListProperty("Название должности")]
|
|
|
|
|
[ViewModelControlElementProperty("Название должности", ControlType.ControlString, MustHaveValue = true)]
|
2021-04-05 12:25:10 +04:00
|
|
|
|
public string PostName { get; set; }
|
2021-04-03 22:04:11 +04:00
|
|
|
|
|
2021-04-05 12:25:10 +04:00
|
|
|
|
[ViewModelControlElementProperty("Часы", ControlType.ControlInt, MustHaveValue = false)]
|
|
|
|
|
public int? Hours { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Часы", ColumnWidth = 100)]
|
|
|
|
|
public string HoursStr => Hours.HasValue ? Hours.ToString() : string.Empty;
|
2021-04-03 22:04:11 +04:00
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Порядок", ColumnWidth = 100)]
|
|
|
|
|
[ViewModelControlElementProperty("Порядок", ControlType.ControlInt, MustHaveValue = true)]
|
|
|
|
|
public int Order { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|