ВАЖНЫЙ КОММИТ. ЗДЕСЬ УДАЛЕНО/ЗАККОМЕНТИРОВАННО ТО, ЧТО НЕОБХОДИМО В ПОСЛЕДСТВИИ ДЛЯ РАБОТЫ.
This commit is contained in:
parent
c29ac370ca
commit
65e07519a4
@ -25,14 +25,16 @@ namespace BankYouBankruptCashierApp
|
||||
var response = _client.GetAsync(requestUrl);
|
||||
var result = response.Result.Content.ReadAsStringAsync().Result;
|
||||
|
||||
if (response.Result.IsSuccessStatusCode)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<T>(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception(result);
|
||||
}
|
||||
//if (response.Result.IsSuccessStatusCode)
|
||||
//{
|
||||
// return JsonConvert.DeserializeObject<T>(result);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// throw new Exception(result);
|
||||
//}
|
||||
|
||||
return JsonConvert.DeserializeObject<T>("");
|
||||
}
|
||||
|
||||
//Post-запрос
|
||||
|
@ -21,10 +21,12 @@ namespace BankYouBankruptCashierApp.Controllers
|
||||
{
|
||||
if (APICashier.Cashier == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
//return Redirect("~/Home/Enter");
|
||||
}
|
||||
|
||||
return View(APICashier.GetRequest<List<AccountViewModel>>($"api/main/getaccounts?cashierId={APICashier.Cashier.Id}"));
|
||||
//return View(APICashier.GetRequest<List<AccountViewModel>>($"api/main/getaccounts?cashierId={APICashier.Cashier.Id}"));
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
//изменемение ланных Get-ом
|
||||
@ -33,7 +35,7 @@ namespace BankYouBankruptCashierApp.Controllers
|
||||
{
|
||||
if (APICashier.Cashier == null)
|
||||
{
|
||||
return Redirect("~/Home/Enter");
|
||||
//return Redirect("~/Home/Enter");
|
||||
}
|
||||
|
||||
return View(APICashier.Cashier);
|
||||
@ -147,7 +149,7 @@ namespace BankYouBankruptCashierApp.Controllers
|
||||
[HttpGet]
|
||||
public IActionResult Create()
|
||||
{
|
||||
ViewBag.Accountes = APICashier.GetRequest<List<AccountViewModel>>("api/main/getaccountlist");
|
||||
//ViewBag.Accountes = APICashier.GetRequest<List<AccountViewModel>>("api/main/getaccountlist");
|
||||
|
||||
return View();
|
||||
}
|
||||
@ -158,7 +160,7 @@ namespace BankYouBankruptCashierApp.Controllers
|
||||
{
|
||||
if (APICashier.Cashier == null)
|
||||
{
|
||||
throw new Exception("Вы как сюда попали? Суда вход только авторизованным");
|
||||
//throw new Exception("Вы как сюда попали? Суда вход только авторизованным");
|
||||
}
|
||||
|
||||
if (count <= 0)
|
||||
|
@ -9,7 +9,7 @@
|
||||
<div class="row">
|
||||
<div class="col-4">Клиент:</div>
|
||||
<div class="col-8">
|
||||
<select id="client" name="client" class="form-control" asp-items="@(new SelectList(@ViewBag.Clients,"Id", "Name", "Surname", "Patronymic"))"></select>
|
||||
<select id="client" name="client" class="form-control"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
@ -12,11 +12,11 @@
|
||||
|
||||
<div class="text-center">
|
||||
@{
|
||||
if (Model == null)
|
||||
{
|
||||
<h3 class="display-4">Сначала авторизируйтесь</h3>
|
||||
return;
|
||||
}
|
||||
//if (Model == null)
|
||||
//{
|
||||
// <h3 class="display-4">Сначала авторизируйтесь</h3>
|
||||
// return;
|
||||
//}
|
||||
|
||||
<p>
|
||||
<a asp-action="Create">Открыть счёт</a>
|
||||
@ -42,26 +42,6 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Id)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Name)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Patronymic)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Balance)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.DateOpen)
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
|
@ -12,23 +12,23 @@
|
||||
<form method="post">
|
||||
<div class="row">
|
||||
<div class="col-4">Логин:</div>
|
||||
<div class="col-8"><input type="text" name="login" value="@Model.Email" /></div>
|
||||
<div class="col-8"><input type="text" name="login" value="" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Пароль:</div>
|
||||
<div class="col-8"><input type="password" name="password" value="@Model.Password" /></div>
|
||||
<div class="col-8"><input type="password" name="password" value="" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Имя:</div>
|
||||
<div class="col-8"><input type="text" name="name" value="@Model.Name" /></div>
|
||||
<div class="col-8"><input type="text" name="name" value="" /></div>
|
||||
<div class="col-4">Фамилия:</div>
|
||||
<div class="col-8"><input type="text" name="surname" value="@Model.Surname" /></div>
|
||||
<div class="col-8"><input type="text" name="surname" value="" /></div>
|
||||
<div class="col-4">Отчество:</div>
|
||||
<div class="col-8"><input type="text" name="patronymic" value="@Model.Patronymic" /></div>
|
||||
<div class="col-8"><input type="text" name="patronymic" value="" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-4">Телефон:</div>
|
||||
<div class="col-8"><input type="text" name="telephone" value="@Model.Telephone" /></div>
|
||||
<div class="col-8"><input type="text" name="telephone" value="" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
|
Loading…
Reference in New Issue
Block a user