перевод моделей кафедры, итерация финальная

This commit is contained in:
kotcheshir73 2022-03-18 22:29:39 +04:00
parent e4377b8801
commit ed95a8eee3
8 changed files with 63 additions and 48 deletions

View File

@ -0,0 +1,16 @@
using CoreModels.Tools;
using ModuleTools.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CoreModels.ModelsDepartment
{
[EntityDescription("OrderSyncHistory", "История синхронизации приказов")]
public interface IOrderSyncHistoryModel : IId
{
DateTime SyncDate { get; }
}
}

View File

@ -0,0 +1,15 @@
using CoreModels.Tools;
using ModuleTools.Attributes;
using System;
namespace CoreModels.ModelsDepartment
{
[EntityDescription("OrderSyncHistoryRecord", "Дисципилна кафедры")]
[EntityDependency("OrderSyncHistory", "OrderSyncHistoryId", "История синхронизации прказов, к которой относитя запись")]
public interface IOrderSyncHistoryRecordModel : IId
{
Guid OrderSyncHistoryId { get; }
string Information { get; }
}
}

View File

@ -1,4 +1,4 @@
using ModuleTools.Attributes;
using CoreModels.ModelsDepartment;
using ModuleTools.Interfaces;
using System;
using System.Collections.Generic;
@ -8,16 +8,11 @@ using System.Runtime.Serialization;
namespace DatabaseCore.Models.Department
{
/// <summary>
/// Класс, описывающий историю синхронизации приказов
/// </summary>
[DataContract]
[EntityDescription("OrderSyncHistory", "История синхронизации приказов")]
public class OrderSyncHistory : IdEntity, IEntitySecurityExtenstion<OrderSyncHistory>
[DataContract]
public class OrderSyncHistory : IdEntity, IEntitySecurityExtenstion<OrderSyncHistory>, IOrderSyncHistoryModel
{
[DataMember]
[Required(ErrorMessage = "required")]
[MapConfiguration("SyncDate")]
public DateTime SyncDate { get; set; }
//-------------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
using ModuleTools.Attributes;
using CoreModels.ModelsDepartment;
using ModuleTools.Interfaces;
using System;
using System.ComponentModel.DataAnnotations;
@ -6,22 +6,15 @@ using System.Runtime.Serialization;
namespace DatabaseCore.Models.Department
{
/// <summary>
/// Класс, описывающий запись истории синхронизации приказов
/// </summary>
[DataContract]
[EntityDescription("OrderSyncHistoryRecord", "Дисципилна кафедры")]
[EntityDependency("OrderSyncHistory", "OrderSyncHistoryId", "История синхронизации прказов, к которой относитя запись")]
public class OrderSyncHistoryRecord : IdEntity, IEntitySecurityExtenstion<OrderSyncHistoryRecord>
[DataContract]
public class OrderSyncHistoryRecord : IdEntity, IEntitySecurityExtenstion<OrderSyncHistoryRecord>, IOrderSyncHistoryRecordModel
{
[DataMember]
[Required(ErrorMessage = "required")]
[MapConfiguration("OrderSyncHistoryId")]
public Guid OrderSyncHistoryId { get; set; }
[DataMember]
[Required(ErrorMessage = "required")]
[MapConfiguration("Information")]
public string Information { get; set; }
//-------------------------------------------------------------------------

View File

@ -1,24 +1,23 @@
using ModuleTools.Attributes;
using CoreModels.ModelsDepartment;
using ModuleTools.BindingModels;
using System;
using System.ComponentModel.DataAnnotations;
namespace DepartmentBusinessLogic.BindingModels
{
/// <summary>
/// Получение истории синхронизации приказов
/// </summary>
public class OrderSyncHistoryGetBindingModel : GetBindingModel
/// <summary>
/// Получение истории синхронизации приказов
/// </summary>
public class OrderSyncHistoryGetBindingModel : GetBindingModel
{
}
/// <summary>
/// Сохранение истории синхронизации приказов
/// </summary>
public class OrderSyncHistorySetBindingModel : SetBindingModel
public class OrderSyncHistorySetBindingModel : SetBindingModel, IOrderSyncHistoryModel
{
[Required(ErrorMessage = "required")]
[MapConfiguration("SyncDate")]
public DateTime SyncDate { get; set; }
}
}

View File

@ -1,14 +1,14 @@
using ModuleTools.Attributes;
using CoreModels.ModelsDepartment;
using ModuleTools.BindingModels;
using System;
using System.ComponentModel.DataAnnotations;
namespace DepartmentBusinessLogic.BindingModels
{
/// <summary>
/// Получение записи истории синхронизации приказов
/// </summary>
public class OrderSyncHistoryRecordGetBindingModel : GetBindingModel
/// <summary>
/// Получение записи истории синхронизации приказов
/// </summary>
public class OrderSyncHistoryRecordGetBindingModel : GetBindingModel
{
public Guid? OrderSyncHistoryId { get; set; }
}
@ -16,14 +16,12 @@ namespace DepartmentBusinessLogic.BindingModels
/// <summary>
/// Сохранение записи истории синхронизации приказов
/// </summary>
public class OrderSyncHistoryRecordSetBindingModel : SetBindingModel
public class OrderSyncHistoryRecordSetBindingModel : SetBindingModel, IOrderSyncHistoryRecordModel
{
[Required(ErrorMessage = "required")]
[MapConfiguration("OrderSyncHistoryId")]
public Guid OrderSyncHistoryId { get; set; }
[Required(ErrorMessage = "required")]
[MapConfiguration("Information")]
public string Information { get; set; }
}
}

View File

@ -1,23 +1,23 @@
using ModuleTools.Attributes;
using CoreModels.ModelsDepartment;
using ModuleTools.Attributes;
using ModuleTools.Enums;
using ModuleTools.ViewModels;
using System;
namespace DepartmentBusinessLogic.ViewModels
{
/// <summary>
/// Список записей историй синхронизации приказов
/// </summary>
public class OrderSyncHistoryRecordListViewModel : ListViewModel<OrderSyncHistoryRecordViewModel> { }
/// <summary>
/// Список записей историй синхронизации приказов
/// </summary>
public class OrderSyncHistoryRecordListViewModel : ListViewModel<OrderSyncHistoryRecordViewModel> { }
/// <summary>
/// Элемент записи историй синхронизации приказов
/// </summary>
[ViewModelControlElementClass(HaveDependenceEntities = false, Width = 800, Height = 500)]
public class OrderSyncHistoryRecordViewModel : ElementViewModel
public class OrderSyncHistoryRecordViewModel : ElementViewModel, IOrderSyncHistoryRecordModel
{
[ViewModelControlElementProperty("История", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlOrderSyncHistoryList, DepartmentWindowsDesktop")]
[MapConfiguration("OrderSyncHistoryId")]
public Guid OrderSyncHistoryId { get; set; }
[ViewModelControlListProperty("Дата", ColumnWidth = 100, DefaultCellStyleFormat = "dd.MM.yyyy")]
@ -26,7 +26,6 @@ namespace DepartmentBusinessLogic.ViewModels
[ViewModelControlListProperty("Описание")]
[ViewModelControlElementProperty("Описание", ControlType.ControlText, Height = 200, MustHaveValue = true)]
[MapConfiguration("Information")]
public string Information { get; set; }
}
}

View File

@ -1,14 +1,15 @@
using ModuleTools.Attributes;
using CoreModels.ModelsDepartment;
using ModuleTools.Attributes;
using ModuleTools.Enums;
using ModuleTools.ViewModels;
using System;
namespace DepartmentBusinessLogic.ViewModels
{
/// <summary>
/// Список историй синхронизации приказов
/// </summary>
public class OrderSyncHistoryListViewModel : ListViewModel<OrderSyncHistoryViewModel> { }
/// <summary>
/// Список историй синхронизации приказов
/// </summary>
public class OrderSyncHistoryListViewModel : ListViewModel<OrderSyncHistoryViewModel> { }
/// <summary>
/// Элемент история синхронизации приказов
@ -16,10 +17,9 @@ namespace DepartmentBusinessLogic.ViewModels
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
[ViewModelControlElementDependenceEntity(Title = "Записи", Order = 1, ParentPropertyName = "OrderSyncHistoryId",
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlOrderSyncHistoryRecordList, DepartmentWindowsDesktop")]
public class OrderSyncHistoryViewModel : ElementViewModel
public class OrderSyncHistoryViewModel : ElementViewModel, IOrderSyncHistoryModel
{
[ViewModelControlElementProperty("Дата", ControlType.ControlDateTime, MustHaveValue = true, ReadOnly = true)]
[MapConfiguration("SyncDate")]
public DateTime SyncDate { get; set; }
[ViewModelControlListProperty("Дата")]