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