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 6 additions and 3 deletions
Showing only changes of commit 0d70b198b1 - Show all commits

View File

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

View File

@ -15,15 +15,18 @@ public class ProductMovement
public Movement MovementType { get; private set; }
public int Count { get; private set; }
public DateTime Date { get; private set; }
public static ProductMovement CreateOperation (int it, int productId, Movement movementType)
public static ProductMovement CreateOperation (int it, int productId, int count, Movement movementType)
{
return new ProductMovement
{
ID = it,
ProductID = productId,
MovementType = movementType,
Count = count,
Date = DateTime.Now
};
}