появилось изделие в заказах
This commit is contained in:
parent
a394b7a123
commit
b95ad316df
@ -2,6 +2,7 @@
|
|||||||
using PlumbingRepairClientApp.Models;
|
using PlumbingRepairClientApp.Models;
|
||||||
using PlumbingRepairContracts.BindingModels;
|
using PlumbingRepairContracts.BindingModels;
|
||||||
using PlumbingRepairContracts.ViewModels;
|
using PlumbingRepairContracts.ViewModels;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|
||||||
namespace PlumbingRepairClientApp.Controllers
|
namespace PlumbingRepairClientApp.Controllers
|
||||||
@ -116,10 +117,12 @@ namespace PlumbingRepairClientApp.Controllers
|
|||||||
{
|
{
|
||||||
throw new Exception("Количество и сумма должны быть больше 0");
|
throw new Exception("Количество и сумма должны быть больше 0");
|
||||||
}
|
}
|
||||||
|
var works = APIClient.GetRequest<List<WorkViewModel>>("api/main/getworklist");
|
||||||
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,
|
||||||
|
WorkName = (works.FirstOrDefault(x => x.Id == work)).WorkName,
|
||||||
Count = count,
|
Count = count,
|
||||||
Sum = Calc(count, work)
|
Sum = Calc(count, work)
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user