PIbd-24 Antonova A.A. LabWork_2 #2

Closed
Anitonchik wants to merge 12 commits from LabWork_2 into LabWork_1
2 changed files with 3 additions and 4 deletions
Showing only changes of commit 5f9d203803 - Show all commits

View File

@ -19,7 +19,7 @@ public class Invoice
public int SellingPrice { get; set; }
DateTime DateInvoice { get; set; }
public DateTime Date { get; set; }
public IEnumerable<InvoiceProduct> Products
{
@ -37,7 +37,7 @@ public class Invoice
AvailabilityOfPromotionalCode = availabilityOfPromotionalCode,
DiscountPercentage = discountPercentage,
SellingPrice = sellingPrice,
DateInvoice = DateTime.Now,
Date = DateTime.Now,
Products = products
};
}

View File

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