2022-03-18 21:44:04 +04:00
|
|
|
|
using CoreModels.ModelsDepartment;
|
|
|
|
|
using ModuleTools.Attributes;
|
2021-04-02 22:44:29 +04:00
|
|
|
|
using ModuleTools.Enums;
|
|
|
|
|
using ModuleTools.ViewModels;
|
2021-04-05 12:25:10 +04:00
|
|
|
|
using System;
|
2021-04-02 22:44:29 +04:00
|
|
|
|
|
|
|
|
|
namespace DepartmentBusinessLogic.ViewModels
|
|
|
|
|
{
|
2021-04-05 12:25:10 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Список связей сотрудников и должностей
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class EmployeePostListViewModel : ListViewModel<EmployeePostViewModel> { }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Связь сотрудника и должности
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewModelControlElementClass()]
|
2022-03-18 21:44:04 +04:00
|
|
|
|
public class EmployeePostViewModel : ElementViewModel, IEmployeePostModel
|
2021-04-05 12:25:10 +04:00
|
|
|
|
{
|
|
|
|
|
[ViewModelControlElementProperty("Сотрудник", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlEmployeeList, DepartmentWindowsDesktop")]
|
|
|
|
|
public Guid EmployeeId { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Сотрудник")]
|
2021-04-13 12:52:45 +04:00
|
|
|
|
[MapConfiguration("Employee.ToString", IsDifficle = true)]
|
2021-04-05 12:25:10 +04:00
|
|
|
|
public string EmployeeName { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Должность", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlPostList, DepartmentWindowsDesktop")]
|
|
|
|
|
public Guid PostId { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Должность")]
|
2021-04-13 12:52:45 +04:00
|
|
|
|
[MapConfiguration("Post.ToString", IsDifficle = true)]
|
2021-04-05 12:25:10 +04:00
|
|
|
|
public string PostName { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Ставка", ColumnWidth = 80, DefaultCellStyleFormat = "N1")]
|
|
|
|
|
[ViewModelControlElementProperty("Ставка", ControlType.ControlDecimal, DecimalPlaces = 1, MustHaveValue = true)]
|
|
|
|
|
public decimal Rate { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Внутр. совм.", ControlType.ControlBool, MustHaveValue = true)]
|
|
|
|
|
public bool IsInternalCombination { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Внутр. совм.", ColumnWidth = 80)]
|
|
|
|
|
public string InternalCombination => IsInternalCombination ? "Да" : "Нет";
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Внеш. совм.", ControlType.ControlBool, MustHaveValue = true)]
|
|
|
|
|
public bool IsExternalCombination { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Внеш. совм.", ColumnWidth = 80)]
|
|
|
|
|
public string ExternalCombination => IsExternalCombination ? "Да" : "Нет";
|
|
|
|
|
}
|
2021-04-02 22:44:29 +04:00
|
|
|
|
}
|