From ef0cfadde92deff68004191d6c7de479195df9a5 Mon Sep 17 00:00:00 2001 From: Timourka Date: Thu, 16 May 2024 00:34:01 +0400 Subject: [PATCH] 8laba --- AutomobilePlant/AutomobilePlant.sln | 4 +- .../BusinessLogics/BackUpLogic.cs | 95 ++++ .../Attributes/ColumnAttribute.cs | 20 + .../Attributes/GridViewAutoSize.cs | 14 + .../AutomobilePlantContracts.csproj | 6 + .../BindingModels/BackUpSaveBinidngModel.cs | 7 + .../BindingModels/MessageInfoBindingModel.cs | 4 +- .../BusinessLogicsContracts/IBackUpLogic.cs | 9 + .../DI/DependencyManager.cs | 63 +++ .../DI/IDependencyContainer.cs | 38 ++ .../DI/IImplementationExtension.cs | 14 + .../DI/ServiceDependencyContainer.cs | 57 +++ .../DI/ServiceProviderLoader.cs | 53 +++ .../DI/UnityDependencyContainer.cs | 38 ++ .../StoragesContracts/IBackUpInfo.cs | 8 + .../ViewModels/CarViewModel.cs | 29 +- .../ViewModels/ClientViewModel.cs | 21 +- .../ViewModels/ComponentViewModel.cs | 22 +- .../ViewModels/ImplementerViewModel.cs | 23 +- .../ViewModels/MessageInfoViewModel .cs | 30 +- .../ViewModels/OrderViewModel.cs | 56 ++- .../Models/IMessageInfoModel.cs | 4 +- .../AutomobilePlantDatabaseImplement.csproj | 6 +- .../DatabaseImplementationExtension.cs | 22 + .../Implements/BackUpInfo.cs | 27 ++ .../Models/Car.cs | 18 +- .../Models/Client.cs | 16 +- .../Models/Component.cs | 15 +- .../Models/Implementer.cs | 27 +- .../Models/MessageInfo.cs | 26 +- .../Models/Order.cs | 33 +- .../AutomobilePlantFileImplement.csproj | 4 + .../FileImplementationExtension.cs | 22 + .../Implements/BackUpInfo.cs | 28 ++ .../Models/Car.cs | 23 +- .../Models/Client.cs | 18 +- .../Models/Component.cs | 20 +- .../Models/Implementer.cs | 21 +- .../Models/MessageInfo.cs | 28 +- .../Models/Order.cs | 38 +- .../AutomobilePlantListImplement.csproj | 6 +- .../Implements/BackUpInfo.cs | 17 + .../ListImplementationExtension.cs | 22 + .../Models/MessageInfo.cs | 4 +- .../DataGridViewExtension.cs | 45 ++ .../AutomobilePlantView/FormCar.cs | 64 ++- .../AutomobilePlantView/FormCars.cs | 44 +- .../AutomobilePlantView/FormClients.cs | 12 +- .../AutomobilePlantView/FormComponents.cs | 33 +- .../AutomobilePlantView/FormImplementers.cs | 46 +- .../AutomobilePlantView/FormMails.cs | 13 +- .../AutomobilePlantView/FormMain.Designer.cs | 357 +++++++-------- .../AutomobilePlantView/FormMain.cs | 406 +++++++++--------- .../AutomobilePlantView/Program.cs | 103 ++--- .../AutomobilePlantContracts.dll | Bin 0 -> 32256 bytes .../AutomobilePlantDataModels.dll | Bin 0 -> 7168 bytes .../AutomobilePlantFileImplement.dll | Bin 0 -> 40448 bytes .../AutomobilePlantListImplement.dll | Bin 0 -> 26624 bytes 58 files changed, 1389 insertions(+), 790 deletions(-) create mode 100644 AutomobilePlant/AutomobilePlantBusinessLogic/BusinessLogics/BackUpLogic.cs create mode 100644 AutomobilePlant/AutomobilePlantContracts/Attributes/ColumnAttribute.cs create mode 100644 AutomobilePlant/AutomobilePlantContracts/Attributes/GridViewAutoSize.cs create mode 100644 AutomobilePlant/AutomobilePlantContracts/BindingModels/BackUpSaveBinidngModel.cs create mode 100644 AutomobilePlant/AutomobilePlantContracts/BusinessLogicsContracts/IBackUpLogic.cs create mode 100644 AutomobilePlant/AutomobilePlantContracts/DI/DependencyManager.cs create mode 100644 AutomobilePlant/AutomobilePlantContracts/DI/IDependencyContainer.cs create mode 100644 AutomobilePlant/AutomobilePlantContracts/DI/IImplementationExtension.cs create mode 100644 AutomobilePlant/AutomobilePlantContracts/DI/ServiceDependencyContainer.cs create mode 100644 AutomobilePlant/AutomobilePlantContracts/DI/ServiceProviderLoader.cs create mode 100644 AutomobilePlant/AutomobilePlantContracts/DI/UnityDependencyContainer.cs create mode 100644 AutomobilePlant/AutomobilePlantContracts/StoragesContracts/IBackUpInfo.cs create mode 100644 AutomobilePlant/AutomobilePlantDatabaseImplement/DatabaseImplementationExtension.cs create mode 100644 AutomobilePlant/AutomobilePlantDatabaseImplement/Implements/BackUpInfo.cs create mode 100644 AutomobilePlant/AutomobilePlantFileImplement/FileImplementationExtension.cs create mode 100644 AutomobilePlant/AutomobilePlantFileImplement/Implements/BackUpInfo.cs create mode 100644 AutomobilePlant/AutomobilePlantListImplement/Implements/BackUpInfo.cs create mode 100644 AutomobilePlant/AutomobilePlantListImplement/ListImplementationExtension.cs create mode 100644 AutomobilePlant/AutomobilePlantView/DataGridViewExtension.cs create mode 100644 AutomobilePlant/ImplementationExtensions/AutomobilePlantContracts.dll create mode 100644 AutomobilePlant/ImplementationExtensions/AutomobilePlantDataModels.dll create mode 100644 AutomobilePlant/ImplementationExtensions/AutomobilePlantFileImplement.dll create mode 100644 AutomobilePlant/ImplementationExtensions/AutomobilePlantListImplement.dll diff --git a/AutomobilePlant/AutomobilePlant.sln b/AutomobilePlant/AutomobilePlant.sln index 271ef21..bfeea10 100644 --- a/AutomobilePlant/AutomobilePlant.sln +++ b/AutomobilePlant/AutomobilePlant.sln @@ -17,9 +17,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutomobilePlantFileImplemen EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutomobilePlantDatabaseImplement", "AutomobilePlantDatabaseImplement\AutomobilePlantDatabaseImplement.csproj", "{D727258B-7717-45AF-B438-B3BE3105E207}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutomobilePlantRestApi", "AutomobilePlantRestApi\AutomobilePlantRestApi.csproj", "{C4C82240-E531-4C99-B519-74DDDBD79326}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutomobilePlantRestApi", "AutomobilePlantRestApi\AutomobilePlantRestApi.csproj", "{C4C82240-E531-4C99-B519-74DDDBD79326}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutomobilePlantClientApp", "AutomobilePlantClientApp\AutomobilePlantClientApp.csproj", "{E72BF12B-595D-42B8-B994-B9740A392B02}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutomobilePlantClientApp", "AutomobilePlantClientApp\AutomobilePlantClientApp.csproj", "{E72BF12B-595D-42B8-B994-B9740A392B02}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/AutomobilePlant/AutomobilePlantBusinessLogic/BusinessLogics/BackUpLogic.cs b/AutomobilePlant/AutomobilePlantBusinessLogic/BusinessLogics/BackUpLogic.cs new file mode 100644 index 0000000..2ffea61 --- /dev/null +++ b/AutomobilePlant/AutomobilePlantBusinessLogic/BusinessLogics/BackUpLogic.cs @@ -0,0 +1,95 @@ +using AutomobilePlantContracts.BindingModels; +using AutomobilePlantContracts.BusinessLogicsContracts; +using AutomobilePlantContracts.StoragesContracts; +using AutomobilePlantDataModels; +using Microsoft.Extensions.Logging; +using System.IO.Compression; +using System.Reflection; +using System.Runtime.Serialization.Json; + +namespace AutomobilePlantBusinessLogic.BusinessLogics +{ + public class BackUpLogic : IBackUpLogic + { + private readonly ILogger _logger; + private readonly IBackUpInfo _backUpInfo; + public BackUpLogic(ILogger logger, IBackUpInfo backUpInfo) + { + _logger = logger; + _backUpInfo = backUpInfo; + } + public void CreateBackUp(BackUpSaveBinidngModel model) + { + if (_backUpInfo == null) + { + return; + } + try + { + _logger.LogDebug("Clear folder"); + // зачистка папки и удаление старого архива + var dirInfo = new DirectoryInfo(model.FolderName); + if (dirInfo.Exists) + { + foreach (var file in dirInfo.GetFiles()) + { + file.Delete(); + } + } + _logger.LogDebug("Delete archive"); + string fileName = $"{model.FolderName}.zip"; + if (File.Exists(fileName)) + { + File.Delete(fileName); + } + // берем метод для сохранения + _logger.LogDebug("Get assembly"); + var typeIId = typeof(IId); + var assembly = typeIId.Assembly; + if (assembly == null) + { + throw new ArgumentNullException("Сборка не найдена", nameof(assembly)); + } + var types = assembly.GetTypes(); + var method = GetType().GetMethod("SaveToFile", BindingFlags.NonPublic | BindingFlags.Instance); + _logger.LogDebug("Find {count} types", types.Length); + foreach (var type in types) + { + if (type.IsInterface && type.GetInterface(typeIId.Name) != null) + { + var modelType = _backUpInfo.GetTypeByModelInterface(type.Name); + if (modelType == null) + { + throw new InvalidOperationException($"Не найденкласс - модель для {type.Name}"); + } + _logger.LogDebug("Call SaveToFile method for {name} type", type.Name); + // вызываем метод на выполнение + method?.MakeGenericMethod(modelType).Invoke(this, new + object[] { model.FolderName }); + } + } + _logger.LogDebug("Create zip and remove folder"); + // архивируем + ZipFile.CreateFromDirectory(model.FolderName, fileName); + // удаляем папку + dirInfo.Delete(true); + } + catch (Exception) + { + throw; + } + } + private void SaveToFile(string folderName) where T : class, new() + { + var records = _backUpInfo.GetList(); + if (records == null) + { + _logger.LogWarning("{type} type get null list", typeof(T).Name); + return; + } + var jsonFormatter = new DataContractJsonSerializer(typeof(List)); + using var fs = new FileStream(string.Format("{0}/{1}.json", folderName, typeof(T).Name), FileMode.OpenOrCreate); + jsonFormatter.WriteObject(fs, records); + } + } +} diff --git a/AutomobilePlant/AutomobilePlantContracts/Attributes/ColumnAttribute.cs b/AutomobilePlant/AutomobilePlantContracts/Attributes/ColumnAttribute.cs new file mode 100644 index 0000000..35a910c --- /dev/null +++ b/AutomobilePlant/AutomobilePlantContracts/Attributes/ColumnAttribute.cs @@ -0,0 +1,20 @@ +namespace AutomobilePlantContracts.Attributes +{ + [AttributeUsage(AttributeTargets.Property)] + public class ColumnAttribute : Attribute + { + public ColumnAttribute(string title = "", bool visible = true, int width = 0, GridViewAutoSize gridViewAutoSize = GridViewAutoSize.None, bool isUseAutoSize = false) + { + Title = title; + Visible = visible; + Width = width; + GridViewAutoSize = gridViewAutoSize; + IsUseAutoSize = isUseAutoSize; + } + public string Title { get; private set; } + public bool Visible { get; private set; } + public int Width { get; private set; } + public GridViewAutoSize GridViewAutoSize { get; private set; } + public bool IsUseAutoSize { get; private set; } + } +} diff --git a/AutomobilePlant/AutomobilePlantContracts/Attributes/GridViewAutoSize.cs b/AutomobilePlant/AutomobilePlantContracts/Attributes/GridViewAutoSize.cs new file mode 100644 index 0000000..7ee81db --- /dev/null +++ b/AutomobilePlant/AutomobilePlantContracts/Attributes/GridViewAutoSize.cs @@ -0,0 +1,14 @@ +namespace AutomobilePlantContracts.Attributes +{ + public enum GridViewAutoSize + { + NotSet = 0, + None = 1, + ColumnHeader = 2, + AllCellsExceptHeader = 4, + AllCells = 6, + DisplayedCellsExceptHeader = 8, + DisplayedCells = 10, + Fill = 16 + } +} diff --git a/AutomobilePlant/AutomobilePlantContracts/AutomobilePlantContracts.csproj b/AutomobilePlant/AutomobilePlantContracts/AutomobilePlantContracts.csproj index 743e9bf..1d6431f 100644 --- a/AutomobilePlant/AutomobilePlantContracts/AutomobilePlantContracts.csproj +++ b/AutomobilePlant/AutomobilePlantContracts/AutomobilePlantContracts.csproj @@ -6,6 +6,12 @@ enable + + + + + + diff --git a/AutomobilePlant/AutomobilePlantContracts/BindingModels/BackUpSaveBinidngModel.cs b/AutomobilePlant/AutomobilePlantContracts/BindingModels/BackUpSaveBinidngModel.cs new file mode 100644 index 0000000..3c9314e --- /dev/null +++ b/AutomobilePlant/AutomobilePlantContracts/BindingModels/BackUpSaveBinidngModel.cs @@ -0,0 +1,7 @@ +namespace AutomobilePlantContracts.BindingModels +{ + public class BackUpSaveBinidngModel + { + public string FolderName { get; set; } = string.Empty; + } +} diff --git a/AutomobilePlant/AutomobilePlantContracts/BindingModels/MessageInfoBindingModel.cs b/AutomobilePlant/AutomobilePlantContracts/BindingModels/MessageInfoBindingModel.cs index 7ded981..04265cc 100644 --- a/AutomobilePlant/AutomobilePlantContracts/BindingModels/MessageInfoBindingModel.cs +++ b/AutomobilePlant/AutomobilePlantContracts/BindingModels/MessageInfoBindingModel.cs @@ -15,5 +15,7 @@ namespace AutomobilePlantContracts.BindingModels public string Subject { get; set; } = string.Empty; public string Body { get; set; } = string.Empty; - } + + public int Id => throw new NotImplementedException(); + } } diff --git a/AutomobilePlant/AutomobilePlantContracts/BusinessLogicsContracts/IBackUpLogic.cs b/AutomobilePlant/AutomobilePlantContracts/BusinessLogicsContracts/IBackUpLogic.cs new file mode 100644 index 0000000..339c283 --- /dev/null +++ b/AutomobilePlant/AutomobilePlantContracts/BusinessLogicsContracts/IBackUpLogic.cs @@ -0,0 +1,9 @@ +using AutomobilePlantContracts.BindingModels; + +namespace AutomobilePlantContracts.BusinessLogicsContracts +{ + public interface IBackUpLogic + { + void CreateBackUp(BackUpSaveBinidngModel model); + } +} diff --git a/AutomobilePlant/AutomobilePlantContracts/DI/DependencyManager.cs b/AutomobilePlant/AutomobilePlantContracts/DI/DependencyManager.cs new file mode 100644 index 0000000..71eb0f3 --- /dev/null +++ b/AutomobilePlant/AutomobilePlantContracts/DI/DependencyManager.cs @@ -0,0 +1,63 @@ +using Microsoft.Extensions.Logging; + +namespace AutomobilePlantContracts.DI +{ + /// + /// Менеджер для работы с зависимостями + /// + public class DependencyManager + { + private readonly IDependencyContainer _dependencyManager; + + private static DependencyManager? _manager; + + private static readonly object _locjObject = new(); + + private DependencyManager() + { + _dependencyManager = new UnityDependencyContainer(); + } + + public static DependencyManager Instance { get { if (_manager == null) { lock (_locjObject) { _manager = new DependencyManager(); } } return _manager; } } + + /// + /// Иницализация библиотек, в которых идут установки зависомстей + /// + public static void InitDependency() + { + var ext = ServiceProviderLoader.GetImplementationExtensions(); + if (ext == null) + { + throw new ArgumentNullException("Отсутствуют компоненты для загрузки зависимостей по модулям"); + } + // регистрируем зависимости + ext.RegisterServices(); + } + + /// + /// Регистрация логгера + /// + /// + public void AddLogging(Action configure) => _dependencyManager.AddLogging(configure); + + /// + /// Добавление зависимости + /// + /// + /// + public void RegisterType(bool isSingle = false) where U : class, T where T : class => _dependencyManager.RegisterType(isSingle); + + /// + /// Добавление зависимости + /// + /// + public void RegisterType(bool isSingle = false) where T : class => _dependencyManager.RegisterType(isSingle); + + /// + /// Получение класса со всеми зависмостями + /// + /// + /// + public T Resolve() => _dependencyManager.Resolve(); + } +} diff --git a/AutomobilePlant/AutomobilePlantContracts/DI/IDependencyContainer.cs b/AutomobilePlant/AutomobilePlantContracts/DI/IDependencyContainer.cs new file mode 100644 index 0000000..c091adf --- /dev/null +++ b/AutomobilePlant/AutomobilePlantContracts/DI/IDependencyContainer.cs @@ -0,0 +1,38 @@ +using Microsoft.Extensions.Logging; + +namespace AutomobilePlantContracts.DI +{ + /// + /// Интерфейс установки зависмости между элементами + /// + public interface IDependencyContainer + { + /// + /// Регистрация логгера + /// + /// + void AddLogging(Action configure); + + /// + /// Добавление зависимости + /// + /// + /// + /// + void RegisterType(bool isSingle) where U : class, T where T : class; + + /// + /// Добавление зависимости + /// + /// + /// + void RegisterType(bool isSingle) where T : class; + + /// + /// Получение класса со всеми зависмостями + /// + /// + /// + T Resolve(); + } +} diff --git a/AutomobilePlant/AutomobilePlantContracts/DI/IImplementationExtension.cs b/AutomobilePlant/AutomobilePlantContracts/DI/IImplementationExtension.cs new file mode 100644 index 0000000..8fd7841 --- /dev/null +++ b/AutomobilePlant/AutomobilePlantContracts/DI/IImplementationExtension.cs @@ -0,0 +1,14 @@ +namespace AutomobilePlantContracts.DI +{ + /// + /// Интерфейс для регистрации зависимостей в модулях + /// + public interface IImplementationExtension + { + public int Priority { get; } + /// + /// Регистрация сервисов + /// + public void RegisterServices(); + } +} diff --git a/AutomobilePlant/AutomobilePlantContracts/DI/ServiceDependencyContainer.cs b/AutomobilePlant/AutomobilePlantContracts/DI/ServiceDependencyContainer.cs new file mode 100644 index 0000000..511bcc9 --- /dev/null +++ b/AutomobilePlant/AutomobilePlantContracts/DI/ServiceDependencyContainer.cs @@ -0,0 +1,57 @@ +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; + +namespace AutomobilePlantContracts.DI +{ + public class ServiceDependencyContainer : IDependencyContainer + { + private ServiceProvider? _serviceProvider; + + private readonly ServiceCollection _serviceCollection; + + public ServiceDependencyContainer() + { + _serviceCollection = new ServiceCollection(); + } + + public void AddLogging(Action configure) + { + _serviceCollection.AddLogging(configure); + } + + public void RegisterType(bool isSingle) where U : class, T where T : class + { + if (isSingle) + { + _serviceCollection.AddSingleton(); + } + else + { + _serviceCollection.AddTransient(); + } + _serviceProvider = null; + } + + public void RegisterType(bool isSingle) where T : class + { + if (isSingle) + { + _serviceCollection.AddSingleton(); + } + else + { + _serviceCollection.AddTransient(); + } + _serviceProvider = null; + } + + public T Resolve() + { + if (_serviceProvider == null) + { + _serviceProvider = _serviceCollection.BuildServiceProvider(); + } + return _serviceProvider.GetService()!; + } + } +} diff --git a/AutomobilePlant/AutomobilePlantContracts/DI/ServiceProviderLoader.cs b/AutomobilePlant/AutomobilePlantContracts/DI/ServiceProviderLoader.cs new file mode 100644 index 0000000..b586666 --- /dev/null +++ b/AutomobilePlant/AutomobilePlantContracts/DI/ServiceProviderLoader.cs @@ -0,0 +1,53 @@ +using System.Reflection; + +namespace AutomobilePlantContracts.DI +{ + /// + /// Загрузчик данных + /// + public class ServiceProviderLoader + { + /// + /// Загрузка всех классов-реализаций IImplementationExtension + /// + /// + public static IImplementationExtension? GetImplementationExtensions() + { + IImplementationExtension? source = null; + var files = Directory.GetFiles(TryGetImplementationExtensionsFolder(), "*.dll", SearchOption.AllDirectories); + foreach (var file in files.Distinct()) + { + Assembly asm = Assembly.LoadFrom(file); + foreach (var t in asm.GetExportedTypes()) + { + if (t.IsClass && typeof(IImplementationExtension).IsAssignableFrom(t)) + { + if (source == null) + { + source = (IImplementationExtension)Activator.CreateInstance(t)!; + } + else + { + var newSource = (IImplementationExtension)Activator.CreateInstance(t)!; + if (newSource.Priority > source.Priority) + { + source = newSource; + } + } + } + } + } + return source; + } + + private static string TryGetImplementationExtensionsFolder() + { + var directory = new DirectoryInfo(Directory.GetCurrentDirectory()); + while (directory != null && !directory.GetDirectories("ImplementationExtensions", SearchOption.AllDirectories).Any(x => x.Name == "ImplementationExtensions")) + { + directory = directory.Parent; + } + return $"{directory?.FullName}\\ImplementationExtensions"; + } + } +} diff --git a/AutomobilePlant/AutomobilePlantContracts/DI/UnityDependencyContainer.cs b/AutomobilePlant/AutomobilePlantContracts/DI/UnityDependencyContainer.cs new file mode 100644 index 0000000..8b962a0 --- /dev/null +++ b/AutomobilePlant/AutomobilePlantContracts/DI/UnityDependencyContainer.cs @@ -0,0 +1,38 @@ +using Microsoft.Extensions.Logging; +using Unity; +using Unity.Microsoft.Logging; + +namespace AutomobilePlantContracts.DI +{ + public class UnityDependencyContainer : IDependencyContainer + { + private readonly IUnityContainer _container; + + public UnityDependencyContainer() + { + _container = new UnityContainer(); + } + + public void AddLogging(Action configure) + { + var factory = LoggerFactory.Create(configure); + _container.AddExtension(new LoggingExtension(factory)); + } + + public void RegisterType(bool isSingle) where T : class + { + _container.RegisterType(isSingle ? TypeLifetime.Singleton : TypeLifetime.Transient); + + } + + public T Resolve() + { + return _container.Resolve(); + } + + void IDependencyContainer.RegisterType(bool isSingle) + { + _container.RegisterType(isSingle ? TypeLifetime.Singleton : TypeLifetime.Transient); + } + } +} diff --git a/AutomobilePlant/AutomobilePlantContracts/StoragesContracts/IBackUpInfo.cs b/AutomobilePlant/AutomobilePlantContracts/StoragesContracts/IBackUpInfo.cs new file mode 100644 index 0000000..9b20de6 --- /dev/null +++ b/AutomobilePlant/AutomobilePlantContracts/StoragesContracts/IBackUpInfo.cs @@ -0,0 +1,8 @@ +namespace AutomobilePlantContracts.StoragesContracts +{ + public interface IBackUpInfo + { + List? GetList() where T : class, new(); + Type? GetTypeByModelInterface(string modelInterfaceName); + } +} diff --git a/AutomobilePlant/AutomobilePlantContracts/ViewModels/CarViewModel.cs b/AutomobilePlant/AutomobilePlantContracts/ViewModels/CarViewModel.cs index 0629033..d1a98f0 100644 --- a/AutomobilePlant/AutomobilePlantContracts/ViewModels/CarViewModel.cs +++ b/AutomobilePlant/AutomobilePlantContracts/ViewModels/CarViewModel.cs @@ -1,25 +1,18 @@ -using AutomobilePlantDataModels.Models; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using AutomobilePlantContracts.Attributes; +using AutomobilePlantDataModels.Models; namespace AutomobilePlantContracts.ViewModels { public class CarViewModel : ICarModel { - public int Id { get; set; } - [DisplayName("Car's name")] - public string CarName { get; set; } = string.Empty; - [DisplayName("Price")] - public double Price { get; set; } - public Dictionary CarComponents - { - get; - set; - } = new(); - } + [Column(visible: false)] + public int Id { get; set; } + [Column("Car's name", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)] + public string CarName { get; set; } = string.Empty; + [Column("Price", width: 100)] + public double Price { get; set; } + [Column(visible: false)] + public Dictionary CarComponents { get; set; } = new(); + } } diff --git a/AutomobilePlant/AutomobilePlantContracts/ViewModels/ClientViewModel.cs b/AutomobilePlant/AutomobilePlantContracts/ViewModels/ClientViewModel.cs index 827e394..a4244ea 100644 --- a/AutomobilePlant/AutomobilePlantContracts/ViewModels/ClientViewModel.cs +++ b/AutomobilePlant/AutomobilePlantContracts/ViewModels/ClientViewModel.cs @@ -1,16 +1,17 @@ -using AutomobilePlantDataModels.Models; -using System.ComponentModel; +using AutomobilePlantContracts.Attributes; +using AutomobilePlantDataModels.Models; namespace AutomobilePlantContracts.ViewModels { public class ClientViewModel : IClientModel { - public int Id { get; set; } - [DisplayName("Client's FIO")] - public string ClientFIO { get; set; } = string.Empty; - [DisplayName("Login (Email)")] - public string Email { get; set; } = string.Empty; - [DisplayName("Password")] - public string Password { get; set; } = string.Empty; - } + [Column(visible: false)] + public int Id { get; set; } + [Column(title: "Client's FIO", width: 150)] + public string ClientFIO { get; set; } = string.Empty; + [Column(title: "Login (Email)", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)] + public string Email { get; set; } = string.Empty; + [Column(title: "Password", width: 150)] + public string Password { get; set; } = string.Empty; + } } diff --git a/AutomobilePlant/AutomobilePlantContracts/ViewModels/ComponentViewModel.cs b/AutomobilePlant/AutomobilePlantContracts/ViewModels/ComponentViewModel.cs index f5bf1a9..3216116 100644 --- a/AutomobilePlant/AutomobilePlantContracts/ViewModels/ComponentViewModel.cs +++ b/AutomobilePlant/AutomobilePlantContracts/ViewModels/ComponentViewModel.cs @@ -1,19 +1,15 @@ -using AutomobilePlantDataModels.Models; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using AutomobilePlantContracts.Attributes; +using AutomobilePlantDataModels.Models; namespace AutomobilePlantContracts.ViewModels { public class ComponentViewModel : IComponentModel { - public int Id { get; set; } - [DisplayName("Component's name")] - public string ComponentName { get; set; } = string.Empty; - [DisplayName("Cost")] - public double Cost { get; set; } - } + [Column(visible: false)] + public int Id { get; set; } + [Column("Component's name", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)] + public string ComponentName { get; set; } = string.Empty; + [Column("Cost", width: 100)] + public double Cost { get; set; } + } } diff --git a/AutomobilePlant/AutomobilePlantContracts/ViewModels/ImplementerViewModel.cs b/AutomobilePlant/AutomobilePlantContracts/ViewModels/ImplementerViewModel.cs index 238ea6b..0a27451 100644 --- a/AutomobilePlant/AutomobilePlantContracts/ViewModels/ImplementerViewModel.cs +++ b/AutomobilePlant/AutomobilePlantContracts/ViewModels/ImplementerViewModel.cs @@ -1,22 +1,23 @@ -using AutomobilePlantDataModels.Models; -using System.ComponentModel; +using AutomobilePlantContracts.Attributes; +using AutomobilePlantDataModels.Models; namespace AutomobilePlantContracts.ViewModels { public class ImplementerViewModel : IImplementerModel { - public int Id { get; set; } + [Column(visible: false)] + public int Id { get; set; } - [DisplayName("FIO")] - public string ImplementerFIO { get; set; } = string.Empty; + [Column("FIO", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)] + public string ImplementerFIO { get; set; } = string.Empty; - [DisplayName("Password")] - public string Password { get; set; } = string.Empty; + [Column("Password", width: 150)] + public string Password { get; set; } = string.Empty; - [DisplayName("Work expirience")] - public int WorkExperience { get; set; } + [Column("Work expirience", width: 150)] + public int WorkExperience { get; set; } - [DisplayName("Qualification")] - public int Qualification { get; set; } + [Column("Qualification", width: 150)] + public int Qualification { get; set; } } } diff --git a/AutomobilePlant/AutomobilePlantContracts/ViewModels/MessageInfoViewModel .cs b/AutomobilePlant/AutomobilePlantContracts/ViewModels/MessageInfoViewModel .cs index 93c9422..1799bbd 100644 --- a/AutomobilePlant/AutomobilePlantContracts/ViewModels/MessageInfoViewModel .cs +++ b/AutomobilePlant/AutomobilePlantContracts/ViewModels/MessageInfoViewModel .cs @@ -1,20 +1,24 @@ -using AutomobilePlantDataModels.Models; -using System.ComponentModel; +using AutomobilePlantContracts.Attributes; +using AutomobilePlantDataModels.Models; namespace AutomobilePlantContracts.ViewModels { public class MessageInfoViewModel : IMessageInfoModel { - public string MessageId { get; set; } = string.Empty; + [Column(visible: false)] + public string MessageId { get; set; } = string.Empty; + [Column(visible: false)] + public int? ClientId { get; set; } + [Column("Sender", gridViewAutoSize: GridViewAutoSize.DisplayedCells, isUseAutoSize: true)] + public string SenderName { get; set; } = string.Empty; + [Column("Delivery Date", width: 100)] + public DateTime DateDelivery { get; set; } + [Column("Subject", width: 150)] + public string Subject { get; set; } = string.Empty; + [Column("Body", gridViewAutoSize: GridViewAutoSize.Fill, isUseAutoSize: true)] + public string Body { get; set; } = string.Empty; - public int? ClientId { get; set; } - [DisplayName("Sender")] - public string SenderName { get; set; } = string.Empty; - [DisplayName("Delivery Date")] - public DateTime DateDelivery { get; set; } - [DisplayName("Subject")] - public string Subject { get; set; } = string.Empty; - [DisplayName("Body")] - public string Body { get; set; } = string.Empty; - } + [Column(visible: false)] + public int Id => throw new NotImplementedException(); + } } diff --git a/AutomobilePlant/AutomobilePlantContracts/ViewModels/OrderViewModel.cs b/AutomobilePlant/AutomobilePlantContracts/ViewModels/OrderViewModel.cs index 9f86e8c..2bfe54a 100644 --- a/AutomobilePlant/AutomobilePlantContracts/ViewModels/OrderViewModel.cs +++ b/AutomobilePlant/AutomobilePlantContracts/ViewModels/OrderViewModel.cs @@ -1,36 +1,34 @@ -using AutomobilePlantDataModels.Enums; +using AutomobilePlantContracts.Attributes; +using AutomobilePlantDataModels.Enums; using AutomobilePlantDataModels.Models; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace AutomobilePlantContracts.ViewModels { public class OrderViewModel : IOrderModel { - [DisplayName("Number")] - public int Id { get; set; } - public int CarId { get; set; } - [DisplayName("Car's name")] - public string CarName { get; set; } = string.Empty; - public int ClientId { get; set; } - [DisplayName("Client's FIO")] - public string ClientFIO { get; set; } = string.Empty; - public int? ImplementerId { get; set; } - [DisplayName("Implementer's FIO")] - public string ImplementerFIO { get; set; } = string.Empty; - [DisplayName("Count")] - public int Count { get; set; } - [DisplayName("Sum")] - public double Sum { get; set; } - [DisplayName("Status")] - public OrderStatus Status { get; set; } = OrderStatus.Неизвестен; - [DisplayName("Date of creation")] - public DateTime DateCreate { get; set; } = DateTime.Now; - [DisplayName("Date of completion")] - public DateTime? DateImplement { get; set; } - } + [Column("Number", gridViewAutoSize: GridViewAutoSize.AllCells, isUseAutoSize: true)] + public int Id { get; set; } + [Column(visible: false)] + public int CarId { get; set; } + [Column("Car's name", gridViewAutoSize: GridViewAutoSize.AllCells, isUseAutoSize: true)] + public string CarName { get; set; } = string.Empty; + [Column(visible: false)] + public int ClientId { get; set; } + [Column("Client's FIO", gridViewAutoSize: GridViewAutoSize.AllCells, isUseAutoSize: true)] + public string ClientFIO { get; set; } = string.Empty; + [Column(visible: false)] + public int? ImplementerId { get; set; } + [Column("Implementer's FIO", gridViewAutoSize: GridViewAutoSize.AllCells, isUseAutoSize: true)] + public string ImplementerFIO { get; set; } = string.Empty; + [Column("Count", gridViewAutoSize: GridViewAutoSize.AllCells, isUseAutoSize: true)] + public int Count { get; set; } + [Column("Sum", gridViewAutoSize: GridViewAutoSize.AllCells, isUseAutoSize: true)] + public double Sum { get; set; } + [Column("Status", gridViewAutoSize: GridViewAutoSize.AllCells, isUseAutoSize: true)] + public OrderStatus Status { get; set; } = OrderStatus.Неизвестен; + [Column("Date of creation", width: 100)] + public DateTime DateCreate { get; set; } = DateTime.Now; + [Column("Date of completion", width: 100)] + public DateTime? DateImplement { get; set; } + } } diff --git a/AutomobilePlant/AutomobilePlantDataModels/Models/IMessageInfoModel.cs b/AutomobilePlant/AutomobilePlantDataModels/Models/IMessageInfoModel.cs index ca34e78..5f4f91a 100644 --- a/AutomobilePlant/AutomobilePlantDataModels/Models/IMessageInfoModel.cs +++ b/AutomobilePlant/AutomobilePlantDataModels/Models/IMessageInfoModel.cs @@ -1,7 +1,7 @@ namespace AutomobilePlantDataModels.Models { - public interface IMessageInfoModel - { + public interface IMessageInfoModel : IId + { string MessageId { get; } int? ClientId { get; } string SenderName { get; } diff --git a/AutomobilePlant/AutomobilePlantDatabaseImplement/AutomobilePlantDatabaseImplement.csproj b/AutomobilePlant/AutomobilePlantDatabaseImplement/AutomobilePlantDatabaseImplement.csproj index 8837474..4f6d377 100644 --- a/AutomobilePlant/AutomobilePlantDatabaseImplement/AutomobilePlantDatabaseImplement.csproj +++ b/AutomobilePlant/AutomobilePlantDatabaseImplement/AutomobilePlantDatabaseImplement.csproj @@ -1,4 +1,4 @@ - + net6.0 @@ -20,4 +20,8 @@ + + + + diff --git a/AutomobilePlant/AutomobilePlantDatabaseImplement/DatabaseImplementationExtension.cs b/AutomobilePlant/AutomobilePlantDatabaseImplement/DatabaseImplementationExtension.cs new file mode 100644 index 0000000..edad610 --- /dev/null +++ b/AutomobilePlant/AutomobilePlantDatabaseImplement/DatabaseImplementationExtension.cs @@ -0,0 +1,22 @@ +using AutomobilePlantContracts.DI; +using AutomobilePlantContracts.StoragesContracts; +using AutomobilePlantDatabaseImplement.Implements; + +namespace AutomobilePlantDatabaseImplement +{ + public class DatabaseImplementationExtension : IImplementationExtension + { + public int Priority => 2; + + public void RegisterServices() + { + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + } + } +} diff --git a/AutomobilePlant/AutomobilePlantDatabaseImplement/Implements/BackUpInfo.cs b/AutomobilePlant/AutomobilePlantDatabaseImplement/Implements/BackUpInfo.cs new file mode 100644 index 0000000..7909404 --- /dev/null +++ b/AutomobilePlant/AutomobilePlantDatabaseImplement/Implements/BackUpInfo.cs @@ -0,0 +1,27 @@ +using AutomobilePlantContracts.StoragesContracts; + +namespace AutomobilePlantDatabaseImplement.Implements +{ + public class BackUpInfo : IBackUpInfo + { + public List? GetList() where T : class, new() + { + using var context = new AutomobilePlantDatabase(); + return context.Set().ToList(); + } + public Type? GetTypeByModelInterface(string modelInterfaceName) + { + var assembly = typeof(BackUpInfo).Assembly; + var types = assembly.GetTypes(); + foreach (var type in types) + { + if (type.IsClass && + type.GetInterface(modelInterfaceName) != null) + { + return type; + } + } + return null; + } + } +} diff --git a/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Car.cs b/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Car.cs index 6129ac1..f646942 100644 --- a/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Car.cs +++ b/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Car.cs @@ -3,20 +3,26 @@ using AutomobilePlantContracts.ViewModels; using AutomobilePlantDataModels.Models; using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; namespace AutomobilePlantDatabaseImplement.Models { - public class Car : ICarModel - { - public int Id { get; private set; } + [DataContract] + public class Car : ICarModel + { + [DataMember] + public int Id { get; private set; } [Required] - public string CarName { get; private set; } = string.Empty; + [DataMember] + public string CarName { get; private set; } = string.Empty; [Required] - public double Price { get; private set; } + [DataMember] + public double Price { get; private set; } private Dictionary? _carComponents = null; [NotMapped] - public Dictionary CarComponents + [DataMember] + public Dictionary CarComponents { get { diff --git a/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Client.cs b/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Client.cs index fb52417..67e9d14 100644 --- a/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Client.cs +++ b/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Client.cs @@ -3,21 +3,27 @@ using AutomobilePlantContracts.ViewModels; using AutomobilePlantDataModels.Models; using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; namespace AutomobilePlantDatabaseImplement.Models { - public class Client : IClientModel - { - public int Id { get; private set; } + [DataContract] + public class Client : IClientModel + { + [DataMember] + public int Id { get; private set; } [Required] + [DataMember] public string ClientFIO { get; private set; } = string.Empty; [Required] - public string Email { get; private set; } = string.Empty; + [DataMember] + public string Email { get; private set; } = string.Empty; [Required] - public string Password { get; private set; } = string.Empty; + [DataMember] + public string Password { get; private set; } = string.Empty; [ForeignKey("ClientId")] public virtual List Orders { get; set; } = new(); diff --git a/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Component.cs b/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Component.cs index 4793485..0dbefbc 100644 --- a/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Component.cs +++ b/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Component.cs @@ -3,17 +3,22 @@ using AutomobilePlantContracts.ViewModels; using AutomobilePlantDataModels.Models; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; +using System.Runtime.Serialization; namespace AutomobilePlantDatabaseImplement.Models { - public class Component : IComponentModel - { - public int Id { get; private set; } + [DataContract] + public class Component : IComponentModel + { + [DataMember] + public int Id { get; private set; } [Required] - public string ComponentName { get; private set; } = string.Empty; + [DataMember] + public string ComponentName { get; private set; } = string.Empty; [Required] - public double Cost { get; set; } + [DataMember] + public double Cost { get; set; } [ForeignKey("ComponentId")] public virtual List CarComponents { get; set; } = new(); diff --git a/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Implementer.cs b/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Implementer.cs index 4094b75..bb89136 100644 --- a/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Implementer.cs +++ b/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Implementer.cs @@ -2,22 +2,25 @@ using AutomobilePlantContracts.ViewModels; using AutomobilePlantDataModels.Models; using System.ComponentModel.DataAnnotations.Schema; +using System.Runtime.Serialization; namespace AutomobilePlantDatabaseImplement.Models { - public class Implementer : IImplementerModel - { - public int Id { get; private set; } + [DataContract] + public class Implementer : IImplementerModel + { + [DataMember] + public int Id { get; private set; } + [DataMember] + public string ImplementerFIO { get; private set; } = string.Empty; + [DataMember] + public string Password { get; private set; } = string.Empty; + [DataMember] + public int WorkExperience { get; private set; } + [DataMember] + public int Qualification { get; private set; } - public string ImplementerFIO { get; private set; } = string.Empty; - - public string Password { get; private set; } = string.Empty; - - public int WorkExperience { get; private set; } - - public int Qualification { get; private set; } - - [ForeignKey("ImplementerId")] + [ForeignKey("ImplementerId")] public virtual List Orders { get; private set; } = new(); public static Implementer? Create(ImplementerBindingModel model) diff --git a/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/MessageInfo.cs b/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/MessageInfo.cs index 804ddec..b26f7fa 100644 --- a/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/MessageInfo.cs +++ b/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/MessageInfo.cs @@ -2,23 +2,31 @@ using AutomobilePlantContracts.ViewModels; using AutomobilePlantDataModels.Models; using System.ComponentModel.DataAnnotations; +using System.Runtime.Serialization; namespace AutomobilePlantDatabaseImplement.Models { - public class MessageInfo : IMessageInfoModel + [DataContract] + public class MessageInfo : IMessageInfoModel { [Key] - public string MessageId { get; private set; } = string.Empty; + [DataMember] + public string MessageId { get; private set; } = string.Empty; - public int? ClientId { get; private set; } + [DataMember] + public int? ClientId { get; private set; } - public string SenderName { get; private set; } = string.Empty; + [DataMember] + public string SenderName { get; private set; } = string.Empty; - public DateTime DateDelivery { get; private set; } = DateTime.Now; + [DataMember] + public DateTime DateDelivery { get; private set; } = DateTime.Now; - public string Subject { get; private set; } = string.Empty; + [DataMember] + public string Subject { get; private set; } = string.Empty; - public string Body { get; private set; } = string.Empty; + [DataMember] + public string Body { get; private set; } = string.Empty; public virtual Client? Client { get; private set; } @@ -48,5 +56,7 @@ namespace AutomobilePlantDatabaseImplement.Models SenderName = SenderName, DateDelivery = DateDelivery, }; - } + + public int Id => throw new NotImplementedException(); + } } diff --git a/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Order.cs b/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Order.cs index 4ce3118..30eda21 100644 --- a/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Order.cs +++ b/AutomobilePlant/AutomobilePlantDatabaseImplement/Models/Order.cs @@ -7,29 +7,40 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Runtime.ConstrainedExecution; +using System.Runtime.Serialization; using System.Text; using System.Threading.Tasks; namespace AutomobilePlantDatabaseImplement.Models { - public class Order : IOrderModel - { - public int Id { get; private set; } + [DataContract] + public class Order : IOrderModel + { + [DataMember] + public int Id { get; private set; } [Required] - public int CarId { get; private set; } + [DataMember] + public int CarId { get; private set; } [Required] - public int ClientId { get; private set; } - public int? ImplementerId { get; private set; } + [DataMember] + public int ClientId { get; private set; } + [DataMember] + public int? ImplementerId { get; private set; } [Required] - public int Count { get; private set; } + [DataMember] + public int Count { get; private set; } [Required] - public double Sum { get; private set; } + [DataMember] + public double Sum { get; private set; } [Required] - public OrderStatus Status { get; private set; } = OrderStatus.Неизвестен; + [DataMember] + public OrderStatus Status { get; private set; } = OrderStatus.Неизвестен; [Required] - public DateTime DateCreate { get; private set; } = DateTime.Now; + [DataMember] + public DateTime DateCreate { get; private set; } = DateTime.Now; - public DateTime? DateImplement { get; private set; } + [DataMember] + public DateTime? DateImplement { get; private set; } public virtual Car Car { get; private set; } public virtual Client Client { get; set; } public Implementer? Implementer { get; private set; } diff --git a/AutomobilePlant/AutomobilePlantFileImplement/AutomobilePlantFileImplement.csproj b/AutomobilePlant/AutomobilePlantFileImplement/AutomobilePlantFileImplement.csproj index a6820c2..547b455 100644 --- a/AutomobilePlant/AutomobilePlantFileImplement/AutomobilePlantFileImplement.csproj +++ b/AutomobilePlant/AutomobilePlantFileImplement/AutomobilePlantFileImplement.csproj @@ -11,4 +11,8 @@ + + + + diff --git a/AutomobilePlant/AutomobilePlantFileImplement/FileImplementationExtension.cs b/AutomobilePlant/AutomobilePlantFileImplement/FileImplementationExtension.cs new file mode 100644 index 0000000..0fad965 --- /dev/null +++ b/AutomobilePlant/AutomobilePlantFileImplement/FileImplementationExtension.cs @@ -0,0 +1,22 @@ +using AutomobilePlantContracts.DI; +using AutomobilePlantContracts.StoragesContracts; +using AutomobilePlantFileImplement.Implements; + +namespace AutomobilePlantFileImplement +{ + public class FileImplementationExtension : IImplementationExtension + { + public int Priority => 1; + + public void RegisterServices() + { + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + } + } +} diff --git a/AutomobilePlant/AutomobilePlantFileImplement/Implements/BackUpInfo.cs b/AutomobilePlant/AutomobilePlantFileImplement/Implements/BackUpInfo.cs new file mode 100644 index 0000000..be33307 --- /dev/null +++ b/AutomobilePlant/AutomobilePlantFileImplement/Implements/BackUpInfo.cs @@ -0,0 +1,28 @@ +using AutomobilePlantContracts.StoragesContracts; + +namespace AutomobilePlantFileImplement.Implements +{ + public class BackUpInfo : IBackUpInfo + { + public List? GetList() where T : class, new() + { + var source = DataFileSingleton.GetInstance(); + return (List?)source.GetType().GetProperties() + .FirstOrDefault(x => x.PropertyType.IsGenericType && x.PropertyType.GetGenericArguments()[0] == typeof(T)) + ?.GetValue(source); + } + public Type? GetTypeByModelInterface(string modelInterfaceName) + { + var assembly = typeof(BackUpInfo).Assembly; + var types = assembly.GetTypes(); + foreach (var type in types) + { + if (type.IsClass && type.GetInterface(modelInterfaceName) != null) + { + return type; + } + } + return null; + } + } +} diff --git a/AutomobilePlant/AutomobilePlantFileImplement/Models/Car.cs b/AutomobilePlant/AutomobilePlantFileImplement/Models/Car.cs index 6eb3a53..fbb7f93 100644 --- a/AutomobilePlant/AutomobilePlantFileImplement/Models/Car.cs +++ b/AutomobilePlant/AutomobilePlantFileImplement/Models/Car.cs @@ -1,27 +1,28 @@ using AutomobilePlantContracts.BindingModels; using AutomobilePlantContracts.ViewModels; using AutomobilePlantDataModels.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Runtime.Serialization; using System.Xml.Linq; namespace AutomobilePlantFileImplement.Models { - public class Car : ICarModel - { - public string CarName { get; private set; } = string.Empty; + [DataContract] + public class Car : ICarModel + { + [DataMember] + public string CarName { get; private set; } = string.Empty; - public double Price { get; private set; } + [DataMember] + public double Price { get; private set; } - public int Id { get; private set; } + [DataMember] + public int Id { get; private set; } public Dictionary Components { get; private set; } = new(); private Dictionary? _carComponents = null; - public Dictionary CarComponents + [DataMember] + public Dictionary CarComponents { get { diff --git a/AutomobilePlant/AutomobilePlantFileImplement/Models/Client.cs b/AutomobilePlant/AutomobilePlantFileImplement/Models/Client.cs index e7ef2d7..d0fb0f5 100644 --- a/AutomobilePlant/AutomobilePlantFileImplement/Models/Client.cs +++ b/AutomobilePlant/AutomobilePlantFileImplement/Models/Client.cs @@ -1,19 +1,25 @@ using AutomobilePlantContracts.BindingModels; using AutomobilePlantContracts.ViewModels; using AutomobilePlantDataModels.Models; +using System.Runtime.Serialization; using System.Xml.Linq; namespace AutomobilePlantFileImplement.Models { - public class Client : IClientModel - { - public int Id { get; private set; } + [DataContract] + public class Client : IClientModel + { + [DataMember] + public int Id { get; private set; } - public string ClientFIO { get; private set; } = string.Empty; + [DataMember] + public string ClientFIO { get; private set; } = string.Empty; - public string Email { get; private set; } = string.Empty; + [DataMember] + public string Email { get; private set; } = string.Empty; - public string Password { get; private set; } = string.Empty; + [DataMember] + public string Password { get; private set; } = string.Empty; public static Client? Create(ClientBindingModel model) { diff --git a/AutomobilePlant/AutomobilePlantFileImplement/Models/Component.cs b/AutomobilePlant/AutomobilePlantFileImplement/Models/Component.cs index b526725..e08b09c 100644 --- a/AutomobilePlant/AutomobilePlantFileImplement/Models/Component.cs +++ b/AutomobilePlant/AutomobilePlantFileImplement/Models/Component.cs @@ -1,20 +1,20 @@ using AutomobilePlantContracts.BindingModels; using AutomobilePlantContracts.ViewModels; using AutomobilePlantDataModels.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Runtime.Serialization; using System.Xml.Linq; namespace AutomobilePlantFileImplement.Models { - public class Component : IComponentModel - { - public int Id { get; private set; } - public string ComponentName { get; private set; } = String.Empty; - public double Cost { get; set; } + [DataContract] + public class Component : IComponentModel + { + [DataMember] + public int Id { get; private set; } + [DataMember] + public string ComponentName { get; private set; } = String.Empty; + [DataMember] + public double Cost { get; set; } public static Component? Create(ComponentBindingModel? model) { diff --git a/AutomobilePlant/AutomobilePlantFileImplement/Models/Implementer.cs b/AutomobilePlant/AutomobilePlantFileImplement/Models/Implementer.cs index 9170a3a..136fc10 100644 --- a/AutomobilePlant/AutomobilePlantFileImplement/Models/Implementer.cs +++ b/AutomobilePlant/AutomobilePlantFileImplement/Models/Implementer.cs @@ -1,21 +1,28 @@ using AutomobilePlantContracts.BindingModels; using AutomobilePlantContracts.ViewModels; using AutomobilePlantDataModels.Models; +using System.Runtime.Serialization; using System.Xml.Linq; namespace AutomobilePlantFileImplement.Models { - public class Implementer : IImplementerModel - { - public int Id { get; private set; } + [DataContract] + public class Implementer : IImplementerModel + { + [DataMember] + public int Id { get; private set; } - public string ImplementerFIO { get; private set; } = string.Empty; + [DataMember] + public string ImplementerFIO { get; private set; } = string.Empty; - public string Password { get; private set; } = string.Empty; + [DataMember] + public string Password { get; private set; } = string.Empty; - public int WorkExperience { get; private set; } + [DataMember] + public int WorkExperience { get; private set; } - public int Qualification { get; private set; } + [DataMember] + public int Qualification { get; private set; } public static Implementer? Create(XElement element) { diff --git a/AutomobilePlant/AutomobilePlantFileImplement/Models/MessageInfo.cs b/AutomobilePlant/AutomobilePlantFileImplement/Models/MessageInfo.cs index f1aacf7..75812f2 100644 --- a/AutomobilePlant/AutomobilePlantFileImplement/Models/MessageInfo.cs +++ b/AutomobilePlant/AutomobilePlantFileImplement/Models/MessageInfo.cs @@ -1,23 +1,31 @@ using AutomobilePlantContracts.BindingModels; using AutomobilePlantContracts.ViewModels; using AutomobilePlantDataModels.Models; +using System.Runtime.Serialization; using System.Xml.Linq; namespace AutomobilePlantFileImplement.Models { - public class MessageInfo : IMessageInfoModel - { - public string MessageId { get; private set; } = string.Empty; + [DataContract] + public class MessageInfo : IMessageInfoModel + { + [DataMember] + public string MessageId { get; private set; } = string.Empty; - public int? ClientId { get; private set; } + [DataMember] + public int? ClientId { get; private set; } - public string SenderName { get; private set; } = string.Empty; + [DataMember] + public string SenderName { get; private set; } = string.Empty; - public DateTime DateDelivery { get; private set; } = DateTime.Now; + [DataMember] + public DateTime DateDelivery { get; private set; } = DateTime.Now; - public string Subject { get; private set; } = string.Empty; + [DataMember] + public string Subject { get; private set; } = string.Empty; - public string Body { get; private set; } = string.Empty; + [DataMember] + public string Body { get; private set; } = string.Empty; public static MessageInfo? Create(MessageInfoBindingModel model) { @@ -71,5 +79,7 @@ namespace AutomobilePlantFileImplement.Models new XAttribute("SenderName", SenderName), new XAttribute("DateDelivery", DateDelivery) ); - } + + public int Id => throw new NotImplementedException(); + } } diff --git a/AutomobilePlant/AutomobilePlantFileImplement/Models/Order.cs b/AutomobilePlant/AutomobilePlantFileImplement/Models/Order.cs index c9f24c0..7a1f5f2 100644 --- a/AutomobilePlant/AutomobilePlantFileImplement/Models/Order.cs +++ b/AutomobilePlant/AutomobilePlantFileImplement/Models/Order.cs @@ -2,26 +2,32 @@ using AutomobilePlantContracts.ViewModels; using AutomobilePlantDataModels.Enums; using AutomobilePlantDataModels.Models; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Runtime.Serialization; using System.Xml.Linq; namespace AutomobilePlantFileImplement.Models { - public class Order : IOrderModel - { - public int Id { get; private set; } - public int CarId { get; private set; } - public int ClientId { get; set; } - public int? ImplementerId { get; set; } - public int Count { get; private set; } - public double Sum { get; private set; } - public OrderStatus Status { get; private set; } = OrderStatus.Неизвестен; - public DateTime DateCreate { get; private set; } = DateTime.Now; - public DateTime? DateImplement { get; private set; } + [DataContract] + public class Order : IOrderModel + { + [DataMember] + public int Id { get; private set; } + [DataMember] + public int CarId { get; private set; } + [DataMember] + public int ClientId { get; set; } + [DataMember] + public int? ImplementerId { get; set; } + [DataMember] + public int Count { get; private set; } + [DataMember] + public double Sum { get; private set; } + [DataMember] + public OrderStatus Status { get; private set; } = OrderStatus.Неизвестен; + [DataMember] + public DateTime DateCreate { get; private set; } = DateTime.Now; + [DataMember] + public DateTime? DateImplement { get; private set; } public static Order? Create(OrderBindingModel? model) { diff --git a/AutomobilePlant/AutomobilePlantListImplement/AutomobilePlantListImplement.csproj b/AutomobilePlant/AutomobilePlantListImplement/AutomobilePlantListImplement.csproj index a6820c2..95c981f 100644 --- a/AutomobilePlant/AutomobilePlantListImplement/AutomobilePlantListImplement.csproj +++ b/AutomobilePlant/AutomobilePlantListImplement/AutomobilePlantListImplement.csproj @@ -1,4 +1,4 @@ - + net6.0 @@ -11,4 +11,8 @@ + + + + diff --git a/AutomobilePlant/AutomobilePlantListImplement/Implements/BackUpInfo.cs b/AutomobilePlant/AutomobilePlantListImplement/Implements/BackUpInfo.cs new file mode 100644 index 0000000..8c94f15 --- /dev/null +++ b/AutomobilePlant/AutomobilePlantListImplement/Implements/BackUpInfo.cs @@ -0,0 +1,17 @@ +using AutomobilePlantContracts.StoragesContracts; + +namespace AutomobilePlantListImplement.Implements +{ + public class BackUpInfo : IBackUpInfo + { + public List? GetList() where T : class, new() + { + throw new NotImplementedException(); + } + + public Type? GetTypeByModelInterface(string modelInterfaceName) + { + throw new NotImplementedException(); + } + } +} diff --git a/AutomobilePlant/AutomobilePlantListImplement/ListImplementationExtension.cs b/AutomobilePlant/AutomobilePlantListImplement/ListImplementationExtension.cs new file mode 100644 index 0000000..293534d --- /dev/null +++ b/AutomobilePlant/AutomobilePlantListImplement/ListImplementationExtension.cs @@ -0,0 +1,22 @@ +using AutomobilePlantContracts.DI; +using AutomobilePlantContracts.StoragesContracts; +using AutomobilePlantListImplement.Implements; + +namespace AutomobilePlantListImplement +{ + public class ListImplementationExtension : IImplementationExtension + { + public int Priority => 0; + + public void RegisterServices() + { + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + } + } +} diff --git a/AutomobilePlant/AutomobilePlantListImplement/Models/MessageInfo.cs b/AutomobilePlant/AutomobilePlantListImplement/Models/MessageInfo.cs index 269cd8c..64104e7 100644 --- a/AutomobilePlant/AutomobilePlantListImplement/Models/MessageInfo.cs +++ b/AutomobilePlant/AutomobilePlantListImplement/Models/MessageInfo.cs @@ -44,5 +44,7 @@ namespace AutomobilePlantListImplement.Models SenderName = SenderName, DateDelivery = DateDelivery, }; - } + + public int Id => throw new NotImplementedException(); + } } diff --git a/AutomobilePlant/AutomobilePlantView/DataGridViewExtension.cs b/AutomobilePlant/AutomobilePlantView/DataGridViewExtension.cs new file mode 100644 index 0000000..b8662a1 --- /dev/null +++ b/AutomobilePlant/AutomobilePlantView/DataGridViewExtension.cs @@ -0,0 +1,45 @@ +using AutomobilePlantContracts.Attributes; + +namespace AutomobilePlantView +{ + public static class DataGridViewExtension + { + public static void FillAndConfigGrid(this DataGridView grid, List? data) + { + if (data == null) + { + return; + } + grid.DataSource = data; + var type = typeof(T); + var properties = type.GetProperties(); + foreach (DataGridViewColumn column in grid.Columns) + { + var property = properties.FirstOrDefault(x => x.Name == column.Name); + if (property == null) + { + throw new InvalidOperationException($"В типе {type.Name} не найдено свойство с именем {column.Name}"); + } + var attribute = property.GetCustomAttributes(typeof(ColumnAttribute), true)?.SingleOrDefault(); + if (attribute == null) + { + throw new InvalidOperationException($"Не найден атрибут типа ColumnAttribute для свойства {property.Name}"); + } + // ищем нужный нам атрибут + if (attribute is ColumnAttribute columnAttr) + { + column.HeaderText = columnAttr.Title; + column.Visible = columnAttr.Visible; + if (columnAttr.IsUseAutoSize) + { + column.AutoSizeMode = (DataGridViewAutoSizeColumnMode)Enum.Parse(typeof(DataGridViewAutoSizeColumnMode), columnAttr.GridViewAutoSize.ToString()); + } + else + { + column.Width = columnAttr.Width; + } + } + } + } + } +} diff --git a/AutomobilePlant/AutomobilePlantView/FormCar.cs b/AutomobilePlant/AutomobilePlantView/FormCar.cs index 118c17f..26f3a64 100644 --- a/AutomobilePlant/AutomobilePlantView/FormCar.cs +++ b/AutomobilePlant/AutomobilePlantView/FormCar.cs @@ -1,17 +1,9 @@ using AutomobilePlantDataModels.Models; using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; using AutomobilePlantContracts.BusinessLogicsContracts; using AutomobilePlantContracts.SearchModels; using AutomobilePlantContracts.BindingModels; +using AutomobilePlantContracts.DI; namespace AutomobilePlantView { @@ -80,48 +72,42 @@ namespace AutomobilePlantView } private void ButtonAdd_Click(object sender, EventArgs e) { - var service = Program.ServiceProvider?.GetService(typeof(FormCarComponent)); - if (service is FormCarComponent form) + var form = DependencyManager.Instance.Resolve(); + if (form.ShowDialog() == DialogResult.OK) { - if (form.ShowDialog() == DialogResult.OK) + if (form.ComponentModel == null) { - if (form.ComponentModel == null) - { - return; - } - _logger.LogInformation("Добавление нового компонента: { ComponentName} - { Count}", form.ComponentModel.ComponentName, form.Count); - if (_carComponents.ContainsKey(form.Id)) - { - _carComponents[form.Id] = (form.ComponentModel, form.Count); - } - else - { - _carComponents.Add(form.Id, (form.ComponentModel, form.Count)); - } - LoadData(); + return; } + _logger.LogInformation("Добавление нового компонента: { ComponentName} - { Count}", form.ComponentModel.ComponentName, form.Count); + if (_carComponents.ContainsKey(form.Id)) + { + _carComponents[form.Id] = (form.ComponentModel, form.Count); + } + else + { + _carComponents.Add(form.Id, (form.ComponentModel, form.Count)); + } + LoadData(); } } private void ButtonUpd_Click(object sender, EventArgs e) { if (dataGridView.SelectedRows.Count == 1) { - var service = Program.ServiceProvider?.GetService(typeof(FormCarComponent)); - if (service is FormCarComponent form) + var form = DependencyManager.Instance.Resolve(); + int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells[0].Value); + form.Id = id; + form.Count = _carComponents[id].Item2; + if (form.ShowDialog() == DialogResult.OK) { - int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells[0].Value); - form.Id = id; - form.Count = _carComponents[id].Item2; - if (form.ShowDialog() == DialogResult.OK) + if (form.ComponentModel == null) { - if (form.ComponentModel == null) - { - return; - } - _logger.LogInformation("Изменение компонента: { ComponentName} - { Count}", form.ComponentModel.ComponentName, form.Count); - _carComponents[form.Id] = (form.ComponentModel, form.Count); - LoadData(); + return; } + _logger.LogInformation("Изменение компонента: { ComponentName} - { Count}", form.ComponentModel.ComponentName, form.Count); + _carComponents[form.Id] = (form.ComponentModel, form.Count); + LoadData(); } } } diff --git a/AutomobilePlant/AutomobilePlantView/FormCars.cs b/AutomobilePlant/AutomobilePlantView/FormCars.cs index c1875a7..9fd8959 100644 --- a/AutomobilePlant/AutomobilePlantView/FormCars.cs +++ b/AutomobilePlant/AutomobilePlantView/FormCars.cs @@ -1,16 +1,7 @@ using AutomobilePlantContracts.BindingModels; using AutomobilePlantContracts.BusinessLogicsContracts; using Microsoft.Extensions.Logging; -using Microsoft.VisualBasic.Logging; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; +using AutomobilePlantContracts.DI; namespace AutomobilePlantView { @@ -33,16 +24,9 @@ namespace AutomobilePlantView { try { - var list = _logic.ReadList(null); - if (list != null) - { - dataGridView.DataSource = list; - dataGridView.Columns["Id"].Visible = false; - dataGridView.Columns["CarName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; - dataGridView.Columns["CarComponents"].Visible = false; - } - _logger.LogInformation("Загрузка машин"); - } + dataGridView.FillAndConfigGrid(_logic.ReadList(null)); + _logger.LogInformation("Загрузка Машин"); + } catch (Exception ex) { _logger.LogError(ex, "Ошибка загрузки Машин"); @@ -51,27 +35,21 @@ namespace AutomobilePlantView } private void ButtonAdd_Click(object sender, EventArgs e) { - var service = Program.ServiceProvider?.GetService(typeof(FormCar)); - if (service is FormCar form) + var form = DependencyManager.Instance.Resolve(); + if (form.ShowDialog() == DialogResult.OK) { - if (form.ShowDialog() == DialogResult.OK) - { - LoadData(); - } + LoadData(); } } private void ButtonUpd_Click(object sender, EventArgs e) { if (dataGridView.SelectedRows.Count == 1) { - var service = Program.ServiceProvider?.GetService(typeof(FormCar)); - if (service is FormCar form) + var form = DependencyManager.Instance.Resolve(); + form.Id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); + if (form.ShowDialog() == DialogResult.OK) { - form.Id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); - if (form.ShowDialog() == DialogResult.OK) - { - LoadData(); - } + LoadData(); } } } diff --git a/AutomobilePlant/AutomobilePlantView/FormClients.cs b/AutomobilePlant/AutomobilePlantView/FormClients.cs index 26b35fb..560ba8a 100644 --- a/AutomobilePlant/AutomobilePlantView/FormClients.cs +++ b/AutomobilePlant/AutomobilePlantView/FormClients.cs @@ -24,15 +24,9 @@ namespace AutomobilePlantView { try { - var list = _logic.ReadList(null); - if (list != null) - { - dataGridView.DataSource = list; - dataGridView.Columns["Id"].Visible = false; - dataGridView.Columns["ClientFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; - } - _logger.LogInformation("Загрузка клиентов"); - } + dataGridView.FillAndConfigGrid(_logic.ReadList(null)); + _logger.LogInformation("Загрузка клиентов"); + } catch (Exception ex) { _logger.LogError(ex, "Ошибка загрузки клиентов"); diff --git a/AutomobilePlant/AutomobilePlantView/FormComponents.cs b/AutomobilePlant/AutomobilePlantView/FormComponents.cs index 0aa581c..3eb00b8 100644 --- a/AutomobilePlant/AutomobilePlantView/FormComponents.cs +++ b/AutomobilePlant/AutomobilePlantView/FormComponents.cs @@ -1,5 +1,6 @@ using AutomobilePlantContracts.BindingModels; using AutomobilePlantContracts.BusinessLogicsContracts; +using AutomobilePlantContracts.DI; using Microsoft.Extensions.Logging; namespace AutomobilePlantView @@ -22,15 +23,9 @@ namespace AutomobilePlantView { try { - var list = _logic.ReadList(null); - if (list != null) - { - dataGridView.DataSource = list; - dataGridView.Columns["Id"].Visible = false; - dataGridView.Columns["ComponentName"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; - } - _logger.LogInformation("Загрузка компонентов"); - } + dataGridView.FillAndConfigGrid(_logic.ReadList(null)); + _logger.LogInformation("Загрузка компонентов"); + } catch (Exception ex) { _logger.LogError(ex, "Ошибка загрузки компонентов"); @@ -39,27 +34,21 @@ namespace AutomobilePlantView } private void ButtonAdd_Click(object sender, EventArgs e) { - var service = Program.ServiceProvider?.GetService(typeof(FormComponent)); - if (service is FormComponent form) + var form = DependencyManager.Instance.Resolve(); + if (form.ShowDialog() == DialogResult.OK) { - if (form.ShowDialog() == DialogResult.OK) - { - LoadData(); - } + LoadData(); } } private void ButtonUpd_Click(object sender, EventArgs e) { if (dataGridView.SelectedRows.Count == 1) { - var service = Program.ServiceProvider?.GetService(typeof(FormComponent)); - if (service is FormComponent form) + var form = DependencyManager.Instance.Resolve(); + form.Id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); + if (form.ShowDialog() == DialogResult.OK) { - form.Id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); - if (form.ShowDialog() == DialogResult.OK) - { - LoadData(); - } + LoadData(); } } } diff --git a/AutomobilePlant/AutomobilePlantView/FormImplementers.cs b/AutomobilePlant/AutomobilePlantView/FormImplementers.cs index d0820bd..30be897 100644 --- a/AutomobilePlant/AutomobilePlantView/FormImplementers.cs +++ b/AutomobilePlant/AutomobilePlantView/FormImplementers.cs @@ -1,15 +1,7 @@ using AutomobilePlantContracts.BindingModels; using AutomobilePlantContracts.BusinessLogicsContracts; +using AutomobilePlantContracts.DI; using Microsoft.Extensions.Logging; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; namespace AutomobilePlantView { @@ -32,15 +24,9 @@ namespace AutomobilePlantView { try { - var list = _logic.ReadList(null); - if (list != null) - { - dataGridView.DataSource = list; - dataGridView.Columns["Id"].Visible = false; - dataGridView.Columns["ImplementerFIO"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; - } - _logger.LogInformation("Загрузка исполнителей"); - } + dataGridView.FillAndConfigGrid(_logic.ReadList(null)); + _logger.LogInformation("Загрузка исполнителей"); + } catch (Exception ex) { _logger.LogError(ex, "Ошибка загрузки исполнителей"); @@ -50,29 +36,23 @@ namespace AutomobilePlantView } private void buttonCreate_Click(object sender, EventArgs e) - { - var service = Program.ServiceProvider?.GetService(typeof(FormImplementer)); - if (service is FormImplementer form) + { + var form = DependencyManager.Instance.Resolve(); + if (form.ShowDialog() == DialogResult.OK) { - if (form.ShowDialog() == DialogResult.OK) - { - LoadData(); - } + LoadData(); } } private void buttonUpdate_Click(object sender, EventArgs e) { if (dataGridView.SelectedRows.Count == 1) - { - var service = Program.ServiceProvider?.GetService(typeof(FormImplementer)); - if (service is FormImplementer form) + { + var form = DependencyManager.Instance.Resolve(); + form.Id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); + if (form.ShowDialog() == DialogResult.OK) { - form.Id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); - if (form.ShowDialog() == DialogResult.OK) - { - LoadData(); - } + LoadData(); } } } diff --git a/AutomobilePlant/AutomobilePlantView/FormMails.cs b/AutomobilePlant/AutomobilePlantView/FormMails.cs index 5ed0215..5792da0 100644 --- a/AutomobilePlant/AutomobilePlantView/FormMails.cs +++ b/AutomobilePlant/AutomobilePlantView/FormMails.cs @@ -19,16 +19,9 @@ namespace AutomobilePlantView { try { - var list = _logic.ReadList(null); - if (list != null) - { - dataGridView.DataSource = list; - dataGridView.Columns["ClientId"].Visible = false; - dataGridView.Columns["MessageId"].Visible = false; - dataGridView.Columns["Body"].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill; - } - _logger.LogInformation("Загрузка писем"); - } + dataGridView.FillAndConfigGrid(_logic.ReadList(null)); + _logger.LogInformation("Загрузка писем"); + } catch (Exception ex) { _logger.LogError(ex, "Ошибка загрузки писем"); diff --git a/AutomobilePlant/AutomobilePlantView/FormMain.Designer.cs b/AutomobilePlant/AutomobilePlantView/FormMain.Designer.cs index 1d2d841..80cec61 100644 --- a/AutomobilePlant/AutomobilePlantView/FormMain.Designer.cs +++ b/AutomobilePlant/AutomobilePlantView/FormMain.Designer.cs @@ -20,182 +20,190 @@ base.Dispose(disposing); } - #region Windows Form Designer generated code + #region Windows Form Designer generated code - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - menuStrip1 = new MenuStrip(); - toolStripMenuItemCatalogs = new ToolStripMenuItem(); - toolStripMenuItemComponents = new ToolStripMenuItem(); - toolStripMenuItemCars = new ToolStripMenuItem(); - clientsToolStripMenuItem = new ToolStripMenuItem(); - implementersToolStripMenuItem = new ToolStripMenuItem(); - reportsToolStripMenuItem = new ToolStripMenuItem(); - carsListToolStripMenuItem = new ToolStripMenuItem(); - componentsByCarsToolStripMenuItem = new ToolStripMenuItem(); - ordersListToolStripMenuItem = new ToolStripMenuItem(); - startWorkingsToolStripMenuItem = new ToolStripMenuItem(); - dataGridView = new DataGridView(); - buttonCreateOrder = new Button(); - buttonIssuedOrder = new Button(); - buttonRefresh = new Button(); - mailsToolStripMenuItem = new ToolStripMenuItem(); - menuStrip1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); - SuspendLayout(); - // - // menuStrip1 - // - menuStrip1.Items.AddRange(new ToolStripItem[] { toolStripMenuItemCatalogs, reportsToolStripMenuItem, startWorkingsToolStripMenuItem }); - menuStrip1.Location = new Point(0, 0); - menuStrip1.Name = "menuStrip1"; - menuStrip1.Size = new Size(800, 24); - menuStrip1.TabIndex = 0; - menuStrip1.Text = "menuStrip1"; - // - // toolStripMenuItemCatalogs - // - toolStripMenuItemCatalogs.DropDownItems.AddRange(new ToolStripItem[] { toolStripMenuItemComponents, toolStripMenuItemCars, clientsToolStripMenuItem, implementersToolStripMenuItem, mailsToolStripMenuItem }); - toolStripMenuItemCatalogs.Name = "toolStripMenuItemCatalogs"; - toolStripMenuItemCatalogs.Size = new Size(65, 20); - toolStripMenuItemCatalogs.Text = "Catalogs"; - // - // toolStripMenuItemComponents - // - toolStripMenuItemComponents.Name = "toolStripMenuItemComponents"; - toolStripMenuItemComponents.Size = new Size(180, 22); - toolStripMenuItemComponents.Text = "Components"; - toolStripMenuItemComponents.Click += ComponentsToolStripMenuItem_Click; - // - // toolStripMenuItemCars - // - toolStripMenuItemCars.Name = "toolStripMenuItemCars"; - toolStripMenuItemCars.Size = new Size(180, 22); - toolStripMenuItemCars.Text = "Cars"; - toolStripMenuItemCars.Click += CarsToolStripMenuItem_Click; - // - // clientsToolStripMenuItem - // - clientsToolStripMenuItem.Name = "clientsToolStripMenuItem"; - clientsToolStripMenuItem.Size = new Size(180, 22); - clientsToolStripMenuItem.Text = "Clients"; - clientsToolStripMenuItem.Click += clientsToolStripMenuItem_Click; - // - // implementersToolStripMenuItem - // - implementersToolStripMenuItem.Name = "implementersToolStripMenuItem"; - implementersToolStripMenuItem.Size = new Size(180, 22); - implementersToolStripMenuItem.Text = "Implementers"; - implementersToolStripMenuItem.Click += implementersToolStripMenuItem_Click; - // - // reportsToolStripMenuItem - // - reportsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { carsListToolStripMenuItem, componentsByCarsToolStripMenuItem, ordersListToolStripMenuItem }); - reportsToolStripMenuItem.Name = "reportsToolStripMenuItem"; - reportsToolStripMenuItem.Size = new Size(59, 20); - reportsToolStripMenuItem.Text = "Reports"; - // - // carsListToolStripMenuItem - // - carsListToolStripMenuItem.Name = "carsListToolStripMenuItem"; - carsListToolStripMenuItem.Size = new Size(186, 22); - carsListToolStripMenuItem.Text = "Cars' list"; - carsListToolStripMenuItem.Click += carsListToolStripMenuItem_Click; - // - // componentsByCarsToolStripMenuItem - // - componentsByCarsToolStripMenuItem.Name = "componentsByCarsToolStripMenuItem"; - componentsByCarsToolStripMenuItem.Size = new Size(186, 22); - componentsByCarsToolStripMenuItem.Text = "Components' by cars"; - componentsByCarsToolStripMenuItem.Click += componentsByCarsToolStripMenuItem_Click; - // - // ordersListToolStripMenuItem - // - ordersListToolStripMenuItem.Name = "ordersListToolStripMenuItem"; - ordersListToolStripMenuItem.Size = new Size(186, 22); - ordersListToolStripMenuItem.Text = "Orders' list"; - ordersListToolStripMenuItem.Click += ordersListToolStripMenuItem_Click; - // - // startWorkingsToolStripMenuItem - // - startWorkingsToolStripMenuItem.Name = "startWorkingsToolStripMenuItem"; - startWorkingsToolStripMenuItem.Size = new Size(94, 20); - startWorkingsToolStripMenuItem.Text = "Start workings"; - startWorkingsToolStripMenuItem.Click += startWorkingsToolStripMenuItem_Click; - // - // dataGridView - // - dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridView.Location = new Point(12, 27); - dataGridView.Name = "dataGridView"; - dataGridView.RowTemplate.Height = 25; - dataGridView.Size = new Size(659, 411); - dataGridView.TabIndex = 1; - // - // buttonCreateOrder - // - buttonCreateOrder.Location = new Point(677, 27); - buttonCreateOrder.Name = "buttonCreateOrder"; - buttonCreateOrder.Size = new Size(111, 23); - buttonCreateOrder.TabIndex = 2; - buttonCreateOrder.Text = "Create order"; - buttonCreateOrder.UseVisualStyleBackColor = true; - buttonCreateOrder.Click += ButtonCreateOrder_Click; - // - // buttonIssuedOrder - // - buttonIssuedOrder.Location = new Point(677, 56); - buttonIssuedOrder.Name = "buttonIssuedOrder"; - buttonIssuedOrder.Size = new Size(111, 23); - buttonIssuedOrder.TabIndex = 5; - buttonIssuedOrder.Text = "Order is issued"; - buttonIssuedOrder.UseVisualStyleBackColor = true; - buttonIssuedOrder.Click += ButtonIssuedOrder_Click; - // - // buttonRefresh - // - buttonRefresh.Location = new Point(677, 85); - buttonRefresh.Name = "buttonRefresh"; - buttonRefresh.Size = new Size(111, 23); - buttonRefresh.TabIndex = 6; - buttonRefresh.Text = "Refresh"; - buttonRefresh.UseVisualStyleBackColor = true; - buttonRefresh.Click += ButtonRef_Click; - // - // mailsToolStripMenuItem - // - mailsToolStripMenuItem.Name = "mailsToolStripMenuItem"; - mailsToolStripMenuItem.Size = new Size(180, 22); - mailsToolStripMenuItem.Text = "mails"; - mailsToolStripMenuItem.Click += mailsToolStripMenuItem_Click; - // - // FormMain - // - AutoScaleDimensions = new SizeF(7F, 15F); - AutoScaleMode = AutoScaleMode.Font; - ClientSize = new Size(800, 450); - Controls.Add(buttonRefresh); - Controls.Add(buttonIssuedOrder); - Controls.Add(buttonCreateOrder); - Controls.Add(dataGridView); - Controls.Add(menuStrip1); - Name = "FormMain"; - Text = "Automobile plant"; - Load += FormMain_Load; - menuStrip1.ResumeLayout(false); - menuStrip1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); - ResumeLayout(false); - PerformLayout(); - } + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + menuStrip1 = new MenuStrip(); + toolStripMenuItemCatalogs = new ToolStripMenuItem(); + toolStripMenuItemComponents = new ToolStripMenuItem(); + toolStripMenuItemCars = new ToolStripMenuItem(); + clientsToolStripMenuItem = new ToolStripMenuItem(); + implementersToolStripMenuItem = new ToolStripMenuItem(); + mailsToolStripMenuItem = new ToolStripMenuItem(); + reportsToolStripMenuItem = new ToolStripMenuItem(); + carsListToolStripMenuItem = new ToolStripMenuItem(); + componentsByCarsToolStripMenuItem = new ToolStripMenuItem(); + ordersListToolStripMenuItem = new ToolStripMenuItem(); + startWorkingsToolStripMenuItem = new ToolStripMenuItem(); + dataGridView = new DataGridView(); + buttonCreateOrder = new Button(); + buttonIssuedOrder = new Button(); + buttonRefresh = new Button(); + createBackupToolStripMenuItem = new ToolStripMenuItem(); + menuStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)dataGridView).BeginInit(); + SuspendLayout(); + // + // menuStrip1 + // + menuStrip1.Items.AddRange(new ToolStripItem[] { toolStripMenuItemCatalogs, reportsToolStripMenuItem, startWorkingsToolStripMenuItem, createBackupToolStripMenuItem }); + menuStrip1.Location = new Point(0, 0); + menuStrip1.Name = "menuStrip1"; + menuStrip1.Size = new Size(800, 24); + menuStrip1.TabIndex = 0; + menuStrip1.Text = "menuStrip1"; + // + // toolStripMenuItemCatalogs + // + toolStripMenuItemCatalogs.DropDownItems.AddRange(new ToolStripItem[] { toolStripMenuItemComponents, toolStripMenuItemCars, clientsToolStripMenuItem, implementersToolStripMenuItem, mailsToolStripMenuItem }); + toolStripMenuItemCatalogs.Name = "toolStripMenuItemCatalogs"; + toolStripMenuItemCatalogs.Size = new Size(65, 20); + toolStripMenuItemCatalogs.Text = "Catalogs"; + // + // toolStripMenuItemComponents + // + toolStripMenuItemComponents.Name = "toolStripMenuItemComponents"; + toolStripMenuItemComponents.Size = new Size(147, 22); + toolStripMenuItemComponents.Text = "Components"; + toolStripMenuItemComponents.Click += ComponentsToolStripMenuItem_Click; + // + // toolStripMenuItemCars + // + toolStripMenuItemCars.Name = "toolStripMenuItemCars"; + toolStripMenuItemCars.Size = new Size(147, 22); + toolStripMenuItemCars.Text = "Cars"; + toolStripMenuItemCars.Click += CarsToolStripMenuItem_Click; + // + // clientsToolStripMenuItem + // + clientsToolStripMenuItem.Name = "clientsToolStripMenuItem"; + clientsToolStripMenuItem.Size = new Size(147, 22); + clientsToolStripMenuItem.Text = "Clients"; + clientsToolStripMenuItem.Click += clientsToolStripMenuItem_Click; + // + // implementersToolStripMenuItem + // + implementersToolStripMenuItem.Name = "implementersToolStripMenuItem"; + implementersToolStripMenuItem.Size = new Size(147, 22); + implementersToolStripMenuItem.Text = "Implementers"; + implementersToolStripMenuItem.Click += implementersToolStripMenuItem_Click; + // + // mailsToolStripMenuItem + // + mailsToolStripMenuItem.Name = "mailsToolStripMenuItem"; + mailsToolStripMenuItem.Size = new Size(147, 22); + mailsToolStripMenuItem.Text = "mails"; + mailsToolStripMenuItem.Click += mailsToolStripMenuItem_Click; + // + // reportsToolStripMenuItem + // + reportsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { carsListToolStripMenuItem, componentsByCarsToolStripMenuItem, ordersListToolStripMenuItem }); + reportsToolStripMenuItem.Name = "reportsToolStripMenuItem"; + reportsToolStripMenuItem.Size = new Size(59, 20); + reportsToolStripMenuItem.Text = "Reports"; + // + // carsListToolStripMenuItem + // + carsListToolStripMenuItem.Name = "carsListToolStripMenuItem"; + carsListToolStripMenuItem.Size = new Size(186, 22); + carsListToolStripMenuItem.Text = "Cars' list"; + carsListToolStripMenuItem.Click += carsListToolStripMenuItem_Click; + // + // componentsByCarsToolStripMenuItem + // + componentsByCarsToolStripMenuItem.Name = "componentsByCarsToolStripMenuItem"; + componentsByCarsToolStripMenuItem.Size = new Size(186, 22); + componentsByCarsToolStripMenuItem.Text = "Components' by cars"; + componentsByCarsToolStripMenuItem.Click += componentsByCarsToolStripMenuItem_Click; + // + // ordersListToolStripMenuItem + // + ordersListToolStripMenuItem.Name = "ordersListToolStripMenuItem"; + ordersListToolStripMenuItem.Size = new Size(186, 22); + ordersListToolStripMenuItem.Text = "Orders' list"; + ordersListToolStripMenuItem.Click += ordersListToolStripMenuItem_Click; + // + // startWorkingsToolStripMenuItem + // + startWorkingsToolStripMenuItem.Name = "startWorkingsToolStripMenuItem"; + startWorkingsToolStripMenuItem.Size = new Size(94, 20); + startWorkingsToolStripMenuItem.Text = "Start workings"; + startWorkingsToolStripMenuItem.Click += startWorkingsToolStripMenuItem_Click; + // + // dataGridView + // + dataGridView.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize; + dataGridView.Location = new Point(12, 27); + dataGridView.Name = "dataGridView"; + dataGridView.RowTemplate.Height = 25; + dataGridView.Size = new Size(659, 411); + dataGridView.TabIndex = 1; + // + // buttonCreateOrder + // + buttonCreateOrder.Location = new Point(677, 27); + buttonCreateOrder.Name = "buttonCreateOrder"; + buttonCreateOrder.Size = new Size(111, 23); + buttonCreateOrder.TabIndex = 2; + buttonCreateOrder.Text = "Create order"; + buttonCreateOrder.UseVisualStyleBackColor = true; + buttonCreateOrder.Click += ButtonCreateOrder_Click; + // + // buttonIssuedOrder + // + buttonIssuedOrder.Location = new Point(677, 56); + buttonIssuedOrder.Name = "buttonIssuedOrder"; + buttonIssuedOrder.Size = new Size(111, 23); + buttonIssuedOrder.TabIndex = 5; + buttonIssuedOrder.Text = "Order is issued"; + buttonIssuedOrder.UseVisualStyleBackColor = true; + buttonIssuedOrder.Click += ButtonIssuedOrder_Click; + // + // buttonRefresh + // + buttonRefresh.Location = new Point(677, 85); + buttonRefresh.Name = "buttonRefresh"; + buttonRefresh.Size = new Size(111, 23); + buttonRefresh.TabIndex = 6; + buttonRefresh.Text = "Refresh"; + buttonRefresh.UseVisualStyleBackColor = true; + buttonRefresh.Click += ButtonRef_Click; + // + // createBackupToolStripMenuItem + // + createBackupToolStripMenuItem.Name = "createBackupToolStripMenuItem"; + createBackupToolStripMenuItem.Size = new Size(95, 20); + createBackupToolStripMenuItem.Text = "Create backup"; + createBackupToolStripMenuItem.Click += createBackupToolStripMenuItem_Click; + // + // FormMain + // + AutoScaleDimensions = new SizeF(7F, 15F); + AutoScaleMode = AutoScaleMode.Font; + ClientSize = new Size(800, 450); + Controls.Add(buttonRefresh); + Controls.Add(buttonIssuedOrder); + Controls.Add(buttonCreateOrder); + Controls.Add(dataGridView); + Controls.Add(menuStrip1); + Name = "FormMain"; + Text = "Automobile plant"; + Load += FormMain_Load; + menuStrip1.ResumeLayout(false); + menuStrip1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)dataGridView).EndInit(); + ResumeLayout(false); + PerformLayout(); + } - #endregion + #endregion - private MenuStrip menuStrip1; + private MenuStrip menuStrip1; private ToolStripMenuItem toolStripMenuItemCatalogs; private ToolStripMenuItem toolStripMenuItemComponents; private ToolStripMenuItem toolStripMenuItemCars; @@ -211,5 +219,6 @@ private ToolStripMenuItem implementersToolStripMenuItem; private ToolStripMenuItem startWorkingsToolStripMenuItem; private ToolStripMenuItem mailsToolStripMenuItem; - } + private ToolStripMenuItem createBackupToolStripMenuItem; + } } \ No newline at end of file diff --git a/AutomobilePlant/AutomobilePlantView/FormMain.cs b/AutomobilePlant/AutomobilePlantView/FormMain.cs index d1962d0..8c904ac 100644 --- a/AutomobilePlant/AutomobilePlantView/FormMain.cs +++ b/AutomobilePlant/AutomobilePlantView/FormMain.cs @@ -1,224 +1,218 @@ using AutomobilePlantContracts.BindingModels; using AutomobilePlantContracts.BusinessLogicsContracts; +using AutomobilePlantContracts.DI; using AutomobilePlantDataModels.Enums; using Microsoft.Extensions.Logging; namespace AutomobilePlantView { - public partial class FormMain : Form - { - private readonly ILogger _logger; - private readonly IOrderLogic _orderLogic; - private readonly IReportLogic _reportLogic; - private readonly IWorkProcess _workProcess; - public FormMain(ILogger logger, IOrderLogic orderLogic, IReportLogic reportLogic, IWorkProcess workProcess) - { - InitializeComponent(); - _logger = logger; - _orderLogic = orderLogic; - _reportLogic = reportLogic; - _workProcess = workProcess; - } - private void FormMain_Load(object sender, EventArgs e) - { - LoadData(); - } - private void LoadData() - { - _logger.LogInformation("Загрузка заказов"); - try - { - var list = _orderLogic.ReadList(null); - if (list != null) - { - dataGridView.DataSource = list; - dataGridView.Columns["CarId"].Visible = false; - dataGridView.Columns["ClientId"].Visible = false; - dataGridView.Columns["ImplementerId"].Visible = false; + public partial class FormMain : Form + { + private readonly ILogger _logger; + private readonly IOrderLogic _orderLogic; + private readonly IReportLogic _reportLogic; + private readonly IWorkProcess _workProcess; + private readonly IBackUpLogic _backUpLogic; + public FormMain(ILogger logger, IOrderLogic orderLogic, IReportLogic reportLogic, IWorkProcess workProcess, IBackUpLogic backUpLogic) + { + InitializeComponent(); + _logger = logger; + _orderLogic = orderLogic; + _reportLogic = reportLogic; + _workProcess = workProcess; + _backUpLogic = backUpLogic; + } + private void FormMain_Load(object sender, EventArgs e) + { + LoadData(); + } + private void LoadData() + { + _logger.LogInformation("Загрузка заказов"); + try + { + dataGridView.FillAndConfigGrid(_orderLogic.ReadList(null)); + _logger.LogInformation("Загрузка заказов"); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка загрузки заказов"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + private void ComponentsToolStripMenuItem_Click(object sender, EventArgs e) + { + var form = DependencyManager.Instance.Resolve(); + form.ShowDialog(); + } + private void CarsToolStripMenuItem_Click(object sender, EventArgs e) + { + var form = DependencyManager.Instance.Resolve(); + form.ShowDialog(); + } - } - _logger.LogInformation("Загрузка заказов"); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка загрузки заказов"); - MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - private void ComponentsToolStripMenuItem_Click(object sender, EventArgs e) - { - var service = Program.ServiceProvider?.GetService(typeof(FormComponents)); - if (service is FormComponents form) - { - form.ShowDialog(); - } - } - private void CarsToolStripMenuItem_Click(object sender, EventArgs e) - { - var service = Program.ServiceProvider?.GetService(typeof(FormCars)); - if (service is FormCars form) - { - form.ShowDialog(); - } - } + private void clientsToolStripMenuItem_Click(object sender, EventArgs e) + { + var form = DependencyManager.Instance.Resolve(); + form.ShowDialog(); + } - private void clientsToolStripMenuItem_Click(object sender, EventArgs e) - { - var service = Program.ServiceProvider?.GetService(typeof(FormClients)); - if (service is FormClients form) - { - form.ShowDialog(); - } - } + private void implementersToolStripMenuItem_Click(object sender, EventArgs e) + { + var form = DependencyManager.Instance.Resolve(); + form.ShowDialog(); + } - private void implementersToolStripMenuItem_Click(object sender, EventArgs e) - { - var service = Program.ServiceProvider?.GetService(typeof(FormImplementers)); - if (service is FormImplementers form) - { - form.ShowDialog(); - } - } + private void mailsToolStripMenuItem_Click(object sender, EventArgs e) + { + var form = DependencyManager.Instance.Resolve(); + form.ShowDialog(); + } - private void mailsToolStripMenuItem_Click(object sender, EventArgs e) - { - var service = Program.ServiceProvider?.GetService(typeof(FormMails)); - if (service is FormMails form) - { - form.ShowDialog(); - } - } + private void carsListToolStripMenuItem_Click(object sender, EventArgs e) + { + using var dialog = new SaveFileDialog { Filter = "docx|*.docx" }; + if (dialog.ShowDialog() == DialogResult.OK) + { + _reportLogic.SaveCarsToWordFile(new ReportBindingModel + { + FileName = dialog.FileName + }); + MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } - private void carsListToolStripMenuItem_Click(object sender, EventArgs e) - { - using var dialog = new SaveFileDialog { Filter = "docx|*.docx" }; - if (dialog.ShowDialog() == DialogResult.OK) - { - _reportLogic.SaveCarsToWordFile(new ReportBindingModel - { - FileName = dialog.FileName - }); - MessageBox.Show("Выполнено", "Успех", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - } + private void componentsByCarsToolStripMenuItem_Click(object sender, EventArgs e) + { + var form = DependencyManager.Instance.Resolve(); + form.ShowDialog(); + } - private void componentsByCarsToolStripMenuItem_Click(object sender, EventArgs e) - { - var service = Program.ServiceProvider?.GetService(typeof(FormReportCarComponents)); - if (service is FormReportCarComponents form) - { - form.ShowDialog(); - } - } + private void ordersListToolStripMenuItem_Click(object sender, EventArgs e) + { + var form = DependencyManager.Instance.Resolve(); + form.ShowDialog(); + } - private void ordersListToolStripMenuItem_Click(object sender, EventArgs e) - { - var service = Program.ServiceProvider?.GetService(typeof(FormReportOrders)); - if (service is FormReportOrders form) - { - form.ShowDialog(); - } - } + private void startWorkingsToolStripMenuItem_Click(object sender, EventArgs e) + { + _workProcess.DoWork(DependencyManager.Instance.Resolve(), _orderLogic); + MessageBox.Show("Процесс обработки запущен", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information); + } - private void startWorkingsToolStripMenuItem_Click(object sender, EventArgs e) - { - _workProcess.DoWork((Program.ServiceProvider?.GetService(typeof(IImplementerLogic)) as IImplementerLogic)!, _orderLogic); - MessageBox.Show("Процесс обработки запущен", "Сообщение", MessageBoxButtons.OK, MessageBoxIcon.Information); - } + private void createBackupToolStripMenuItem_Click(object sender, EventArgs e) + { + try + { + if (_backUpLogic != null) + { + var fbd = new FolderBrowserDialog(); + if (fbd.ShowDialog() == DialogResult.OK) + { + _backUpLogic.CreateBackUp(new BackUpSaveBinidngModel + { + FolderName = fbd.SelectedPath + }); + MessageBox.Show("Backup created", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } - private void ButtonCreateOrder_Click(object sender, EventArgs e) - { - var service = Program.ServiceProvider?.GetService(typeof(FormCreateOrder)); - if (service is FormCreateOrder form) - { - form.ShowDialog(); - LoadData(); - } - } - private OrderBindingModel CreateBindingModel(int id) - { - return new OrderBindingModel - { - Id = id, - CarId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["CarId"].Value), - Count = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Count"].Value), - DateCreate = DateTime.Parse(dataGridView.SelectedRows[0].Cells["DateCreate"].Value.ToString()), - Status = Enum.Parse(dataGridView.SelectedRows[0].Cells["Status"].Value.ToString()), - Sum = double.Parse(dataGridView.SelectedRows[0].Cells["Sum"].Value.ToString()), - }; - } - private void ButtonTakeOrderInWork_Click(object sender, EventArgs e) - { - if (dataGridView.SelectedRows.Count == 1) - { - int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); - _logger.LogInformation("Заказ №{id}. Меняется статус на 'В работе'", id); - try - { - var operationResult = _orderLogic.TakeOrderInWork(CreateBindingModel(id)); - if (!operationResult) - { - throw new Exception("Ошибка при сохранении. Дополнительная информация в логах."); - } - LoadData(); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка передачи заказа в работу"); - MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, - MessageBoxIcon.Error); - } - } - } - private void ButtonOrderReady_Click(object sender, EventArgs e) - { - if (dataGridView.SelectedRows.Count == 1) - { - int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); - _logger.LogInformation("Заказ №{id}. Меняется статус на 'Готов'", id); - try - { - var operationResult = _orderLogic.FinishOrder(CreateBindingModel(id)); - if (!operationResult) - { - throw new Exception("Ошибка при сохранении. Дополнительная информация в логах."); - } - LoadData(); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка отметки о готовности заказа"); - MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - } - private void ButtonIssuedOrder_Click(object sender, EventArgs e) - { - if (dataGridView.SelectedRows.Count == 1) - { - int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); - _logger.LogInformation("Заказ №{id}. Меняется статус на 'Выдан'", id); - try - { - var operationResult = _orderLogic.DeliveryOrder(CreateBindingModel(id)); - if (!operationResult) - { - throw new Exception("Ошибка при сохранении. Дополнительная информация в логах."); - } - _logger.LogInformation("Заказ №{id} выдан", id); - LoadData(); - } - catch (Exception ex) - { - _logger.LogError(ex, "Ошибка отметки о выдачи заказа"); - MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - } - private void ButtonRef_Click(object sender, EventArgs e) - { - LoadData(); - } - } + private void ButtonCreateOrder_Click(object sender, EventArgs e) + { + var form = DependencyManager.Instance.Resolve(); + form.ShowDialog(); + LoadData(); + } + private OrderBindingModel CreateBindingModel(int id) + { + return new OrderBindingModel + { + Id = id, + CarId = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["CarId"].Value), + Count = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Count"].Value), + DateCreate = DateTime.Parse(dataGridView.SelectedRows[0].Cells["DateCreate"].Value.ToString()), + Status = Enum.Parse(dataGridView.SelectedRows[0].Cells["Status"].Value.ToString()), + Sum = double.Parse(dataGridView.SelectedRows[0].Cells["Sum"].Value.ToString()), + }; + } + private void ButtonTakeOrderInWork_Click(object sender, EventArgs e) + { + if (dataGridView.SelectedRows.Count == 1) + { + int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); + _logger.LogInformation("Заказ №{id}. Меняется статус на 'В работе'", id); + try + { + var operationResult = _orderLogic.TakeOrderInWork(CreateBindingModel(id)); + if (!operationResult) + { + throw new Exception("Ошибка при сохранении. Дополнительная информация в логах."); + } + LoadData(); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка передачи заказа в работу"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, + MessageBoxIcon.Error); + } + } + } + private void ButtonOrderReady_Click(object sender, EventArgs e) + { + if (dataGridView.SelectedRows.Count == 1) + { + int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); + _logger.LogInformation("Заказ №{id}. Меняется статус на 'Готов'", id); + try + { + var operationResult = _orderLogic.FinishOrder(CreateBindingModel(id)); + if (!operationResult) + { + throw new Exception("Ошибка при сохранении. Дополнительная информация в логах."); + } + LoadData(); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка отметки о готовности заказа"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + private void ButtonIssuedOrder_Click(object sender, EventArgs e) + { + if (dataGridView.SelectedRows.Count == 1) + { + int id = Convert.ToInt32(dataGridView.SelectedRows[0].Cells["Id"].Value); + _logger.LogInformation("Заказ №{id}. Меняется статус на 'Выдан'", id); + try + { + var operationResult = _orderLogic.DeliveryOrder(CreateBindingModel(id)); + if (!operationResult) + { + throw new Exception("Ошибка при сохранении. Дополнительная информация в логах."); + } + _logger.LogInformation("Заказ №{id} выдан", id); + LoadData(); + } + catch (Exception ex) + { + _logger.LogError(ex, "Ошибка отметки о выдачи заказа"); + MessageBox.Show(ex.Message, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + private void ButtonRef_Click(object sender, EventArgs e) + { + LoadData(); + } + } } diff --git a/AutomobilePlant/AutomobilePlantView/Program.cs b/AutomobilePlant/AutomobilePlantView/Program.cs index 522f2ab..b35b983 100644 --- a/AutomobilePlant/AutomobilePlantView/Program.cs +++ b/AutomobilePlant/AutomobilePlantView/Program.cs @@ -2,20 +2,16 @@ using AutomobilePlantBusinessLogic.OfficePackage.Implements; using AutomobilePlantBusinessLogic.OfficePackage; using AutomobilePlantContracts.BusinessLogicsContracts; -using AutomobilePlantContracts.StoragesContracts; -using AutomobilePlantDatabaseImplement.Implements; -using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using NLog.Extensions.Logging; using AutomobilePlantBusinessLogic.MailWorker; using AutomobilePlantContracts.BindingModels; +using AutomobilePlantContracts.DI; namespace AutomobilePlantView { internal static class Program { - private static ServiceProvider? _serviceProvider; - public static ServiceProvider? ServiceProvider => _serviceProvider; /// /// The main entry point for the application. /// @@ -25,14 +21,12 @@ namespace AutomobilePlantView // To customize application configuration such as set high DPI settings or default font, // see https://aka.ms/applicationconfiguration. ApplicationConfiguration.Initialize(); - var services = new ServiceCollection(); - ConfigureServices(services); - _serviceProvider = services.BuildServiceProvider(); + InitDependency(); - try - { - var mailSender = _serviceProvider.GetService(); - mailSender?.MailConfig(new MailConfigBindingModel + try + { + var mailSender = DependencyManager.Instance.Resolve(); + mailSender?.MailConfig(new MailConfigBindingModel { MailLogin = System.Configuration.ConfigurationManager.AppSettings["MailLogin"] ?? string.Empty, MailPassword = System.Configuration.ConfigurationManager.AppSettings["MailPassword"] ?? string.Empty, @@ -45,52 +39,49 @@ namespace AutomobilePlantView var timer = new System.Threading.Timer(new TimerCallback(MailCheck!), null, 0, 100000); } catch (Exception ex) - { - var logger = _serviceProvider.GetService(); - logger?.LogError(ex, "Ошибка работы с почтой"); + { + var logger = DependencyManager.Instance.Resolve(); + logger?.LogError(ex, "Ошибка работы с почтой"); } - Application.Run(_serviceProvider.GetRequiredService()); - } - private static void MailCheck(object obj) => ServiceProvider?.GetService()?.MailCheck(); - private static void ConfigureServices(ServiceCollection services) - { - services.AddLogging(option => - { - option.SetMinimumLevel(LogLevel.Information); - option.AddNLog("nlog.config"); - }); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddSingleton(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); - services.AddTransient(); + Application.Run(DependencyManager.Instance.Resolve()); + } + private static void MailCheck(object obj) => DependencyManager.Instance.Resolve()?.MailCheck(); + private static void InitDependency() + { + DependencyManager.InitDependency(); + + DependencyManager.Instance.AddLogging(option => + { + option.SetMinimumLevel(LogLevel.Information); + option.AddNLog("nlog.config"); + }); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); + DependencyManager.Instance.RegisterType(); } } } \ No newline at end of file diff --git a/AutomobilePlant/ImplementationExtensions/AutomobilePlantContracts.dll b/AutomobilePlant/ImplementationExtensions/AutomobilePlantContracts.dll new file mode 100644 index 0000000000000000000000000000000000000000..3432b3315c0ce8ad1f82d0f868eed969f248b313 GIT binary patch literal 32256 zcmeHw34B~-x%YFsB=S+oCO@ip)&U1QqqldZMM8jcTW!_<@<) z0FCpfYn4PDVB7|~;q$oq@$JEvC`V-7$Tt(5fB6gm!SlyP%~!E2|DU`nl_`8O5$_5X zdca$eFrhwuL>UlYx`C+4TZ)IJ)-O!h$gsbQXUB<=R90R~6WmWlxCLcdhb44s3 z3qq5;^+0gqyA9uzPZe%gMJ&`Bg(K&c`taqruE00tQ$F{-M$l%+NUfu4YpxA@@$_nM&E%3X`eDqx9t=G z1a6E$hycQ25+Z;=wHO{ET(0lJJ@@QncRlW9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KSM;T|&pb`qvX$KC9>I6& zjrd|wW_~!$TzpT*_atm5Q*7+R_cZl$eq&wZk=$!0cieb##on*xjjx>iqlY<;+WG77 zaziY>ZUYWNqU#!?ov~nO9iQgL*R5>W&@yet^!4XOJGaF*ha=IA8`n2gtgpuZL*H1! z>oD=qx>Lwgb!(HjF1q2;buvz@i-bBbs(h$tMSIHzYFtu1WA>S(GQa3)m3dUq;y=_} z-LQD=j883I_1VW}n}4Yeg<8R~AKwu^)hT{Ncyt-7Yi-3DaD>|8K@5ta3O;*QpARM? znp3ONH2%-^zf=wI-=HSE$F9a}D{nGe;N9}!Ji9Ex_rf0hyC^)dsLunoS&%Nkd)e!O z^?0wl5j&w3c;kCLuFLVJ_zLlS%>JkMjZvL@5`T;<{>>Ko*n!-CQ$KZ3G{hR97~%=b zeyjoeu8s09e-YlI=TJ?s24pwZnzBnX;yGZ?<5dsx)B&$Byf%#x)0;?`->5hLn}y%M zpbk)$V(_&{jdymOMi)vHkUb&CUyV1oJH#4A2qS+hkxTaMkZ^qE+y!wp2A#DMr&*dh z>?7l_a^BkEW9%^h)wnBphh~-U0>mA&_NW}^bnI{|tuNut`qA*`8s+_L4A%g1pDf`g zEuXc2Mp{^PA?~G!cay}*wb+jO3Dy4Hok_H{pKP}5PtK38}Z*PSkJ_-IQTPH?sqlraU6BjhPYc%!+!Lbp?5x+ c55E8Z^Z9RC12-7|W^~Jp|CXiyZ(r#D1tK;Eod5s; literal 0 HcmV?d00001 diff --git a/AutomobilePlant/ImplementationExtensions/AutomobilePlantDataModels.dll b/AutomobilePlant/ImplementationExtensions/AutomobilePlantDataModels.dll new file mode 100644 index 0000000000000000000000000000000000000000..6e02030943208e7c344953549a5db090a0d91d47 GIT binary patch literal 7168 zcmeHLeQX=$8Gp`qcHN{&o0iZoXiYyxXu)-wG))-LIB^PIn>MY}P{2}pw$JI&^PP2f zZktJiEEFU(CK#*G#0Fzbo0tTmLX8G&fCLg_+KL=$XcA&DjX#*+571Oiz#nwK=e@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EuIHsyW?I_~jRJSI_B&?gq3&(X)Fex+G}Ga_;g@N*X+bvt1-1@;_SeH828@fQ^`=O7%am7J^O(5RlbEypUl7+27erfN((y7M_H zc$r+>;NqG%r&i|s+XXogJ+))<&W<-)u2s&ViE~)t6Pmx;lOhA;$mQWs1piSv(vb*@ z&ucxBJ+=xyyW>Rg%(MLRo2LQ7-O1z5i)+*wvIUx>=uYP zua{^=e9y@Euw`q>a`|e1J6?aZFP?yd_Dkx=R!VouhC0nhZ{Gk@3&lit_x5eu!43@c=kt97`C_qm zdtVQ37ZRN~!k3=$P+QV4tYf1U!`1Q82EoF#c^DrdILX;;H}0(e$qbW(^jjr-UEmL7 zQ3@{GKYnoVO_D~(cy51-einD}vwW%Z8yhY|zY_fv?(?TQe1-oAm_s%}!r$z%0t z;t&?va~t90{8Bc1`bcm>f+b0Xem#5%e_&UXCU(ZNBY)4Xr}c3SQQH9;Ag z1dh;tP-*FJ&8-8^B9;Csi zNky`R*#t7;hwTRux1Hdwn_25XVrf4|86%|Cd<2c^tz#cqS^Sw;RZk=!^U2 z`|}p$*X;BBiZ|-L8TZivtdTr=Kd1rB!&a>0KIGR8Nda^MR5xy^+t58N+x25i9(Du3 zBK~@z?Zds6Tfdm^B<9#bolEd-pu#cinC6*p#KH6bb^A(I029x@v0wf50{BW!|Gxl- C#(eky literal 0 HcmV?d00001 diff --git a/AutomobilePlant/ImplementationExtensions/AutomobilePlantFileImplement.dll b/AutomobilePlant/ImplementationExtensions/AutomobilePlantFileImplement.dll new file mode 100644 index 0000000000000000000000000000000000000000..5acc3311945ad7761ddb00351f5f225e0be33c38 GIT binary patch literal 40448 zcmeIb3w%`7^)J58nVB<_naN`&4?rSLAm~6s3=er&L?QuA1w?s>Eeb<2Ks3pLnV=v- zCk3^(SfxHHJ}4+?X|+|0Z>>bJmD-2em$ual^;P@xQGczq_Cf#Owe~(|&LqM1{_gMp z`P_RycXZZSuf5jVYp=b}o;@eSoX=cKJ|gnt{m*|AJ&Y^ArVI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&!DgVVisJVOOWQA-!T5N^kJv#d57kIw!pHS`N% z5PodeamWeBZxRdpp8@p^po)&(d**Mqkuhf;w|ENg+4tjpy%yra;g#ck0^TLx!TSav zo)>-+rr>qX{O0)=kAHpm=O>OnWBU*9KKr6I$6moUW}LiaVHV%sE?JK68tf(WH2;jIaVJeA-HDgZ)15$~j(ws0`!7D-u=2E}-+3Z=K9b?Q zE@3?3P=(iaj~)?@FEh;@9dq!_4s~W*QQ2wv8cnzP=SZ08o6jiEr7H5Yz?m`{O=!8 zmBy9AFLjll0tDs9o9om2Y6gMdg~lmS26p&l4v)a-vq#pel~xNNO@W(*+;iS0hVJ!G z<(mUy>V{T3v{nvaX|U)tqTlMj2{?a44)FH`$D*xsp2$AdqeuGW5%MOSfOX^Ct`qO& zI=*=l1)r1UBj%G~@98dwwp?sGI($Bt#d#mcxEgKsnc@GUk47xUh8xEs_~7&ByzQ|# z!EJQk98(SSIm7A%unT?d@bvh<+TRA8OLpKtekC!={8t`$d_k;pc2^^>-1C+AO>dkp z$}GE3V&Su6=JUvLEKa_dlJnpH@)&qyQsc}g$$SR8R?c1jyTej0w)>7mejMuX z7YI`@4y|}k1~vub!+%3C5&aztP8;w>U}NzYGbiD#q^vg?ZCar>1#kuan*ixV8ZSAY yEOmfiy1{?^9m8^Day_zq^f^aZ? literal 0 HcmV?d00001 diff --git a/AutomobilePlant/ImplementationExtensions/AutomobilePlantListImplement.dll b/AutomobilePlant/ImplementationExtensions/AutomobilePlantListImplement.dll new file mode 100644 index 0000000000000000000000000000000000000000..c379df1b2e7d9830c10d293acdf079bfa6cea0bf GIT binary patch literal 26624 zcmeHwdwg7VweQ+{X7)UinMo#T`U)^@(=s#<(g!7hwj@p366lMjv;+$6B$<|hBsl0#K}D@1lq+!TIme^;IbIIu<1P2Q*6+9X z>`Bssp7YoFoWWUpy?*Pr*808H-g{ElUimTd5s@F?ci$y?5?B7T2s}L)g*bNBH)8a7 z_=mHeG}ioZ)~0K-`Q%{E-kD4HCwtN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