using CoreModels.ModelsDepartment;
using ModuleTools.Attributes;
using ModuleTools.Enums;
using ModuleTools.ViewModels;
using System;
namespace DepartmentBusinessLogic.ViewModels
{
///
/// Список историй синхронизации приказов
///
public class OrderSyncHistoryListViewModel : ListViewModel { }
///
/// Элемент история синхронизации приказов
///
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
[ViewModelControlElementDependenceEntity(Title = "Записи", Order = 1, ParentPropertyName = "OrderSyncHistoryId",
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlOrderSyncHistoryRecordList, DepartmentWindowsDesktop")]
public class OrderSyncHistoryViewModel : ElementViewModel, IOrderSyncHistoryModel
{
[ViewModelControlElementProperty("Дата", ControlType.ControlDateTime, MustHaveValue = true, ReadOnly = true)]
public DateTime SyncDate { get; set; }
[ViewModelControlListProperty("Дата")]
public string SyncDateTitle => $"Синхронизация данных от {SyncDate.ToString("dd.MM.yyyy HH:mm")}";
}
}