Simple merge.
This commit is contained in:
parent
076b27ba7d
commit
48f0dcb771
@ -10,8 +10,8 @@ using System.Xml.Linq;
|
||||
|
||||
namespace BankYouBankruptClientApp.Controllers
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
private readonly ILogger<HomeController> _logger;
|
||||
|
||||
public HomeController(ILogger<HomeController> logger)
|
||||
@ -78,7 +78,7 @@ namespace BankYouBankruptClientApp.Controllers
|
||||
[HttpPost]
|
||||
public void Register(string login, string password, string name, string surname, string patronymic, string telephone)
|
||||
{
|
||||
if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password) || string.IsNullOrEmpty(name)
|
||||
if (string.IsNullOrEmpty(login) || string.IsNullOrEmpty(password) || string.IsNullOrEmpty(name)
|
||||
|| string.IsNullOrEmpty(surname) || string.IsNullOrEmpty(patronymic) || string.IsNullOrEmpty(telephone))
|
||||
{
|
||||
throw new Exception("Введите логин, пароль, ФИО и телефон");
|
||||
@ -213,7 +213,7 @@ namespace BankYouBankruptClientApp.Controllers
|
||||
ViewBag.Cards = APIClient.GetRequest<List<CardViewModel>>($"api/Card/GetAllCards").Select(x => new ClientSelectViewModel
|
||||
{
|
||||
Id = x.Id,
|
||||
FullName = x.ClientSurname + " " +x.Number.ToString()
|
||||
FullName = x.ClientSurname + " " + x.Number.ToString()
|
||||
}).ToList();
|
||||
return View();
|
||||
}
|
||||
@ -239,11 +239,22 @@ namespace BankYouBankruptClientApp.Controllers
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Получение отчёта
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult CreateReport()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public void CreateReport(DateTime DateFrom, DateTime DateTo)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult ReportWithCards()
|
||||
@ -255,12 +266,12 @@ namespace BankYouBankruptClientApp.Controllers
|
||||
|
||||
return View(new ReportClientCardsViewModel()
|
||||
{
|
||||
Cards = APIClient.GetRequest<List<CardViewModel>>($"api/Card/GetUsersCardsList?id={APIClient.Client.Id}").Select(x => new CheckboxViewModel() {
|
||||
Cards = APIClient.GetRequest<List<CardViewModel>>($"api/Card/GetUsersCardsList?id={APIClient.Client.Id}").Select(x => new CheckboxViewModel() {
|
||||
Id = x.Id,
|
||||
LabelName = x.Number,
|
||||
IsChecked = false
|
||||
}).ToList()
|
||||
}) ;
|
||||
});
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
@ -273,12 +284,12 @@ namespace BankYouBankruptClientApp.Controllers
|
||||
|
||||
List<int> cardList = cards.Where(x => x.IsChecked).Select(x => x.Id).ToList();
|
||||
List<ReportViewModel> creditings = APIClient.GetRequest<List<CreditingViewModel>>($"api/Client/getUsersCreditings?userId={APIClient.Client.Id}")
|
||||
.Where(x => cardList.Contains(x.CardId)).Select(x => new ReportViewModel() {
|
||||
Id=x.Id,
|
||||
CardId=x.CardId,
|
||||
DateOpen=x.DateOpen,
|
||||
DateClose=x.DateClose,
|
||||
CardNumber=x.CardNumber,
|
||||
.Where(x => cardList.Contains(x.CardId)).Select(x => new ReportViewModel() {
|
||||
Id = x.Id,
|
||||
CardId = x.CardId,
|
||||
DateOpen = x.DateOpen,
|
||||
DateClose = x.DateClose,
|
||||
CardNumber = x.CardNumber,
|
||||
Status = x.Status,
|
||||
Sum = x.Sum,
|
||||
TypeOperation = TypeOperationEnum.Пополнение
|
||||
@ -302,23 +313,7 @@ namespace BankYouBankruptClientApp.Controllers
|
||||
Cards = cards,
|
||||
Operations = result,
|
||||
|
||||
}) ;
|
||||
});
|
||||
}
|
||||
|
||||
#region Получение отчёта
|
||||
|
||||
[HttpGet]
|
||||
public IActionResult CreateReport()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public void CreateReport(DateTime DateFrom, DateTime DateTo)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user