Guest User

Untitled

a guest
Apr 23rd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. public class ProductInBag:Product
  2. {
  3.  
  4. protected decimal mPrice ; // price for single unit
  5. protected int mQuantity; //כמות
  6. protected int mProdIndex ;
  7.  
  8.  
  9. public ProductInBag()
  10. {
  11. //mProdID = -1;
  12. //mProdName = string.Empty;
  13. mPrice = -1; // price for single unit
  14. mQuantity = 0;
  15. mProdIndex = -1;
  16. }
  17. public ProductInBag(ProductInBag p):base(p)
  18. {
  19. this.mPrice=p.UnitPrice;
  20. this.mQuantity=p.QuantityPerUnit;
  21. }
  22. public ProductInBag(int inProdID, string inProdName, decimal inPrice, short inQuantity):base(inProdID,inProdName)
  23. {
  24. mQuantity = inQuantity;
  25. mPrice = inPrice;
  26. }
  27.  
  28. public ProductInBag(int inProdID):base(inProdID)
  29. { }
  30.  
  31.  
  32.  
  33. public decimal UnitPrice
  34. {
  35. get
  36. {
  37. return mPrice;
  38. }
  39. set
  40. {
  41. mPrice = value;
  42. }
  43. }
  44.  
  45. public int QuantityPerUnit
  46. {
  47. get
  48. {
  49. return mQuantity;
  50. }
  51. set
  52. {
  53. mQuantity = value;
  54. }
  55. }
  56.  
  57. public int ProductIndex
  58. {
  59. get
  60. {
  61. return mProdIndex;
  62. }
  63. set
  64. {
  65. mProdIndex = value;
  66. }
  67. }
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75. }
Add Comment
Please, Sign In to add comment