Чиним многие-ко-многим
This commit is contained in:
parent
79071f22b2
commit
1843a431ec
@ -1,7 +1,9 @@
|
||||
using CaseAccountingDataModels.Models;
|
||||
using CaseAccountingContracts.ViewModels;
|
||||
using CaseAccountingDataModels.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@ -24,5 +26,9 @@ namespace CaseAccountingContracts.BindingModels
|
||||
public int Id { get; set; }
|
||||
|
||||
public Dictionary<int, IContractModel> Contracts { get; set; } = new();
|
||||
|
||||
public List<ContractViewModel> ContractViewModels { get; set; } = new();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -71,16 +71,6 @@ namespace CaseAccountingCustomerView.Controllers
|
||||
return lawyers ?? new();
|
||||
}
|
||||
|
||||
/*public List<EducationGroupViewModel> GetAllCases()
|
||||
{
|
||||
if (APIUser.User == null)
|
||||
{
|
||||
return new();
|
||||
}
|
||||
List<EducationGroupViewModel>? group = APIUser.GetRequest<List<EducationGroupViewModel>>("api/lawyer/GetAllCases");
|
||||
return group ?? new();
|
||||
}*/
|
||||
|
||||
public LawyerViewModel? Get(int id)
|
||||
{
|
||||
if (APIUser.User == null)
|
||||
|
@ -16,7 +16,7 @@ window.addEventListener('load', async () => {
|
||||
console.log(cases)
|
||||
});
|
||||
await $.ajax({
|
||||
url: `/document/get?id=${currentLawyerId}`,
|
||||
url: `/lawyer/get?id=${currentLawyerId}`,
|
||||
type: "GET",
|
||||
contentType: "json"
|
||||
}).done((result) => {
|
||||
@ -33,7 +33,7 @@ createBtn.addEventListener('click', () => {
|
||||
"Surname": currentLawyer.Surname,
|
||||
"Patronymic": currentLawyer.Patronymic,
|
||||
"SpecializationId": currentLawyer.SpecializationId,
|
||||
"LawyerContracts": currentLawyer.lawyerContracts,
|
||||
"ContractViewModels": currentLawyer.lawyerContracts,
|
||||
"LawyerCases": dataArray,
|
||||
}
|
||||
$.ajax({
|
||||
|
@ -25,7 +25,7 @@ createBtn.addEventListener('click', () => {
|
||||
"Surname": surnameInput.value,
|
||||
"Patronymic": patronymicInput.value,
|
||||
"Experience": parseInt(experienceInput.value),
|
||||
"LawyerContracts": dataArray,
|
||||
"ContractViewModels": dataArray,
|
||||
}
|
||||
console.log(lawyer);
|
||||
$.ajax({
|
||||
|
@ -31,7 +31,7 @@ createBtn.addEventListener('click', () => {
|
||||
"Service": serviceInput.value,
|
||||
"Coast": coastInput.value,
|
||||
"Date": currentLawyer.date,
|
||||
"LawyerContracts": dataArray,
|
||||
"ContractViewModels": dataArray,
|
||||
"LawyerCases": currentLawyer.lawyerCases,
|
||||
}
|
||||
$.ajax({
|
||||
|
Loading…
Reference in New Issue
Block a user