diff --git a/PlumbingRepair/PlumbingRepair/FormStore.cs b/PlumbingRepair/PlumbingRepair/FormStore.cs index 5a83df6..fdba163 100644 --- a/PlumbingRepair/PlumbingRepair/FormStore.cs +++ b/PlumbingRepair/PlumbingRepair/FormStore.cs @@ -45,7 +45,7 @@ namespace PlumbingRepair Id = _id ?? 0, StoreName = NameTextBox.Text, StoreAdress = AdressTextBox.Text, - OpeningDate = OpeningDatePicker.Value.Date, + OpeningDate = DateTime.SpecifyKind(OpeningDatePicker.Value.Date, DateTimeKind.Utc), WorkMaxCount = (int)VolumeNumericUpDown.Value, StoreWorks = _listStores }; diff --git a/PlumbingRepair/PlumbingRepair/Program.cs b/PlumbingRepair/PlumbingRepair/Program.cs index c623f99..288ed75 100644 --- a/PlumbingRepair/PlumbingRepair/Program.cs +++ b/PlumbingRepair/PlumbingRepair/Program.cs @@ -24,7 +24,7 @@ namespace PlumbingRepair ApplicationConfiguration.Initialize(); var services = new ServiceCollection(); ConfigureServices(services); - _serviceProvider = services.BuildServiceProvider(); + _serviceProvider = services.BuildServiceProvider(); Application.Run(_serviceProvider.GetRequiredService()); } private static void ConfigureServices(ServiceCollection services) diff --git a/PlumbingRepair/PlumbingRepairContracts/BindingModels/StoreBindingModel.cs b/PlumbingRepair/PlumbingRepairContracts/BindingModels/StoreBindingModel.cs index d2a7dce..5c6c3c4 100644 --- a/PlumbingRepair/PlumbingRepairContracts/BindingModels/StoreBindingModel.cs +++ b/PlumbingRepair/PlumbingRepairContracts/BindingModels/StoreBindingModel.cs @@ -7,7 +7,7 @@ namespace PlumbingRepairContracts.BindingModels public string StoreName { get; set; } = string.Empty; public string StoreAdress { get; set; } = string.Empty; - public DateTime OpeningDate { get; set; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc); + public DateTime OpeningDate { get; set; } public Dictionary StoreWorks { get; set; } = new(); diff --git a/PlumbingRepair/PlumbingRepairContracts/ViewModels/StoreViewModel.cs b/PlumbingRepair/PlumbingRepairContracts/ViewModels/StoreViewModel.cs index cccca84..25fa935 100644 --- a/PlumbingRepair/PlumbingRepairContracts/ViewModels/StoreViewModel.cs +++ b/PlumbingRepair/PlumbingRepairContracts/ViewModels/StoreViewModel.cs @@ -13,7 +13,7 @@ namespace PlumbingRepairContracts.ViewModels [DisplayName("Адрес магазина")] public string StoreAdress { get; set; } = string.Empty; [DisplayName("Дата открытия")] - public DateTime OpeningDate { get; set; } = DateTime.Now; + public DateTime OpeningDate { get; set; } [DisplayName("Вместимость магазина")] public int WorkMaxCount { get; set; } }