Compare commits
2 Commits
a65793b2c2
...
1c229494df
Author | SHA1 | Date | |
---|---|---|---|
1c229494df | |||
73a6b055b9 |
@ -57,7 +57,7 @@ namespace ElectronicsShopBusinessLogic.BusinessLogic
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
_logger.LogInformation($"ReadList.Count:{list.Count}");
|
_logger.LogInformation($"ReadList.Count:{list.Count}");
|
||||||
return null;
|
return list;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ namespace ElectronicsShopBusinessLogic.BusinessLogic
|
|||||||
var record = new ReportPaymeantsViewModel
|
var record = new ReportPaymeantsViewModel
|
||||||
{
|
{
|
||||||
PaymeantID=paymeant.ID,
|
PaymeantID=paymeant.ID,
|
||||||
//ProductID=paymeant.ProductID,
|
ClientID=paymeant.ClientID,
|
||||||
OrderID=paymeant.OrderID,
|
OrderID=paymeant.OrderID,
|
||||||
PayOption=paymeant.PayOption,
|
PayOption=paymeant.PayOption,
|
||||||
SumPayment=paymeant.SumPayment,
|
SumPayment=paymeant.SumPayment,
|
||||||
|
@ -11,7 +11,7 @@ namespace ElectronicsShopContracts.ViewModels
|
|||||||
{
|
{
|
||||||
public int PaymeantID { get; set; }
|
public int PaymeantID { get; set; }
|
||||||
|
|
||||||
public int ProductID { get; set; }
|
public int ClientID { get; set; }
|
||||||
|
|
||||||
public int OrderID { get; set; }
|
public int OrderID { get; set; }
|
||||||
public double SumPayment { get; set; }
|
public double SumPayment { get; set; }
|
||||||
|
@ -12,8 +12,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|||||||
namespace ElectronicsShopDataBaseImplement.Migrations
|
namespace ElectronicsShopDataBaseImplement.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(Database))]
|
[DbContext(typeof(Database))]
|
||||||
[Migration("20240601012156_InitMigration")]
|
[Migration("20240601013228_Init")]
|
||||||
partial class InitMigration
|
partial class Init
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore.Migrations;
|
|||||||
namespace ElectronicsShopDataBaseImplement.Migrations
|
namespace ElectronicsShopDataBaseImplement.Migrations
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public partial class InitMigration : Migration
|
public partial class Init : Migration
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
@ -66,11 +66,10 @@ namespace ElectronicsShopRestAPI.Controllers {
|
|||||||
_logger.LogError(ex, "Ошибка создания оплаты");
|
_logger.LogError(ex, "Ошибка создания оплаты");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
[HttpGet]
|
||||||
[HttpPost]
|
|
||||||
public List<PaymeantViewModel>? GetPaymeants(int _clientID) {
|
public List<PaymeantViewModel>? GetPaymeants(int _clientID) {
|
||||||
try {
|
try {
|
||||||
return _payLogic.ReadList(new PaymeantSearchModel { ClientID = _clientID });
|
return _payLogic?.ReadList(new PaymeantSearchModel { ClientID = _clientID });
|
||||||
}
|
}
|
||||||
catch (Exception ex) {
|
catch (Exception ex) {
|
||||||
_logger.LogError(ex, $"Ошибка получения списка оплат клиента id = {_clientID}");
|
_logger.LogError(ex, $"Ошибка получения списка оплат клиента id = {_clientID}");
|
||||||
|
@ -24,12 +24,12 @@ namespace ElectronicsShopUserApp.Controllers {
|
|||||||
//_order = orderLogic;
|
//_order = orderLogic;
|
||||||
_productList = new Dictionary<int, (IProductModel, int)>();
|
_productList = new Dictionary<int, (IProductModel, int)>();
|
||||||
}
|
}
|
||||||
|
[HttpGet]
|
||||||
public IActionResult Index() {
|
public IActionResult Index() {
|
||||||
if (APIClient.Client == null) {
|
if (APIClient.Client == null) {
|
||||||
return Redirect("~/Home/Enter");
|
return Redirect("~/Home/Enter");
|
||||||
}
|
}
|
||||||
return View(APIClient.GetRequset<List<PaymeantViewModel>>($"api/client/getpaymeants?_clientid={APIClient.Client.ID}"));
|
return View(APIClient.GetRequset<List<PaymeantViewModel>>($"api/Client/GetPaymeants?_clientid={APIClient.Client.ID}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet]
|
[HttpGet]
|
||||||
|
Loading…
Reference in New Issue
Block a user