2021-04-03 09:18:19 +04:00
|
|
|
|
using ModuleTools.Attributes;
|
|
|
|
|
using ModuleTools.Enums;
|
|
|
|
|
using ModuleTools.ViewModels;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace DepartmentBusinessLogic.ViewModels
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Список связей сотрудников и должностей
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class EmployeeEmployeePostListViewModel : ListViewModel<EmployeeEmployeePostViewModel> { }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Связь сотрудника и должности
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ViewModelControlElementClass()]
|
|
|
|
|
public class EmployeeEmployeePostViewModel : ElementViewModel
|
|
|
|
|
{
|
|
|
|
|
[MapConfiguration("EmployeeId", AllowCopyWithoutRigth = false)]
|
|
|
|
|
// [ViewModelControlElementProperty("Сотрудник", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlUserList, SecurityWindowsDesktop")]
|
|
|
|
|
public Guid EmployeeId { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Сотрудник")]
|
|
|
|
|
[MapConfiguration("Employee.LastName", IsDifficle = true)]
|
|
|
|
|
public string EmployeeName { get; set; }
|
|
|
|
|
|
|
|
|
|
[MapConfiguration("EmployeePostId")]
|
|
|
|
|
//[ViewModelControlElementProperty("Должность", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "SecurityWindowsDesktop.EntityControls.ControlRoleList, SecurityWindowsDesktop")]
|
|
|
|
|
public Guid EmployeePostId { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Должность")]
|
2021-04-03 09:37:04 +04:00
|
|
|
|
[MapConfiguration("EmployeePost.EmployeePostName", IsDifficle = true)]
|
2021-04-03 09:18:19 +04:00
|
|
|
|
public string EmployeePostName { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Ставка", 80)]
|
|
|
|
|
[ViewModelControlElementProperty("Ставка", ControlType.ControlDecimal, MustHaveValue = true)]
|
|
|
|
|
[MapConfiguration("Rate")]
|
|
|
|
|
public decimal Rate { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Внутр. совм.", ControlType.ControlBool)]
|
|
|
|
|
[MapConfiguration("IsInternalCombination")]
|
|
|
|
|
public bool IsInternalCombination { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Внутр. совм.", 80)]
|
|
|
|
|
public string InternalCombination => IsInternalCombination ? "Да" : "Нет";
|
|
|
|
|
|
|
|
|
|
[ViewModelControlElementProperty("Внеш. совм.", ControlType.ControlBool)]
|
|
|
|
|
[MapConfiguration("IsExternalCombination")]
|
|
|
|
|
public bool IsExternalCombination { get; set; }
|
|
|
|
|
|
|
|
|
|
[ViewModelControlListProperty("Внеш. совм.", 80)]
|
|
|
|
|
public string ExternalCombination => IsExternalCombination ? "Да" : "Нет";
|
|
|
|
|
|
|
|
|
|
public override string ToString() => $"{EmployeeName}-{EmployeePostName}";
|
|
|
|
|
}
|
|
|
|
|
}
|