diff --git a/CaseAccounting/CaseAccountingCustomerView/Controllers/Specializations.cs b/CaseAccounting/CaseAccountingCustomerView/Controllers/Specializations.cs index 6872185..be0e49e 100644 --- a/CaseAccounting/CaseAccountingCustomerView/Controllers/Specializations.cs +++ b/CaseAccounting/CaseAccountingCustomerView/Controllers/Specializations.cs @@ -79,5 +79,16 @@ namespace CaseAccountingCustomerView.Controllers SpecializationViewModel? specialization = APIUser.GetRequest($"api/specialization/get?id={id}"); return specialization; } - } + + public List GetAll() + { + if (APIUser.User == null) + { + return new(); + } + List? specializations = APIUser.GetRequest>($"api/specialization/getall"); + return specializations ?? new(); + } + + } } diff --git a/CaseAccounting/CaseAccountingDataBaseImplement/CaseAccountingDatabase.cs b/CaseAccounting/CaseAccountingDataBaseImplement/CaseAccountingDatabase.cs index 55243a9..75477ba 100644 --- a/CaseAccounting/CaseAccountingDataBaseImplement/CaseAccountingDatabase.cs +++ b/CaseAccounting/CaseAccountingDataBaseImplement/CaseAccountingDatabase.cs @@ -18,8 +18,8 @@ namespace CaseAccountingDataBaseImplement Host=localhost; Port=5432; Database=CaseAccountingDatabase; - Username=postgres; - Password=postgres"); + Username=courseuser; + Password=courseuser"); } base.OnConfiguring(optionsBuilder); } diff --git a/CaseAccounting/CaseAccountingDataBaseImplement/Models/Case.cs b/CaseAccounting/CaseAccountingDataBaseImplement/Models/Case.cs index e5de4e5..de9098b 100644 --- a/CaseAccounting/CaseAccountingDataBaseImplement/Models/Case.cs +++ b/CaseAccounting/CaseAccountingDataBaseImplement/Models/Case.cs @@ -139,6 +139,7 @@ namespace CaseAccountingDataBaseImplement.Models Annotation = Annotation, Date = Date, SpecializationId = SpecializationId, + Specialization = Specialization.Name, UserId = UserId }; } diff --git a/CaseAccounting/CaseAccountingProviderView/Controllers/CaseController.cs b/CaseAccounting/CaseAccountingProviderView/Controllers/CaseController.cs index 8ef7313..b8a7fbb 100644 --- a/CaseAccounting/CaseAccountingProviderView/Controllers/CaseController.cs +++ b/CaseAccounting/CaseAccountingProviderView/Controllers/CaseController.cs @@ -119,5 +119,15 @@ namespace CaseAccountingProviderView.Controllers CaseViewModel? caseModel = APIUser.GetRequest($"api/case/get?id={id}"); return caseModel; } + + public List GetAllSpecializations() + { + if (APIUser.User == null) + { + return new(); + } + List? specializationModel = APIUser.GetRequest>($"api/case/getallspecializations"); + return specializationModel ?? new(); + } } } diff --git a/CaseAccounting/CaseAccountingProviderView/Views/Case/Create.cshtml b/CaseAccounting/CaseAccountingProviderView/Views/Case/Create.cshtml index ba66465..629984a 100644 --- a/CaseAccounting/CaseAccountingProviderView/Views/Case/Create.cshtml +++ b/CaseAccounting/CaseAccountingProviderView/Views/Case/Create.cshtml @@ -22,7 +22,6 @@

Специализация: