DepartmentProject/DepartmentPortal/Security/SecurityBusinessLogic/ViewModels/EnviromentSettingViewModels.cs
kotcheshir73 e8836c8806 куча наработко по выводу элемента и списка
правки по сущностям безоапсности
2021-04-01 21:30:29 +04:00

35 lines
1.3 KiB
C#

using ModuleTools.Attributes;
using ModuleTools.Enums;
using ModuleTools.ViewModels;
namespace SecurityBusinessLogic.ViewModels
{
/// <summary>
/// Список общих настроек системы
/// </summary>
public class EnviromentSettingListViewModel : ListViewModel<EnviromentSettingViewModel> { }
/// <summary>
/// Элемент общих настроек системы
/// </summary>
[ViewModelControlElementClass()]
public class EnviromentSettingViewModel : ElementViewModel
{
[ViewModelControlListProperty("Ключ")]
[ViewModelControlElementProperty("Ключ", ControlType.ControlString, MustHaveValue = true, ReadOnly = true)]
[MapConfiguration("Key", AllowCopyWithoutRigth = false)]
public string Key { get; set; }
[ViewModelControlListProperty("Значение")]
[ViewModelControlElementProperty("Значение", ControlType.ControlString, MustHaveValue = true)]
[MapConfiguration("Value", AllowCopyWithoutRigth = false)]
public string Value { get; set; }
[ViewModelControlListProperty("Описание")]
[ViewModelControlElementProperty("Описание", ControlType.ControlText, 0, 200)]
[MapConfiguration("Description", AllowCopyWithoutRigth = false)]
public string Description { get; set; }
public override string ToString() => Key;
}
}