PIbd-22. Stroev V.M. Lab Work 05 #5

Closed
StroevVladimir wants to merge 4 commits from Lab5 into Lab4
4 changed files with 5 additions and 4 deletions
Showing only changes of commit 427350b7cf - Show all commits

View File

@ -34,7 +34,7 @@ namespace PlumbingRepairClientApp
var data = new StringContent(json, Encoding.UTF8, "application/json"); var data = new StringContent(json, Encoding.UTF8, "application/json");
var response = _client.PostAsync(requestUrl, data); var response = _client.PostAsync(requestUrl, data);
var result = response.Result.Content.ReadAsStringAsync().Result; var result = response.Result.Content.ReadAsStringAsync().Result;
if (!response.Result.IsSuccessStatusCode) if (!response.Result.IsSuccessStatusCode)
{ {

View File

@ -116,7 +116,7 @@ namespace PlumbingRepairClientApp.Controllers
{ {
throw new Exception("Количество и сумма должны быть больше 0"); throw new Exception("Количество и сумма должны быть больше 0");
} }
APIClient.PostRequest("api/main/createorder", new OrderBindingModel APIClient.PostRequest("api/main/createorder", new OrderBindingModel
{ {
ClientId = APIClient.Client.Id, ClientId = APIClient.Client.Id,
WorkId = work, WorkId = work,

View File

@ -6,7 +6,7 @@
</div> </div>
<form method="post"> <form method="post">
<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="work" name="work" class="form-control" asp-items="@(new SelectList(@ViewBag.Works,"Id", "WorkName"))"></select> <select id="work" name="work" class="form-control" asp-items="@(new SelectList(@ViewBag.Works,"Id", "WorkName"))"></select>
</div> </div>

View File

@ -73,8 +73,9 @@ namespace PlumbingRepairDataBaseImplement.Models
{ {
Id = Id, Id = Id,
WorkId = WorkId, WorkId = WorkId,
WorkName = WorkName, WorkName = Work.WorkName,
ClientId = ClientId, ClientId = ClientId,
ClientFIO = Client.ClientFIO,
Count = Count, Count = Count,
Sum = Sum, Sum = Sum,
Status = Status, Status = Status,