2021-04-02 22:44:29 +04:00
|
|
|
|
using ModuleTools.Attributes;
|
|
|
|
|
using ModuleTools.Enums;
|
|
|
|
|
using ModuleTools.ViewModels;
|
|
|
|
|
|
|
|
|
|
namespace DepartmentBusinessLogic.ViewModels
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
2021-04-03 22:04:11 +04:00
|
|
|
|
/// Список должностей сотрудников
|
2021-04-02 22:44:29 +04:00
|
|
|
|
/// </summary>
|
|
|
|
|
public class EmployeePostListViewModel : ListViewModel<EmployeePostViewModel> { }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2021-04-03 22:04:11 +04:00
|
|
|
|
/// Элемент должности сотрудников
|
2021-04-02 22:44:29 +04:00
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
|
2021-04-03 11:41:02 +04:00
|
|
|
|
[ViewModelControlElementDependenceEntity(Title = "Сотрудники", Order = 1, ParentPropertyName = "EmployeePostId",
|
|
|
|
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlEmployeePostEmployeeList, DepartmentWindowsDesktop")]
|
2021-04-04 10:18:45 +04:00
|
|
|
|
[ViewModelControlElementDependenceEntity(Title = "Сотрудники", Order = 1, ParentPropertyName = "EmployeePostId",
|
|
|
|
|
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlEmployeePostLecturerList, DepartmentWindowsDesktop")]
|
2021-04-02 22:44:29 +04:00
|
|
|
|
public class EmployeePostViewModel : ElementViewModel
|
|
|
|
|
{
|
2021-04-03 11:41:02 +04:00
|
|
|
|
[ViewModelControlListProperty("Название должности")]
|
2021-04-03 22:04:11 +04:00
|
|
|
|
[ViewModelControlElementProperty("Название должности", ControlType.ControlString, MustHaveValue = true)]
|
2021-04-02 22:44:29 +04:00
|
|
|
|
[MapConfiguration("EmployeePostName")]
|
|
|
|
|
public string EmployeePostName { get; set; }
|
|
|
|
|
|
2021-04-03 13:50:58 +04:00
|
|
|
|
[ViewModelControlListProperty("Порядок", ColumnWidth = 100)]
|
2021-04-02 22:44:29 +04:00
|
|
|
|
[ViewModelControlElementProperty("Порядок", ControlType.ControlInt, MustHaveValue = true)]
|
|
|
|
|
[MapConfiguration("Order")]
|
|
|
|
|
public int Order { get; set; }
|
|
|
|
|
|
|
|
|
|
public override string ToString() => EmployeePostName;
|
|
|
|
|
}
|
|
|
|
|
}
|