From efe1193cc6ca39b6a33ca0e459b8ef9ff374cf7e Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 8 Apr 2023 18:12:08 +0400 Subject: [PATCH] Contacts --- .../BindingModels/ComponentBindingModel.cs | 10 +++++++ .../BindingModels/EngenierBindingModel.cs | 20 ++++++++++++++ .../BindingModels/LatheBindingModel.cs | 19 ++++++++++++++ .../BindingModels/LatheBusyBindingModel.cs | 13 ++++++++++ .../BindingModels/MasterBindingModel.cs | 20 ++++++++++++++ .../BindingModels/PlanBindingModel.cs | 17 ++++++++++++ .../BindingModels/ReinforcedBindingModel.cs | 14 ++++++++++ .../BindingModels/ReportBindingModel.cs | 15 +++++++++++ .../BindingModels/StageBindingModel.cs | 13 ++++++++++ .../IComponentLogic.cs | 15 +++++++++++ .../BusinessLogicsContracts/IEngenierLogic.cs | 24 +++++++++++++++++ .../ILatheBusyLogic.cs | 15 +++++++++++ .../BusinessLogicsContracts/ILatheLogic.cs | 15 +++++++++++ .../BusinessLogicsContracts/IMasterLogic.cs | 24 +++++++++++++++++ .../BusinessLogicsContracts/IPlanLogic.cs | 17 ++++++++++++ .../IReinforcedLogic.cs | 15 +++++++++++ .../BusinessLogicsContracts/IReportLogic.cs | 21 +++++++++++++++ .../BusinessLogicsContracts/IStageLogic.cs | 15 +++++++++++ .../SearchModels/ComponentSearchModel.cs | 8 ++++++ .../SearchModels/EngenierSearchModel.cs | 23 ++++++++++++++++ .../SearchModels/LatheBusySearchModel.cs | 15 +++++++++++ .../SearchModels/LatheSearchModel.cs | 19 ++++++++++++++ .../SearchModels/MasterSearchModel.cs | 25 ++++++++++++++++++ .../SearchModels/PlanSearchModel.cs | 17 ++++++++++++ .../SearchModels/ReinforcedSearchModel.cs | 8 ++++++ .../SearchModels/StageSearchModel.cs | 13 ++++++++++ .../StoragesContracts/IComponentStorage.cs | 16 ++++++++++++ .../StoragesContracts/IEngenierStorage.cs | 26 +++++++++++++++++++ .../StoragesContracts/ILatheBusyStorage.cs | 16 ++++++++++++ .../StoragesContracts/ILatheStorage.cs | 16 ++++++++++++ .../StoragesContracts/IMasterStorage.cs | 26 +++++++++++++++++++ .../StoragesContracts/IPlanStorage.cs | 16 ++++++++++++ .../StoragesContracts/IReinforcedStorage.cs | 16 ++++++++++++ .../StoragesContracts/IStageStorage.cs | 16 ++++++++++++ .../ViewModels/ComponentViewModel.cs | 12 +++++++++ .../ViewModels/EngenierViewModel.cs | 22 ++++++++++++++++ .../ViewModels/LatheBusyViewModel.cs | 15 +++++++++++ .../ViewModels/LatheViewModel.cs | 21 +++++++++++++++ .../ViewModels/MasterViewModel.cs | 23 ++++++++++++++++ .../ViewModels/PlanViewModel.cs | 19 ++++++++++++++ .../ViewModels/ReinforcedViewModel.cs | 16 ++++++++++++ .../ReportLatheComponentViewModel.cs | 17 ++++++++++++ .../ViewModels/ReportLathesViewModel.cs | 13 ++++++++++ .../ViewModels/StageViewModel.cs | 13 ++++++++++ 44 files changed, 749 insertions(+) create mode 100644 FactoryView/FactoryContracts/BindingModels/ComponentBindingModel.cs create mode 100644 FactoryView/FactoryContracts/BindingModels/EngenierBindingModel.cs create mode 100644 FactoryView/FactoryContracts/BindingModels/LatheBindingModel.cs create mode 100644 FactoryView/FactoryContracts/BindingModels/LatheBusyBindingModel.cs create mode 100644 FactoryView/FactoryContracts/BindingModels/MasterBindingModel.cs create mode 100644 FactoryView/FactoryContracts/BindingModels/PlanBindingModel.cs create mode 100644 FactoryView/FactoryContracts/BindingModels/ReinforcedBindingModel.cs create mode 100644 FactoryView/FactoryContracts/BindingModels/ReportBindingModel.cs create mode 100644 FactoryView/FactoryContracts/BindingModels/StageBindingModel.cs create mode 100644 FactoryView/FactoryContracts/BusinessLogicsContracts/IComponentLogic.cs create mode 100644 FactoryView/FactoryContracts/BusinessLogicsContracts/IEngenierLogic.cs create mode 100644 FactoryView/FactoryContracts/BusinessLogicsContracts/ILatheBusyLogic.cs create mode 100644 FactoryView/FactoryContracts/BusinessLogicsContracts/ILatheLogic.cs create mode 100644 FactoryView/FactoryContracts/BusinessLogicsContracts/IMasterLogic.cs create mode 100644 FactoryView/FactoryContracts/BusinessLogicsContracts/IPlanLogic.cs create mode 100644 FactoryView/FactoryContracts/BusinessLogicsContracts/IReinforcedLogic.cs create mode 100644 FactoryView/FactoryContracts/BusinessLogicsContracts/IReportLogic.cs create mode 100644 FactoryView/FactoryContracts/BusinessLogicsContracts/IStageLogic.cs create mode 100644 FactoryView/FactoryContracts/SearchModels/ComponentSearchModel.cs create mode 100644 FactoryView/FactoryContracts/SearchModels/EngenierSearchModel.cs create mode 100644 FactoryView/FactoryContracts/SearchModels/LatheBusySearchModel.cs create mode 100644 FactoryView/FactoryContracts/SearchModels/LatheSearchModel.cs create mode 100644 FactoryView/FactoryContracts/SearchModels/MasterSearchModel.cs create mode 100644 FactoryView/FactoryContracts/SearchModels/PlanSearchModel.cs create mode 100644 FactoryView/FactoryContracts/SearchModels/ReinforcedSearchModel.cs create mode 100644 FactoryView/FactoryContracts/SearchModels/StageSearchModel.cs create mode 100644 FactoryView/FactoryContracts/StoragesContracts/IComponentStorage.cs create mode 100644 FactoryView/FactoryContracts/StoragesContracts/IEngenierStorage.cs create mode 100644 FactoryView/FactoryContracts/StoragesContracts/ILatheBusyStorage.cs create mode 100644 FactoryView/FactoryContracts/StoragesContracts/ILatheStorage.cs create mode 100644 FactoryView/FactoryContracts/StoragesContracts/IMasterStorage.cs create mode 100644 FactoryView/FactoryContracts/StoragesContracts/IPlanStorage.cs create mode 100644 FactoryView/FactoryContracts/StoragesContracts/IReinforcedStorage.cs create mode 100644 FactoryView/FactoryContracts/StoragesContracts/IStageStorage.cs create mode 100644 FactoryView/FactoryContracts/ViewModels/ComponentViewModel.cs create mode 100644 FactoryView/FactoryContracts/ViewModels/EngenierViewModel.cs create mode 100644 FactoryView/FactoryContracts/ViewModels/LatheBusyViewModel.cs create mode 100644 FactoryView/FactoryContracts/ViewModels/LatheViewModel.cs create mode 100644 FactoryView/FactoryContracts/ViewModels/MasterViewModel.cs create mode 100644 FactoryView/FactoryContracts/ViewModels/PlanViewModel.cs create mode 100644 FactoryView/FactoryContracts/ViewModels/ReinforcedViewModel.cs create mode 100644 FactoryView/FactoryContracts/ViewModels/ReportLatheComponentViewModel.cs create mode 100644 FactoryView/FactoryContracts/ViewModels/ReportLathesViewModel.cs create mode 100644 FactoryView/FactoryContracts/ViewModels/StageViewModel.cs diff --git a/FactoryView/FactoryContracts/BindingModels/ComponentBindingModel.cs b/FactoryView/FactoryContracts/BindingModels/ComponentBindingModel.cs new file mode 100644 index 0000000..8082d00 --- /dev/null +++ b/FactoryView/FactoryContracts/BindingModels/ComponentBindingModel.cs @@ -0,0 +1,10 @@ +using FactoryDataModels.Models; + +namespace FactoryContracts.BindingModels +{ + public class ComponentBindingModel : IComponentModel + { + public int Id { get; set; } + public string ComponentName { get; set; } = string.Empty; + } +} diff --git a/FactoryView/FactoryContracts/BindingModels/EngenierBindingModel.cs b/FactoryView/FactoryContracts/BindingModels/EngenierBindingModel.cs new file mode 100644 index 0000000..02f59c5 --- /dev/null +++ b/FactoryView/FactoryContracts/BindingModels/EngenierBindingModel.cs @@ -0,0 +1,20 @@ +using FactoryDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FactoryContracts.BindingModels +{ + public class EngenierBindingModel : IEngenierModel + { + public int Id { get; set; } + + public string Password { get; set; } = string.Empty; + + public string Fio { get; set; } = string.Empty; + + public string Email { get; set; } = string.Empty; + } +} diff --git a/FactoryView/FactoryContracts/BindingModels/LatheBindingModel.cs b/FactoryView/FactoryContracts/BindingModels/LatheBindingModel.cs new file mode 100644 index 0000000..aac56ab --- /dev/null +++ b/FactoryView/FactoryContracts/BindingModels/LatheBindingModel.cs @@ -0,0 +1,19 @@ +using FactoryDataModels.Models; + +namespace FactoryContracts.BindingModels +{ + public class LatheBindingModel : ILatheModel + { + public int Id { get; set; } + + public string LatheName { get; set; } = String.Empty; + + public int MasterId { get; set; } + + public int BusyId { get; set; } + + public Dictionary LatheReinforcedes { get; set; } = new(); + + + } +} diff --git a/FactoryView/FactoryContracts/BindingModels/LatheBusyBindingModel.cs b/FactoryView/FactoryContracts/BindingModels/LatheBusyBindingModel.cs new file mode 100644 index 0000000..b1fe753 --- /dev/null +++ b/FactoryView/FactoryContracts/BindingModels/LatheBusyBindingModel.cs @@ -0,0 +1,13 @@ +using FactoryDataModels.Models; + +namespace FactoryContracts.BindingModels +{ + public class LatheBusyBindingModel : ILatheBusyModel + { + public int Id { get; set; } + + public int Percent { get; set; } + + public DateTime Date { get; set; } + } +} diff --git a/FactoryView/FactoryContracts/BindingModels/MasterBindingModel.cs b/FactoryView/FactoryContracts/BindingModels/MasterBindingModel.cs new file mode 100644 index 0000000..950b8ce --- /dev/null +++ b/FactoryView/FactoryContracts/BindingModels/MasterBindingModel.cs @@ -0,0 +1,20 @@ +using FactoryDataModels.Models; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FactoryContracts.BindingModels +{ + public class MasterBindingModel : IMasterModel + { + public int Id { get; set; } + + public string Password { get; set; } = string.Empty; + + public string Fio { get; set; } = string.Empty; + + public string Email { get; set; } = string.Empty; + } +} diff --git a/FactoryView/FactoryContracts/BindingModels/PlanBindingModel.cs b/FactoryView/FactoryContracts/BindingModels/PlanBindingModel.cs new file mode 100644 index 0000000..630ad00 --- /dev/null +++ b/FactoryView/FactoryContracts/BindingModels/PlanBindingModel.cs @@ -0,0 +1,17 @@ +using FactoryDataModels.Models; + +namespace FactoryContracts.BindingModels +{ + public class PlanBindingModel : IPlanModel + { + public int Id { get; set; } + + public string PlanName { get; set; } = string.Empty; + + public Dictionary PlanLathes { get; set; } = new(); + + public Dictionary PlanComponents { get; set; } = new(); + + public DateTime date { get; set; } + } +} diff --git a/FactoryView/FactoryContracts/BindingModels/ReinforcedBindingModel.cs b/FactoryView/FactoryContracts/BindingModels/ReinforcedBindingModel.cs new file mode 100644 index 0000000..ec26c0a --- /dev/null +++ b/FactoryView/FactoryContracts/BindingModels/ReinforcedBindingModel.cs @@ -0,0 +1,14 @@ +using FactoryDataModels.Models; + +namespace FactoryContracts.BindingModels +{ + public class ReinforcedBindingModel : IReinforcedModel + { + public int Id { get; set; } + public string ReinforcedName { get; set; } = string.Empty; + + public int EngenierId { get; set; } + public Dictionary ReinforcedComponents { get; set; } = new(); + + } +} diff --git a/FactoryView/FactoryContracts/BindingModels/ReportBindingModel.cs b/FactoryView/FactoryContracts/BindingModels/ReportBindingModel.cs new file mode 100644 index 0000000..09db9b5 --- /dev/null +++ b/FactoryView/FactoryContracts/BindingModels/ReportBindingModel.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FactoryContracts.BindingModels +{ + public class ReportBindingModel + { + public string FileName { get; set; } = string.Empty; + public DateTime? DateFrom { get; set; } + public DateTime? DateTo { get; set; } + } +} diff --git a/FactoryView/FactoryContracts/BindingModels/StageBindingModel.cs b/FactoryView/FactoryContracts/BindingModels/StageBindingModel.cs new file mode 100644 index 0000000..45b6474 --- /dev/null +++ b/FactoryView/FactoryContracts/BindingModels/StageBindingModel.cs @@ -0,0 +1,13 @@ +using FactoryDataModels.Models; + +namespace FactoryContracts.BindingModels +{ + public class StageBindingModel : IStageModel + { + public int Id { get; set; } + + public int PlanId { get; set; } + + public int ReinforsedId { get; set; } + } +} diff --git a/FactoryView/FactoryContracts/BusinessLogicsContracts/IComponentLogic.cs b/FactoryView/FactoryContracts/BusinessLogicsContracts/IComponentLogic.cs new file mode 100644 index 0000000..0c0fd27 --- /dev/null +++ b/FactoryView/FactoryContracts/BusinessLogicsContracts/IComponentLogic.cs @@ -0,0 +1,15 @@ +using FactoryContracts.BindingModels; +using FactoryContracts.SearchModels; +using FactoryContracts.ViewModels; + +namespace FactoryContracts.BusinessLogicsContracts +{ + public interface IComponentLogic + { + List? ReadList(ComponentSearchModel? model); + ComponentViewModel? ReadElement(ComponentSearchModel model); + bool Create(ComponentBindingModel model); + bool Update(ComponentBindingModel model); + bool Delete(ComponentBindingModel model); + } +} diff --git a/FactoryView/FactoryContracts/BusinessLogicsContracts/IEngenierLogic.cs b/FactoryView/FactoryContracts/BusinessLogicsContracts/IEngenierLogic.cs new file mode 100644 index 0000000..148be7d --- /dev/null +++ b/FactoryView/FactoryContracts/BusinessLogicsContracts/IEngenierLogic.cs @@ -0,0 +1,24 @@ +using FactoryContracts.BindingModels; +using FactoryContracts.SearchModels; +using FactoryContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FactoryContracts.BusinessLogicsContracts +{ + public interface IEngenierLogic + { + List? ReadList(EngenierSearchModel? model); + + EngenierViewModel? ReadElement(EngenierSearchModel model); + + bool Create(EngenierBindingModel model); + + bool Update(EngenierBindingModel model); + + bool Delete(EngenierBindingModel model); + } +} diff --git a/FactoryView/FactoryContracts/BusinessLogicsContracts/ILatheBusyLogic.cs b/FactoryView/FactoryContracts/BusinessLogicsContracts/ILatheBusyLogic.cs new file mode 100644 index 0000000..0209dcd --- /dev/null +++ b/FactoryView/FactoryContracts/BusinessLogicsContracts/ILatheBusyLogic.cs @@ -0,0 +1,15 @@ +using FactoryContracts.BindingModels; +using FactoryContracts.SearchModels; +using FactoryContracts.ViewModels; + +namespace FactoryContracts.BusinessLogicsContracts +{ + public interface ILatheBusyLogic + { + List? ReadList(LatheBusySearchModel? model); + LatheBusyViewModel? ReadElement(LatheBusySearchModel model); + bool Create(LatheBusyBindingModel model); + bool Update(LatheBusyBindingModel model); + bool Delete(LatheBusyBindingModel model); + } +} diff --git a/FactoryView/FactoryContracts/BusinessLogicsContracts/ILatheLogic.cs b/FactoryView/FactoryContracts/BusinessLogicsContracts/ILatheLogic.cs new file mode 100644 index 0000000..0067563 --- /dev/null +++ b/FactoryView/FactoryContracts/BusinessLogicsContracts/ILatheLogic.cs @@ -0,0 +1,15 @@ +using FactoryContracts.BindingModels; +using FactoryContracts.SearchModels; +using FactoryContracts.ViewModels; + +namespace FactoryContracts.BusinessLogicsContracts +{ + public interface ILatheLogic + { + List? ReadList(LatheSearchModel? model); + LatheViewModel? ReadElement(LatheSearchModel model); + bool Create(LatheBindingModel model); + bool Update(LatheBindingModel model); + bool Delete(LatheBindingModel model); + } +} diff --git a/FactoryView/FactoryContracts/BusinessLogicsContracts/IMasterLogic.cs b/FactoryView/FactoryContracts/BusinessLogicsContracts/IMasterLogic.cs new file mode 100644 index 0000000..52da13d --- /dev/null +++ b/FactoryView/FactoryContracts/BusinessLogicsContracts/IMasterLogic.cs @@ -0,0 +1,24 @@ +using FactoryContracts.BindingModels; +using FactoryContracts.SearchModels; +using FactoryContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FactoryContracts.BusinessLogicsContracts +{ + public interface IMasterLogic + { + List? ReadList(MasterSearchModel? model); + + MasterViewModel? ReadElement(MasterSearchModel model); + + bool Create(MasterBindingModel model); + + bool Update(MasterBindingModel model); + + bool Delete(MasterBindingModel model); + } +} diff --git a/FactoryView/FactoryContracts/BusinessLogicsContracts/IPlanLogic.cs b/FactoryView/FactoryContracts/BusinessLogicsContracts/IPlanLogic.cs new file mode 100644 index 0000000..21c85a3 --- /dev/null +++ b/FactoryView/FactoryContracts/BusinessLogicsContracts/IPlanLogic.cs @@ -0,0 +1,17 @@ +using FactoryContracts.BindingModels; +using FactoryContracts.SearchModels; +using FactoryContracts.ViewModels; + +namespace FactoryContracts.BusinessLogicsContracts +{ + public interface IPlanLogic + { + List? ReadList(PlanSearchModel? model); + PlanViewModel? ReadElement(PlanSearchModel model); + bool Create(PlanBindingModel model); + bool Update(PlanBindingModel model); + bool Delete(PlanBindingModel model); + + + } +} diff --git a/FactoryView/FactoryContracts/BusinessLogicsContracts/IReinforcedLogic.cs b/FactoryView/FactoryContracts/BusinessLogicsContracts/IReinforcedLogic.cs new file mode 100644 index 0000000..d9e033a --- /dev/null +++ b/FactoryView/FactoryContracts/BusinessLogicsContracts/IReinforcedLogic.cs @@ -0,0 +1,15 @@ +using FactoryContracts.BindingModels; +using FactoryContracts.SearchModels; +using FactoryContracts.ViewModels; + +namespace FactoryContracts.BusinessLogicsContracts +{ + public interface IReinforcedLogic + { + List? ReadList(ReinforcedSearchModel? model); + ReinforcedViewModel? ReadElement(ReinforcedSearchModel model); + bool Create(ReinforcedBindingModel model); + bool Update(ReinforcedBindingModel model); + bool Delete(ReinforcedBindingModel model); + } +} diff --git a/FactoryView/FactoryContracts/BusinessLogicsContracts/IReportLogic.cs b/FactoryView/FactoryContracts/BusinessLogicsContracts/IReportLogic.cs new file mode 100644 index 0000000..30d7725 --- /dev/null +++ b/FactoryView/FactoryContracts/BusinessLogicsContracts/IReportLogic.cs @@ -0,0 +1,21 @@ + +using FactoryContracts.BindingModels; +using FactoryContracts.ViewModels; +using PrecastConcretePlantContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FactoryContracts.BusinessLogicsContracts +{ + public interface IReportLogic + { + List GetPlanLathesAndComponents(ReportBindingModel model); + List GetLatheByBusy(ReportBindingModel model); + void SaveReinforcedesToWordFile(ReportBindingModel model); + void SaveReinforcedComponentToExcelFile(ReportBindingModel model); + void SaveOrdersToPdfFile(ReportBindingModel model); + } +} diff --git a/FactoryView/FactoryContracts/BusinessLogicsContracts/IStageLogic.cs b/FactoryView/FactoryContracts/BusinessLogicsContracts/IStageLogic.cs new file mode 100644 index 0000000..f8ab43f --- /dev/null +++ b/FactoryView/FactoryContracts/BusinessLogicsContracts/IStageLogic.cs @@ -0,0 +1,15 @@ +using FactoryContracts.BindingModels; +using FactoryContracts.SearchModels; +using FactoryContracts.ViewModels; + +namespace FactoryContracts.BusinessLogicsContracts +{ + public interface IStageLogic + { + List? ReadList(StageSearchModel? model); + StageViewModel? ReadElement(StageSearchModel model); + bool Create(StageBindingModel model); + bool Update(StageBindingModel model); + bool Delete(StageBindingModel model); + } +} diff --git a/FactoryView/FactoryContracts/SearchModels/ComponentSearchModel.cs b/FactoryView/FactoryContracts/SearchModels/ComponentSearchModel.cs new file mode 100644 index 0000000..1cbb624 --- /dev/null +++ b/FactoryView/FactoryContracts/SearchModels/ComponentSearchModel.cs @@ -0,0 +1,8 @@ +namespace FactoryContracts.SearchModels +{ + public class ComponentSearchModel + { + public int? Id { get; set; } + public string? ComponentName { get; set; } + } +} diff --git a/FactoryView/FactoryContracts/SearchModels/EngenierSearchModel.cs b/FactoryView/FactoryContracts/SearchModels/EngenierSearchModel.cs new file mode 100644 index 0000000..8551b89 --- /dev/null +++ b/FactoryView/FactoryContracts/SearchModels/EngenierSearchModel.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FactoryContracts.SearchModels +{ + public class EngenierSearchModel + { + public int? Id { get; set; } + + public string? Name { get; set; } + + public string? Surname { get; set; } + + public string? Patronymic { get; set; } + + public string? Email { get; set; } + + public string? Password { get; set; } + } +} diff --git a/FactoryView/FactoryContracts/SearchModels/LatheBusySearchModel.cs b/FactoryView/FactoryContracts/SearchModels/LatheBusySearchModel.cs new file mode 100644 index 0000000..27653c0 --- /dev/null +++ b/FactoryView/FactoryContracts/SearchModels/LatheBusySearchModel.cs @@ -0,0 +1,15 @@ +using FactoryDataModels.Models; + +namespace FactoryContracts.SearchModels +{ + public class LatheBusySearchModel + { + public int? Id { get; set; } + + public int? Percent { get; set; } + + public DateTime? DateTo { get; set; } + + public DateTime? DateFrom { get; set; } + } +} diff --git a/FactoryView/FactoryContracts/SearchModels/LatheSearchModel.cs b/FactoryView/FactoryContracts/SearchModels/LatheSearchModel.cs new file mode 100644 index 0000000..8ea5b0e --- /dev/null +++ b/FactoryView/FactoryContracts/SearchModels/LatheSearchModel.cs @@ -0,0 +1,19 @@ +using FactoryDataModels.Models; + +namespace FactoryContracts.SearchModels +{ + public class LatheSearchModel + { + public int? Id { get; set; } + + public string? LatheName { get; set; } + + public int? MasterId { get; set; } + + public int? BusyId { get; set; } + + public Dictionary? LatheReinforcedes { get; set; } + + + } +} diff --git a/FactoryView/FactoryContracts/SearchModels/MasterSearchModel.cs b/FactoryView/FactoryContracts/SearchModels/MasterSearchModel.cs new file mode 100644 index 0000000..cae6424 --- /dev/null +++ b/FactoryView/FactoryContracts/SearchModels/MasterSearchModel.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FactoryContracts.SearchModels +{ + public class MasterSearchModel + { + public int? Id { get; set; } + + public string? Name { get; set; } + + public string? Surname { get; set; } + + public string? Patronymic { get; set; } + + public string? Email { get; set; } + + public string? Password { get; set; } + + public string? Telephone { get; set; } + } +} diff --git a/FactoryView/FactoryContracts/SearchModels/PlanSearchModel.cs b/FactoryView/FactoryContracts/SearchModels/PlanSearchModel.cs new file mode 100644 index 0000000..b6d0365 --- /dev/null +++ b/FactoryView/FactoryContracts/SearchModels/PlanSearchModel.cs @@ -0,0 +1,17 @@ +using FactoryDataModels.Models; + +namespace FactoryContracts.SearchModels +{ + public class PlanSearchModel + { + public int? Id { get; set; } + + public string? PlanName { get; set; } = string.Empty; + + public Dictionary? PlanLathes { get; set; } = new(); + + public DateTime? DateTo { get; set; } + + public DateTime? DateFrom { get; set; } + } +} diff --git a/FactoryView/FactoryContracts/SearchModels/ReinforcedSearchModel.cs b/FactoryView/FactoryContracts/SearchModels/ReinforcedSearchModel.cs new file mode 100644 index 0000000..8da8bcc --- /dev/null +++ b/FactoryView/FactoryContracts/SearchModels/ReinforcedSearchModel.cs @@ -0,0 +1,8 @@ +namespace FactoryContracts.SearchModels +{ + public class ReinforcedSearchModel + { + public int? Id { get; set; } + public string? ReinforcedName { get; set; } + } +} diff --git a/FactoryView/FactoryContracts/SearchModels/StageSearchModel.cs b/FactoryView/FactoryContracts/SearchModels/StageSearchModel.cs new file mode 100644 index 0000000..f08fabb --- /dev/null +++ b/FactoryView/FactoryContracts/SearchModels/StageSearchModel.cs @@ -0,0 +1,13 @@ +using FactoryDataModels.Models; + +namespace FactoryContracts.SearchModels +{ + public class StageSearchModel + { + public int? Id { get; set; } + + public int? PlanId { get; set; } + + public int? ReinforsedId { get; set; } + } +} diff --git a/FactoryView/FactoryContracts/StoragesContracts/IComponentStorage.cs b/FactoryView/FactoryContracts/StoragesContracts/IComponentStorage.cs new file mode 100644 index 0000000..e3dd889 --- /dev/null +++ b/FactoryView/FactoryContracts/StoragesContracts/IComponentStorage.cs @@ -0,0 +1,16 @@ +using FactoryContracts.BindingModels; +using FactoryContracts.SearchModels; +using FactoryContracts.ViewModels; + +namespace FactoryContracts.StoragesContracts +{ + public interface IComponentStorage + { + List GetFullList(); + List GetFilteredList(ComponentSearchModel model); + ComponentViewModel? GetElement(ComponentSearchModel model); + ComponentViewModel? Insert(ComponentBindingModel model); + ComponentViewModel? Update(ComponentBindingModel model); + ComponentViewModel? Delete(ComponentBindingModel model); + } +} diff --git a/FactoryView/FactoryContracts/StoragesContracts/IEngenierStorage.cs b/FactoryView/FactoryContracts/StoragesContracts/IEngenierStorage.cs new file mode 100644 index 0000000..af90404 --- /dev/null +++ b/FactoryView/FactoryContracts/StoragesContracts/IEngenierStorage.cs @@ -0,0 +1,26 @@ +using FactoryContracts.BindingModels; +using FactoryContracts.SearchModels; +using FactoryContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FactoryContracts.StoragesContracts +{ + public interface IEngenierStorage + { + List GetFullList(); + + List GetFilteredList(EngenierSearchModel model); + + EngenierViewModel? GetElement(EngenierSearchModel model); + + EngenierViewModel? Insert(EngenierBindingModel model); + + EngenierViewModel? Update(EngenierBindingModel model); + + EngenierViewModel? Delete(EngenierBindingModel model); + } +} diff --git a/FactoryView/FactoryContracts/StoragesContracts/ILatheBusyStorage.cs b/FactoryView/FactoryContracts/StoragesContracts/ILatheBusyStorage.cs new file mode 100644 index 0000000..2a030c7 --- /dev/null +++ b/FactoryView/FactoryContracts/StoragesContracts/ILatheBusyStorage.cs @@ -0,0 +1,16 @@ +using FactoryContracts.BindingModels; +using FactoryContracts.SearchModels; +using FactoryContracts.ViewModels; + +namespace FactoryContracts.StoragesContracts +{ + public interface ILatheBusyStorage + { + List GetFullList(); + List GetFilteredList(LatheBusySearchModel model); + LatheBusyViewModel? GetElement(LatheBusySearchModel model); + LatheBusyViewModel? Insert(LatheBusyBindingModel model); + LatheBusyViewModel? Update(LatheBusyBindingModel model); + LatheBusyViewModel? Delete(LatheBusyBindingModel model); + } +} diff --git a/FactoryView/FactoryContracts/StoragesContracts/ILatheStorage.cs b/FactoryView/FactoryContracts/StoragesContracts/ILatheStorage.cs new file mode 100644 index 0000000..aa5dd65 --- /dev/null +++ b/FactoryView/FactoryContracts/StoragesContracts/ILatheStorage.cs @@ -0,0 +1,16 @@ +using FactoryContracts.BindingModels; +using FactoryContracts.SearchModels; +using FactoryContracts.ViewModels; + +namespace FactoryContracts.StoragesContracts +{ + public interface ILatheStorage + { + List GetFullList(); + List GetFilteredList(LatheSearchModel model); + LatheViewModel? GetElement(LatheSearchModel model); + LatheViewModel? Insert(LatheBindingModel model); + LatheViewModel? Update(LatheBindingModel model); + LatheViewModel? Delete(LatheBindingModel model); + } +} diff --git a/FactoryView/FactoryContracts/StoragesContracts/IMasterStorage.cs b/FactoryView/FactoryContracts/StoragesContracts/IMasterStorage.cs new file mode 100644 index 0000000..19ebf66 --- /dev/null +++ b/FactoryView/FactoryContracts/StoragesContracts/IMasterStorage.cs @@ -0,0 +1,26 @@ +using FactoryContracts.BindingModels; +using FactoryContracts.SearchModels; +using FactoryContracts.ViewModels; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FactoryContracts.StoragesContracts +{ + public interface IMasterStorage + { + List GetFullList(); + + List GetFilteredList(MasterSearchModel model); + + MasterViewModel? GetElement(MasterSearchModel model); + + MasterViewModel? Insert(MasterBindingModel model); + + MasterViewModel? Update(MasterBindingModel model); + + MasterViewModel? Delete(MasterBindingModel model); + } +} diff --git a/FactoryView/FactoryContracts/StoragesContracts/IPlanStorage.cs b/FactoryView/FactoryContracts/StoragesContracts/IPlanStorage.cs new file mode 100644 index 0000000..27a9e1c --- /dev/null +++ b/FactoryView/FactoryContracts/StoragesContracts/IPlanStorage.cs @@ -0,0 +1,16 @@ +using FactoryContracts.BindingModels; +using FactoryContracts.SearchModels; +using FactoryContracts.ViewModels; + +namespace FactoryContracts.StoragesContracts +{ + public interface IPlanStorage + { + List GetFullList(); + List GetFilteredList(PlanSearchModel model); + PlanViewModel? GetElement(PlanSearchModel model); + PlanViewModel? Insert(PlanBindingModel model); + PlanViewModel? Update(PlanBindingModel model); + PlanViewModel? Delete(PlanBindingModel model); + } +} diff --git a/FactoryView/FactoryContracts/StoragesContracts/IReinforcedStorage.cs b/FactoryView/FactoryContracts/StoragesContracts/IReinforcedStorage.cs new file mode 100644 index 0000000..953c2fc --- /dev/null +++ b/FactoryView/FactoryContracts/StoragesContracts/IReinforcedStorage.cs @@ -0,0 +1,16 @@ +using FactoryContracts.BindingModels; +using FactoryContracts.SearchModels; +using FactoryContracts.ViewModels; + +namespace FactoryContracts.StoragesContracts +{ + public interface IReinforcedStorage + { + List GetFullList(); + List GetFilteredList(ReinforcedSearchModel model); + ReinforcedViewModel? GetElement(ReinforcedSearchModel model); + ReinforcedViewModel? Insert(ReinforcedBindingModel model); + ReinforcedViewModel? Update(ReinforcedBindingModel model); + ReinforcedViewModel? Delete(ReinforcedBindingModel model); + } +} diff --git a/FactoryView/FactoryContracts/StoragesContracts/IStageStorage.cs b/FactoryView/FactoryContracts/StoragesContracts/IStageStorage.cs new file mode 100644 index 0000000..3b09530 --- /dev/null +++ b/FactoryView/FactoryContracts/StoragesContracts/IStageStorage.cs @@ -0,0 +1,16 @@ +using FactoryContracts.BindingModels; +using FactoryContracts.SearchModels; +using FactoryContracts.ViewModels; + +namespace FactoryContracts.StoragesContracts +{ + public interface IStageStorage + { + List GetFullList(); + List GetFilteredList(StageSearchModel model); + StageViewModel? GetElement(StageSearchModel model); + StageViewModel? Insert(StageBindingModel model); + StageViewModel? Update(StageBindingModel model); + StageViewModel? Delete(StageBindingModel model); + } +} diff --git a/FactoryView/FactoryContracts/ViewModels/ComponentViewModel.cs b/FactoryView/FactoryContracts/ViewModels/ComponentViewModel.cs new file mode 100644 index 0000000..8ba9182 --- /dev/null +++ b/FactoryView/FactoryContracts/ViewModels/ComponentViewModel.cs @@ -0,0 +1,12 @@ +using FactoryDataModels.Models; +using System.ComponentModel; + +namespace FactoryContracts.ViewModels +{ + public class ComponentViewModel : IComponentModel + { + public int Id { get; set; } + [DisplayName("Название компонента")] + public string ComponentName { get; set; } = string.Empty; + } +} diff --git a/FactoryView/FactoryContracts/ViewModels/EngenierViewModel.cs b/FactoryView/FactoryContracts/ViewModels/EngenierViewModel.cs new file mode 100644 index 0000000..b4adcef --- /dev/null +++ b/FactoryView/FactoryContracts/ViewModels/EngenierViewModel.cs @@ -0,0 +1,22 @@ +using FactoryDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FactoryContracts.ViewModels +{ + public class EngenierViewModel : IEngenierModel + { + public int Id { get; set; } + public string Password { get; set; } = string.Empty; + + [DisplayName("Имя")] + public string Fio { get; set; } = string.Empty; + + [DisplayName("Почта")] + public string Email { get; set; } = string.Empty; + } +} diff --git a/FactoryView/FactoryContracts/ViewModels/LatheBusyViewModel.cs b/FactoryView/FactoryContracts/ViewModels/LatheBusyViewModel.cs new file mode 100644 index 0000000..0e8904e --- /dev/null +++ b/FactoryView/FactoryContracts/ViewModels/LatheBusyViewModel.cs @@ -0,0 +1,15 @@ +using FactoryDataModels.Models; +using System.ComponentModel; + +namespace FactoryContracts.ViewModels +{ + public class LatheBusyViewModel : ILatheBusyModel + { + public int Id { get; set; } + + [DisplayName("Процент занятости")] + public int Percent { get; set; } + [DisplayName("Дата занятости")] + public DateTime Date { get; set; } + } +} diff --git a/FactoryView/FactoryContracts/ViewModels/LatheViewModel.cs b/FactoryView/FactoryContracts/ViewModels/LatheViewModel.cs new file mode 100644 index 0000000..9b0bdd7 --- /dev/null +++ b/FactoryView/FactoryContracts/ViewModels/LatheViewModel.cs @@ -0,0 +1,21 @@ +using FactoryDataModels.Models; +using System.ComponentModel; + +namespace FactoryContracts.ViewModels +{ + public class LatheViewModel : ILatheModel + { + public int Id { get; set; } + + [DisplayName("Название станка")] + public string LatheName { get; set; } = String.Empty; + + public int MasterId { get; set; } + + public int BusyId { get; set; } + + public Dictionary LatheReinforcedes { get; set; } = new(); + + + } +} diff --git a/FactoryView/FactoryContracts/ViewModels/MasterViewModel.cs b/FactoryView/FactoryContracts/ViewModels/MasterViewModel.cs new file mode 100644 index 0000000..cff76f3 --- /dev/null +++ b/FactoryView/FactoryContracts/ViewModels/MasterViewModel.cs @@ -0,0 +1,23 @@ +using FactoryDataModels.Models; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FactoryContracts.ViewModels +{ + public class MasterViewModel : IMasterModel + { + public int Id { get; set; } + + public string Password { get; set; } = string.Empty; + + [DisplayName("Имя")] + public string Fio { get; set; } = string.Empty; + + [DisplayName("Почта")] + public string Email { get; set; } = string.Empty; + } +} diff --git a/FactoryView/FactoryContracts/ViewModels/PlanViewModel.cs b/FactoryView/FactoryContracts/ViewModels/PlanViewModel.cs new file mode 100644 index 0000000..8a502ec --- /dev/null +++ b/FactoryView/FactoryContracts/ViewModels/PlanViewModel.cs @@ -0,0 +1,19 @@ +using FactoryDataModels.Models; +using System.ComponentModel; + +namespace FactoryContracts.ViewModels +{ + public class PlanViewModel : IPlanModel + { + public int Id { get; set; } + + [DisplayName("Название производства")] + public string PlanName { get; set; } = string.Empty; + + public Dictionary PlanLathes { get; set; } = new(); + + public Dictionary PlanComponents { get; set; } = new(); + [DisplayName("Дата выполнения")] + public DateTime date { get; set; } + } +} diff --git a/FactoryView/FactoryContracts/ViewModels/ReinforcedViewModel.cs b/FactoryView/FactoryContracts/ViewModels/ReinforcedViewModel.cs new file mode 100644 index 0000000..89feaa0 --- /dev/null +++ b/FactoryView/FactoryContracts/ViewModels/ReinforcedViewModel.cs @@ -0,0 +1,16 @@ +using FactoryDataModels.Models; +using System.ComponentModel; + +namespace FactoryContracts.ViewModels +{ + public class ReinforcedViewModel : IReinforcedModel + { + public int Id { get; set; } + [DisplayName("Название изделия")] + public string ReinforcedName { get; set; } = string.Empty; + + public int EngenierId { get; set; } + + public Dictionary ReinforcedComponents { get;set;} = new(); + } +} diff --git a/FactoryView/FactoryContracts/ViewModels/ReportLatheComponentViewModel.cs b/FactoryView/FactoryContracts/ViewModels/ReportLatheComponentViewModel.cs new file mode 100644 index 0000000..4086b96 --- /dev/null +++ b/FactoryView/FactoryContracts/ViewModels/ReportLatheComponentViewModel.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace FactoryContracts.ViewModels +{ + public class ReportLatheComponentViewModel + { + public string PlanName { get; set; } = string.Empty; + public int TotalCount { get; set; } + public List<(string Component, int Count)> Components { get; set; } = new(); + + public List<(string Component, int Count)> Lathes { get; set; } = new(); + } +} diff --git a/FactoryView/FactoryContracts/ViewModels/ReportLathesViewModel.cs b/FactoryView/FactoryContracts/ViewModels/ReportLathesViewModel.cs new file mode 100644 index 0000000..d1cd34a --- /dev/null +++ b/FactoryView/FactoryContracts/ViewModels/ReportLathesViewModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PrecastConcretePlantContracts.ViewModels +{ + public class ReportLatheViewModel + { + public List Lathes { get; set; } = new(); + } +} diff --git a/FactoryView/FactoryContracts/ViewModels/StageViewModel.cs b/FactoryView/FactoryContracts/ViewModels/StageViewModel.cs new file mode 100644 index 0000000..9ba2c34 --- /dev/null +++ b/FactoryView/FactoryContracts/ViewModels/StageViewModel.cs @@ -0,0 +1,13 @@ +using FactoryDataModels.Models; + +namespace FactoryContracts.ViewModels +{ + public class StageViewModel : IStageModel + { + public int Id { get; set; } + + public int PlanId { get; set; } + + public int ReinforsedId { get; set; } + } +}