Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ProductInBag:Product
- {
- protected decimal mPrice ; // price for single unit
- protected int mQuantity; //כמות
- protected int mProdIndex ;
- public ProductInBag()
- {
- //mProdID = -1;
- //mProdName = string.Empty;
- mPrice = -1; // price for single unit
- mQuantity = 0;
- mProdIndex = -1;
- }
- public ProductInBag(ProductInBag p):base(p)
- {
- this.mPrice=p.UnitPrice;
- this.mQuantity=p.QuantityPerUnit;
- }
- public ProductInBag(int inProdID, string inProdName, decimal inPrice, short inQuantity):base(inProdID,inProdName)
- {
- mQuantity = inQuantity;
- mPrice = inPrice;
- }
- public ProductInBag(int inProdID):base(inProdID)
- { }
- public decimal UnitPrice
- {
- get
- {
- return mPrice;
- }
- set
- {
- mPrice = value;
- }
- }
- public int QuantityPerUnit
- {
- get
- {
- return mQuantity;
- }
- set
- {
- mQuantity = value;
- }
- }
- public int ProductIndex
- {
- get
- {
- return mProdIndex;
- }
- set
- {
- mProdIndex = value;
- }
- }
- }
Add Comment
Please, Sign In to add comment