RockField64

ProductClass

Oct 26th, 2021 (edited)
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.21 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace frmAddProduct
  6. {
  7.     class ProductClass
  8.     {
  9.         private int _Quantity;
  10.         private double _SellingPrice;
  11.         private string _ProductName, _Category, _ManufacturingDate, _ExpirationDate, _Description;
  12.  
  13.         public ProductClass (string ProductName, string Category, string MfgDate, string ExpDate,
  14.             double Price, int Quantity, string Description)
  15.         {
  16.             this._Quantity = Quantity;
  17.             this._SellingPrice = Price;
  18.             this._ProductName = ProductName;
  19.             this._Category = Category;
  20.             this._ManufacturingDate = MfgDate;
  21.             this._ExpirationDate = ExpDate;
  22.             this._Description = Description;
  23.         }
  24.         public string productName
  25.         {
  26.             get
  27.             {
  28.                 return this._ProductName;
  29.             }
  30.             set
  31.             {
  32.                 this._ProductName = value;
  33.  
  34.             }
  35.             }
  36.             public string category
  37.         {
  38.             get
  39.             {
  40.                 return this._Category;
  41.             }
  42.             set
  43.             {
  44.                 this._Category = value;
  45.             }
  46.         }
  47.         public string manufacturingDate
  48.         {
  49.             get
  50.             {
  51.                 return this._ManufacturingDate;
  52.             }
  53.             set
  54.             {
  55.                 this._ManufacturingDate = value;
  56.  
  57.             }
  58.         }
  59.         public string expirationDate
  60.         {
  61.             get
  62.             {
  63.                 return this._ExpirationDate;
  64.             }
  65.             set
  66.             {
  67.                 this._ExpirationDate = value;
  68.  
  69.             }
  70.  
  71.         }
  72.         public string description
  73.         {
  74.             get
  75.             {
  76.                 return this._Description;
  77.             }
  78.             set
  79.             {
  80.                 this._Description = value;
  81.  
  82.             }
  83.  
  84.         }
  85.         public int quantity
  86.         {
  87.             get
  88.             {
  89.                 return this._Quantity;
  90.             }
  91.             set
  92.             {
  93.                 this._SellingPrice = value;
  94.             }
  95.         }
  96.    
  97.     }
  98. }
  99.  
Add Comment
Please, Sign In to add comment