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

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

View File

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

View File

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

View File

@ -1,14 +1,14 @@
using ModuleTools.Attributes; using CoreModels.ModelsDepartment;
using ModuleTools.BindingModels; using ModuleTools.BindingModels;
using System; using System;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace DepartmentBusinessLogic.BindingModels namespace DepartmentBusinessLogic.BindingModels
{ {
/// <summary> /// <summary>
/// Получение записи истории синхронизации приказов /// Получение записи истории синхронизации приказов
/// </summary> /// </summary>
public class OrderSyncHistoryRecordGetBindingModel : GetBindingModel public class OrderSyncHistoryRecordGetBindingModel : GetBindingModel
{ {
public Guid? OrderSyncHistoryId { get; set; } public Guid? OrderSyncHistoryId { get; set; }
} }
@ -16,14 +16,12 @@ namespace DepartmentBusinessLogic.BindingModels
/// <summary> /// <summary>
/// Сохранение записи истории синхронизации приказов /// Сохранение записи истории синхронизации приказов
/// </summary> /// </summary>
public class OrderSyncHistoryRecordSetBindingModel : SetBindingModel public class OrderSyncHistoryRecordSetBindingModel : SetBindingModel, IOrderSyncHistoryRecordModel
{ {
[Required(ErrorMessage = "required")] [Required(ErrorMessage = "required")]
[MapConfiguration("OrderSyncHistoryId")]
public Guid OrderSyncHistoryId { get; set; } public Guid OrderSyncHistoryId { get; set; }
[Required(ErrorMessage = "required")] [Required(ErrorMessage = "required")]
[MapConfiguration("Information")]
public string Information { get; set; } 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.Enums;
using ModuleTools.ViewModels; using ModuleTools.ViewModels;
using System; using System;
namespace DepartmentBusinessLogic.ViewModels namespace DepartmentBusinessLogic.ViewModels
{ {
/// <summary> /// <summary>
/// Список записей историй синхронизации приказов /// Список записей историй синхронизации приказов
/// </summary> /// </summary>
public class OrderSyncHistoryRecordListViewModel : ListViewModel<OrderSyncHistoryRecordViewModel> { } public class OrderSyncHistoryRecordListViewModel : ListViewModel<OrderSyncHistoryRecordViewModel> { }
/// <summary> /// <summary>
/// Элемент записи историй синхронизации приказов /// Элемент записи историй синхронизации приказов
/// </summary> /// </summary>
[ViewModelControlElementClass(HaveDependenceEntities = false, Width = 800, Height = 500)] [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")] [ViewModelControlElementProperty("История", ControlType.ControlGuid, MustHaveValue = true, ReadOnly = false, ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlOrderSyncHistoryList, DepartmentWindowsDesktop")]
[MapConfiguration("OrderSyncHistoryId")]
public Guid OrderSyncHistoryId { get; set; } public Guid OrderSyncHistoryId { get; set; }
[ViewModelControlListProperty("Дата", ColumnWidth = 100, DefaultCellStyleFormat = "dd.MM.yyyy")] [ViewModelControlListProperty("Дата", ColumnWidth = 100, DefaultCellStyleFormat = "dd.MM.yyyy")]
@ -26,7 +26,6 @@ namespace DepartmentBusinessLogic.ViewModels
[ViewModelControlListProperty("Описание")] [ViewModelControlListProperty("Описание")]
[ViewModelControlElementProperty("Описание", ControlType.ControlText, Height = 200, MustHaveValue = true)] [ViewModelControlElementProperty("Описание", ControlType.ControlText, Height = 200, MustHaveValue = true)]
[MapConfiguration("Information")]
public string Information { get; set; } 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.Enums;
using ModuleTools.ViewModels; using ModuleTools.ViewModels;
using System; using System;
namespace DepartmentBusinessLogic.ViewModels namespace DepartmentBusinessLogic.ViewModels
{ {
/// <summary> /// <summary>
/// Список историй синхронизации приказов /// Список историй синхронизации приказов
/// </summary> /// </summary>
public class OrderSyncHistoryListViewModel : ListViewModel<OrderSyncHistoryViewModel> { } public class OrderSyncHistoryListViewModel : ListViewModel<OrderSyncHistoryViewModel> { }
/// <summary> /// <summary>
/// Элемент история синхронизации приказов /// Элемент история синхронизации приказов
@ -16,10 +17,9 @@ namespace DepartmentBusinessLogic.ViewModels
[ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)] [ViewModelControlElementClass(HaveDependenceEntities = true, Width = 800, Height = 500)]
[ViewModelControlElementDependenceEntity(Title = "Записи", Order = 1, ParentPropertyName = "OrderSyncHistoryId", [ViewModelControlElementDependenceEntity(Title = "Записи", Order = 1, ParentPropertyName = "OrderSyncHistoryId",
ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlOrderSyncHistoryRecordList, DepartmentWindowsDesktop")] ControlTypeObject = "DepartmentWindowsDesktop.EntityControls.ControlOrderSyncHistoryRecordList, DepartmentWindowsDesktop")]
public class OrderSyncHistoryViewModel : ElementViewModel public class OrderSyncHistoryViewModel : ElementViewModel, IOrderSyncHistoryModel
{ {
[ViewModelControlElementProperty("Дата", ControlType.ControlDateTime, MustHaveValue = true, ReadOnly = true)] [ViewModelControlElementProperty("Дата", ControlType.ControlDateTime, MustHaveValue = true, ReadOnly = true)]
[MapConfiguration("SyncDate")]
public DateTime SyncDate { get; set; } public DateTime SyncDate { get; set; }
[ViewModelControlListProperty("Дата")] [ViewModelControlListProperty("Дата")]