Compare commits

..

No commits in common. "83dabadc7ffc5aa63e95bba8a686fe07b02d15d0" and "467708f2bc7b01a9a79f2452efcd942fc89b7c35" have entirely different histories.

4 changed files with 5 additions and 4 deletions

View File

@ -37,7 +37,7 @@ public class Invoice
AvailabilityOfPromotionalCode = availabilityOfPromotionalCode, AvailabilityOfPromotionalCode = availabilityOfPromotionalCode,
DiscountPercentage = discountPercentage, DiscountPercentage = discountPercentage,
SellingPrice = sellingPrice, SellingPrice = sellingPrice,
Date = DateTime.Now, DateInvoice = DateTime.Now,
Products = products Products = products
}; };
} }

View File

@ -50,7 +50,8 @@ namespace ProjectCompanyFurniture.Forms
{ {
try try
{ {
if (string.IsNullOrWhiteSpace(textBoxName.Text) || string.IsNullOrEmpty(textBoxCategory.Text) if (string.IsNullOrWhiteSpace(textBoxName.Text)
|| string.IsNullOrEmpty(textBoxCategory.Text)
|| comboBoxManufacturer.SelectedIndex < 0) || comboBoxManufacturer.SelectedIndex < 0)
{ {
throw new Exception("Имеются незаполненные поля"); throw new Exception("Имеются незаполненные поля");

View File

@ -9,7 +9,7 @@ namespace ProjectCompanyFurniture.Repositories;
public interface IInvoiceRepository public interface IInvoiceRepository
{ {
IEnumerable<Invoice> ReadInvoices (DateTime? dateForm = null, DateTime? dateTo = null, int? productId = null); IEnumerable<Invoice> ReadInvoices (DateTime? dateForm = null, DateTime? dateTo = null, int? clientId = null);
void CreateInvoice(Invoice invoice); void CreateInvoice(Invoice invoice);
void DeleteInvoice(int id); void DeleteInvoice(int id);

View File

@ -76,7 +76,7 @@ public class InvoiceRepository : IInvoiceRepository
} }
} }
public IEnumerable<Invoice> ReadInvoices(DateTime? dateForm = null, DateTime? dateTo = null, int? productId = null) public IEnumerable<Invoice> ReadInvoices(DateTime? dateForm = null, DateTime? dateTo = null, int? clientId = null)
{ {
_logger.LogInformation("Получение всех объектов"); _logger.LogInformation("Получение всех объектов");
try try