diff --git a/TransportCompany/TransportCompany/App.config b/TransportCompany/TransportCompany/App.config index 9277687..65f2f7c 100644 --- a/TransportCompany/TransportCompany/App.config +++ b/TransportCompany/TransportCompany/App.config @@ -2,5 +2,6 @@ + \ No newline at end of file diff --git a/TransportCompany/TransportCompanyContracts/BindingModels/CargoBindingModel.cs b/TransportCompany/TransportCompanyContracts/BindingModels/CargoBindingModel.cs index 5de64dd..d660d35 100644 --- a/TransportCompany/TransportCompanyContracts/BindingModels/CargoBindingModel.cs +++ b/TransportCompany/TransportCompanyContracts/BindingModels/CargoBindingModel.cs @@ -11,6 +11,8 @@ namespace TransportCompanyContracts.BindingModels { public int Id { get; set; } + public string? MongoID { get; set; } + public string TypeCargo { get; set; } = string.Empty; } } diff --git a/TransportCompany/TransportCompanyContracts/BindingModels/ClientBindingModel.cs b/TransportCompany/TransportCompanyContracts/BindingModels/ClientBindingModel.cs index d26a6c6..c1f0c25 100644 --- a/TransportCompany/TransportCompanyContracts/BindingModels/ClientBindingModel.cs +++ b/TransportCompany/TransportCompanyContracts/BindingModels/ClientBindingModel.cs @@ -11,6 +11,8 @@ namespace TransportCompanyContracts.BindingModels { public int Id { get; set; } + public string? MongoId { get; set; } + public string Name { get; set; } = string.Empty; public string Surname { get; set; } = string.Empty; diff --git a/TransportCompany/TransportCompanyContracts/BindingModels/TransportBindingModel.cs b/TransportCompany/TransportCompanyContracts/BindingModels/TransportBindingModel.cs index 7d189f4..3acb6f0 100644 --- a/TransportCompany/TransportCompanyContracts/BindingModels/TransportBindingModel.cs +++ b/TransportCompany/TransportCompanyContracts/BindingModels/TransportBindingModel.cs @@ -11,6 +11,8 @@ namespace TransportCompanyContracts.BindingModels { public int Id { get; set; } + public string? MongoId { get; set; } + public string Tranport { get; set; } = string.Empty; } } diff --git a/TransportCompany/TransportCompanyContracts/BindingModels/TransportationBindingModel.cs b/TransportCompany/TransportCompanyContracts/BindingModels/TransportationBindingModel.cs index 4dd0553..5fc168d 100644 --- a/TransportCompany/TransportCompanyContracts/BindingModels/TransportationBindingModel.cs +++ b/TransportCompany/TransportCompanyContracts/BindingModels/TransportationBindingModel.cs @@ -11,6 +11,8 @@ namespace TransportCompanyContracts.BindingModels { public int Id {get; set;} + public string? MongoId { get; set; } + public string TransportationType { get; set; } = string.Empty; } } diff --git a/TransportCompany/TransportCompanyContracts/BindingModels/TruckingBindingModel.cs b/TransportCompany/TransportCompanyContracts/BindingModels/TruckingBindingModel.cs index e832e0c..343c169 100644 --- a/TransportCompany/TransportCompanyContracts/BindingModels/TruckingBindingModel.cs +++ b/TransportCompany/TransportCompanyContracts/BindingModels/TruckingBindingModel.cs @@ -11,6 +11,8 @@ namespace TransportCompanyContracts.BindingModels { public int Id { get; set; } + public string? MongoId { get; set; } + public int ClientId { get; set; } public int CargoId { get; set; } diff --git a/TransportCompany/TransportCompanyContracts/SearchModels/CargoSearchModel.cs b/TransportCompany/TransportCompanyContracts/SearchModels/CargoSearchModel.cs index eb616d6..090c4d0 100644 --- a/TransportCompany/TransportCompanyContracts/SearchModels/CargoSearchModel.cs +++ b/TransportCompany/TransportCompanyContracts/SearchModels/CargoSearchModel.cs @@ -10,6 +10,8 @@ namespace TransportCompanyContracts.SearchModels { public int? Id { get; set; } + public string? MongoId { get; set; } + public string? TypeCargo { get; set; } } } diff --git a/TransportCompany/TransportCompanyContracts/SearchModels/ClientSearchModel.cs b/TransportCompany/TransportCompanyContracts/SearchModels/ClientSearchModel.cs index a996803..2c210c4 100644 --- a/TransportCompany/TransportCompanyContracts/SearchModels/ClientSearchModel.cs +++ b/TransportCompany/TransportCompanyContracts/SearchModels/ClientSearchModel.cs @@ -10,6 +10,8 @@ namespace TransportCompanyContracts.SearchModels { public int? Id { get; set; } + public string? MongoId { get; set; } + public string? Name { get; set; } public string? Surname { get; set; } diff --git a/TransportCompany/TransportCompanyContracts/SearchModels/TransportSearchModel.cs b/TransportCompany/TransportCompanyContracts/SearchModels/TransportSearchModel.cs index ad1e720..2a83210 100644 --- a/TransportCompany/TransportCompanyContracts/SearchModels/TransportSearchModel.cs +++ b/TransportCompany/TransportCompanyContracts/SearchModels/TransportSearchModel.cs @@ -10,6 +10,8 @@ namespace TransportCompanyContracts.SearchModels { public int? Id { get; set; } + public string? MongoId { get; set; } + public string? Tranport { get; set; } } } diff --git a/TransportCompany/TransportCompanyContracts/SearchModels/TransportationSearchModel.cs b/TransportCompany/TransportCompanyContracts/SearchModels/TransportationSearchModel.cs index 9acbec7..3fe87f1 100644 --- a/TransportCompany/TransportCompanyContracts/SearchModels/TransportationSearchModel.cs +++ b/TransportCompany/TransportCompanyContracts/SearchModels/TransportationSearchModel.cs @@ -10,6 +10,8 @@ namespace TransportCompanyContracts.SearchModels { public int? Id { get; set; } + public string? MongoId { get; set; } + public string? TransportationType { get; set; } } } diff --git a/TransportCompany/TransportCompanyContracts/SearchModels/TruckingSearchModel.cs b/TransportCompany/TransportCompanyContracts/SearchModels/TruckingSearchModel.cs index 02cb706..d96e405 100644 --- a/TransportCompany/TransportCompanyContracts/SearchModels/TruckingSearchModel.cs +++ b/TransportCompany/TransportCompanyContracts/SearchModels/TruckingSearchModel.cs @@ -10,6 +10,8 @@ namespace TransportCompanyContracts.SearchModels { public int? Id { get; set; } + public string? MongoId { get; set; } + public int? ClientId { get; set; } public DateTime? DateStart { get; set; } diff --git a/TransportCompany/TransportCompanyContracts/StoragesContracts/ICargoStorage.cs b/TransportCompany/TransportCompanyContracts/StoragesContracts/ICargoStorage.cs index a509bdd..5ab0a45 100644 --- a/TransportCompany/TransportCompanyContracts/StoragesContracts/ICargoStorage.cs +++ b/TransportCompany/TransportCompanyContracts/StoragesContracts/ICargoStorage.cs @@ -22,5 +22,7 @@ namespace TransportCompanyContracts.StoragesContracts CargoViewModel? Update(CargoBindingModel model); CargoViewModel? Delete(CargoBindingModel model); + + bool InsertFromPostgres(List model); } } diff --git a/TransportCompany/TransportCompanyContracts/StoragesContracts/IClientStorage.cs b/TransportCompany/TransportCompanyContracts/StoragesContracts/IClientStorage.cs index d7b6f36..28a54e6 100644 --- a/TransportCompany/TransportCompanyContracts/StoragesContracts/IClientStorage.cs +++ b/TransportCompany/TransportCompanyContracts/StoragesContracts/IClientStorage.cs @@ -26,5 +26,7 @@ namespace TransportCompanyContracts.StoragesContracts ClientViewModel? Update(ClientBindingModel model); ClientViewModel? Delete(ClientBindingModel model); + + bool InsertFromPostgres(List model); } } diff --git a/TransportCompany/TransportCompanyContracts/StoragesContracts/ITransportStorage.cs b/TransportCompany/TransportCompanyContracts/StoragesContracts/ITransportStorage.cs index a462551..0df0388 100644 --- a/TransportCompany/TransportCompanyContracts/StoragesContracts/ITransportStorage.cs +++ b/TransportCompany/TransportCompanyContracts/StoragesContracts/ITransportStorage.cs @@ -22,5 +22,7 @@ namespace TransportCompanyContracts.StoragesContracts TransportViewModel? Update(TransportBindingModel model); TransportViewModel? Delete(TransportBindingModel model); + + bool InsertFromPostgres(List model); } } diff --git a/TransportCompany/TransportCompanyContracts/StoragesContracts/ITransportationStorage.cs b/TransportCompany/TransportCompanyContracts/StoragesContracts/ITransportationStorage.cs index a556aa4..ae5dd6b 100644 --- a/TransportCompany/TransportCompanyContracts/StoragesContracts/ITransportationStorage.cs +++ b/TransportCompany/TransportCompanyContracts/StoragesContracts/ITransportationStorage.cs @@ -22,5 +22,7 @@ namespace TransportCompanyContracts.StoragesContracts TransportationViewModel? Update(TransportationBindingModel model); TransportationViewModel? Delete(TransportationBindingModel model); + + bool InsertFromPostgres(List model); } } diff --git a/TransportCompany/TransportCompanyContracts/StoragesContracts/ITruckingStorage.cs b/TransportCompany/TransportCompanyContracts/StoragesContracts/ITruckingStorage.cs index 97b0ef0..13dcf09 100644 --- a/TransportCompany/TransportCompanyContracts/StoragesContracts/ITruckingStorage.cs +++ b/TransportCompany/TransportCompanyContracts/StoragesContracts/ITruckingStorage.cs @@ -28,5 +28,7 @@ namespace TransportCompanyContracts.StoragesContracts TruckingViewModel? Update(TruckingBindingModel model); TruckingViewModel? Delete(TruckingBindingModel model); + + bool InsertFromPostgres(List model); } } diff --git a/TransportCompany/TransportCompanyContracts/ViewModels/CargoViewModel.cs b/TransportCompany/TransportCompanyContracts/ViewModels/CargoViewModel.cs index 571df64..7d8ee99 100644 --- a/TransportCompany/TransportCompanyContracts/ViewModels/CargoViewModel.cs +++ b/TransportCompany/TransportCompanyContracts/ViewModels/CargoViewModel.cs @@ -12,6 +12,8 @@ namespace TransportCompanyContracts.ViewModels { public int Id { get; set; } + public string? MongoId { get; set; } + [DisplayName("Тип груза")] public string TypeCargo {get; set; } = string.Empty; } diff --git a/TransportCompany/TransportCompanyContracts/ViewModels/ClientViewModel.cs b/TransportCompany/TransportCompanyContracts/ViewModels/ClientViewModel.cs index 9ed4f06..2445da3 100644 --- a/TransportCompany/TransportCompanyContracts/ViewModels/ClientViewModel.cs +++ b/TransportCompany/TransportCompanyContracts/ViewModels/ClientViewModel.cs @@ -12,6 +12,8 @@ namespace TransportCompanyContracts.ViewModels { public int Id { get; set; } + public string? MongoId { get; set; } + [DisplayName("Имя")] public string Name { get; set; } = string.Empty; diff --git a/TransportCompany/TransportCompanyContracts/ViewModels/TransportViewModel.cs b/TransportCompany/TransportCompanyContracts/ViewModels/TransportViewModel.cs index 9374e02..ed86512 100644 --- a/TransportCompany/TransportCompanyContracts/ViewModels/TransportViewModel.cs +++ b/TransportCompany/TransportCompanyContracts/ViewModels/TransportViewModel.cs @@ -12,6 +12,8 @@ namespace TransportCompanyContracts.ViewModels { public int Id { get; set; } + public string? MongoId { get; set; } + [DisplayName("Вид транспорта")] public string Tranport { get; set; } = string.Empty; } diff --git a/TransportCompany/TransportCompanyContracts/ViewModels/TransportationViewModel.cs b/TransportCompany/TransportCompanyContracts/ViewModels/TransportationViewModel.cs index caf5a92..d81c141 100644 --- a/TransportCompany/TransportCompanyContracts/ViewModels/TransportationViewModel.cs +++ b/TransportCompany/TransportCompanyContracts/ViewModels/TransportationViewModel.cs @@ -12,6 +12,8 @@ namespace TransportCompanyContracts.ViewModels { public int Id { get; set; } + public string? MongoId { get; set; } + [DisplayName("Тип транспортировки")] public string TransportationType { get; set; } = string.Empty; } diff --git a/TransportCompany/TransportCompanyContracts/ViewModels/TruckingViewModel.cs b/TransportCompany/TransportCompanyContracts/ViewModels/TruckingViewModel.cs index 9fe4e14..f278951 100644 --- a/TransportCompany/TransportCompanyContracts/ViewModels/TruckingViewModel.cs +++ b/TransportCompany/TransportCompanyContracts/ViewModels/TruckingViewModel.cs @@ -12,6 +12,8 @@ namespace TransportCompanyContracts.ViewModels { public int Id { get; set; } + public string? MongoId { get; set; } + public int ClientId { get; set; } [DisplayName("Имя")] diff --git a/TransportCompany/TransportCompanyDatabaseImplements/Implements/CargoStorage.cs b/TransportCompany/TransportCompanyDatabaseImplements/Implements/CargoStorage.cs index d46ec27..181fe96 100644 --- a/TransportCompany/TransportCompanyDatabaseImplements/Implements/CargoStorage.cs +++ b/TransportCompany/TransportCompanyDatabaseImplements/Implements/CargoStorage.cs @@ -114,5 +114,10 @@ namespace TransportCompanyDatabaseImplements.Implements throw; } } + + public bool InsertFromPostgres(List model) + { + throw new NotImplementedException(); + } } } diff --git a/TransportCompany/TransportCompanyDatabaseImplements/Implements/ClientStorage.cs b/TransportCompany/TransportCompanyDatabaseImplements/Implements/ClientStorage.cs index c445c20..47fdd95 100644 --- a/TransportCompany/TransportCompanyDatabaseImplements/Implements/ClientStorage.cs +++ b/TransportCompany/TransportCompanyDatabaseImplements/Implements/ClientStorage.cs @@ -195,5 +195,10 @@ namespace TransportCompanyDatabaseImplements.Implements return null; } - } + + public bool InsertFromPostgres(List model) + { + throw new NotImplementedException(); + } + } } diff --git a/TransportCompany/TransportCompanyDatabaseImplements/Implements/TransportStorage.cs b/TransportCompany/TransportCompanyDatabaseImplements/Implements/TransportStorage.cs index 2f0ae4e..8301c74 100644 --- a/TransportCompany/TransportCompanyDatabaseImplements/Implements/TransportStorage.cs +++ b/TransportCompany/TransportCompanyDatabaseImplements/Implements/TransportStorage.cs @@ -114,5 +114,10 @@ namespace TransportCompanyDatabaseImplements.Implements throw; } } + + public bool InsertFromPostgres(List model) + { + throw new NotImplementedException(); + } } } diff --git a/TransportCompany/TransportCompanyDatabaseImplements/Implements/TransportationStorage.cs b/TransportCompany/TransportCompanyDatabaseImplements/Implements/TransportationStorage.cs index 7bd15c0..e9a416e 100644 --- a/TransportCompany/TransportCompanyDatabaseImplements/Implements/TransportationStorage.cs +++ b/TransportCompany/TransportCompanyDatabaseImplements/Implements/TransportationStorage.cs @@ -114,5 +114,10 @@ namespace TransportCompanyDatabaseImplements.Implements throw; } } + + public bool InsertFromPostgres(List model) + { + throw new NotImplementedException(); + } } } diff --git a/TransportCompany/TransportCompanyDatabaseImplements/Implements/TruckingStorage.cs b/TransportCompany/TransportCompanyDatabaseImplements/Implements/TruckingStorage.cs index bc282b6..e469026 100644 --- a/TransportCompany/TransportCompanyDatabaseImplements/Implements/TruckingStorage.cs +++ b/TransportCompany/TransportCompanyDatabaseImplements/Implements/TruckingStorage.cs @@ -239,5 +239,10 @@ namespace TransportCompanyDatabaseImplements.Implements return stopwatch.ElapsedMilliseconds.ToString(); } + + public bool InsertFromPostgres(List model) + { + throw new NotImplementedException(); + } } }