This commit is contained in:
danila 2024-12-23 05:07:04 +04:00
parent d381367895
commit ac8ab62ae9
2 changed files with 4 additions and 4 deletions

View File

@ -8,6 +8,6 @@ namespace ShoeStore.Repositories.Implementations;
internal class ConnectionString : IConnectionString internal class ConnectionString : IConnectionString
{ {
string IConnectionString.ConnectionString => "Server=localhost;Port=5432;Database=BDOTP;User Id=postgres;Password=postgres;"; string IConnectionString.ConnectionString => "Server=localhost;Port=5432;Database=Shoe_store;User Id=postgres;Password=326452ND;";
} }

View File

@ -35,8 +35,8 @@ internal class ShoesReplenishmentRepository : IShoesReplenishmentRepository
connection.Open(); connection.Open();
using var transaction = connection.BeginTransaction(); using var transaction = connection.BeginTransaction();
var queryInsert = @" var queryInsert = @"
INSERT INTO ShoesReplenishments (EmployeeId, DateReceipt) INSERT INTO ShoesReplenishments (FactorysId, DateReceipt)
VALUES (@EmployeeId, @DateReceipt); VALUES (@FactorysId, @DateReceipt);
SELECT MAX(Id) FROM ShoesReplenishments"; SELECT MAX(Id) FROM ShoesReplenishments";
var shoesReplenishmentId = var shoesReplenishmentId =
connection.QueryFirst<int>(queryInsert, shoesReplenishment, transaction); connection.QueryFirst<int>(queryInsert, shoesReplenishment, transaction);
@ -80,7 +80,7 @@ WHERE Id=@id";
} }
} }
public IEnumerable<ShoesReplenishment> ReadShoesReplenishment(DateTime? public IEnumerable<ShoesReplenishment> ReadShoesReplenishment(DateTime?
dateForm = null, DateTime? dateTo = null, int? shoesId = null, int? employeeId = dateForm = null, DateTime? dateTo = null, int? shoesId = null, int? factorysId =
null) null)
{ {
_logger.LogInformation("Получение всех объектов"); _logger.LogInformation("Получение всех объектов");