Compare commits
No commits in common. "27966925d0827a648aa3e33fe25520227c044994" and "51467aacd495ed318b16fd4aa1a23e40a4f62277" have entirely different histories.
27966925d0
...
51467aacd4
@ -6,10 +6,6 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\LawFimDataModels\LawFimDataModels.csproj" />
|
<ProjectReference Include="..\LawFimDataModels\LawFimDataModels.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
using LawFimDataModels.Enums;
|
using LawFimDataModels.Enums;
|
||||||
using LawFimDataModels.Models;
|
using LawFimDataModels.Models;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
namespace LawFirmContracts.ViewModels
|
namespace LawFirmContracts.ViewModels
|
||||||
{
|
{
|
||||||
@ -20,11 +19,5 @@ namespace LawFirmContracts.ViewModels
|
|||||||
public DateTime? DateImplement { get; set; }
|
public DateTime? DateImplement { get; set; }
|
||||||
public Dictionary<int, IClientModel> CaseClients { get; set; } = new();
|
public Dictionary<int, IClientModel> CaseClients { get; set; } = new();
|
||||||
public int ExecutorId { get; set; }
|
public int ExecutorId { get; set; }
|
||||||
public CaseViewModel() { }
|
}
|
||||||
[JsonConstructor]
|
|
||||||
public CaseViewModel(Dictionary<int, ClientViewModel> CaseClients)
|
|
||||||
{
|
|
||||||
this.CaseClients = CaseClients.ToDictionary(x => x.Key, x => x.Value as IClientModel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
using LawFimDataModels.Models;
|
using LawFimDataModels.Models;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using Newtonsoft.Json;
|
|
||||||
|
|
||||||
namespace LawFirmContracts.ViewModels
|
namespace LawFirmContracts.ViewModels
|
||||||
{
|
{
|
||||||
@ -12,11 +11,5 @@ namespace LawFirmContracts.ViewModels
|
|||||||
public int HearingId { get; set; }
|
public int HearingId { get; set; }
|
||||||
public Dictionary<int, IClientModel> VisitClients { get; set; } = new();
|
public Dictionary<int, IClientModel> VisitClients { get; set; } = new();
|
||||||
public int ExecutorId { get; set; }
|
public int ExecutorId { get; set; }
|
||||||
public VisitViewModel() { }
|
}
|
||||||
[JsonConstructor]
|
|
||||||
public VisitViewModel(Dictionary<int, ClientViewModel> VisitClients)
|
|
||||||
{
|
|
||||||
this.VisitClients = VisitClients.ToDictionary(x => x.Key, x => x.Value as IClientModel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -31,14 +31,14 @@ namespace LawFirmExecutorApp.Controllers
|
|||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public void AddClient(int caseId, int clientId)
|
public void AddClient(int conId, int clientId)
|
||||||
{
|
{
|
||||||
if (APIClient.Executor == null)
|
if (APIClient.Executor == null)
|
||||||
{
|
{
|
||||||
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
throw new Exception("Вы как суда попали? Суда вход только авторизованным");
|
||||||
}
|
}
|
||||||
|
|
||||||
APIClient.PostRequest("api/case/addclienttocase", Tuple.Create(new CaseSearchModel { Id = caseId }, clientId));
|
APIClient.PostRequest("api/case/addclienttocase", Tuple.Create(new CaseSearchModel { Id = conId }, clientId));
|
||||||
Response.Redirect("/Home/Cases");
|
Response.Redirect("/Home/Cases");
|
||||||
}
|
}
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-4">Дело</div>
|
<div class="col-4">Дело</div>
|
||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<select id="caseId" name="caseId" class="form-control" asp-items="@(new SelectList(@ViewBag.Cases,"Id", "Name"))"></select>
|
<select id="id" name="id" class="form-control" asp-items="@(new SelectList(@ViewBag.Cases,"Id", "Name"))"></select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
Loading…
Reference in New Issue
Block a user