Advertisement
globalbus

Untitled

Nov 7th, 2011
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.22 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace Firma
  7. {
  8.     class Faktura
  9.     {
  10.         public string NameOfProduct { get; set; }
  11.  
  12.         private int id;
  13.         private double price;
  14.         public double PriceOfProduct
  15.         {
  16.             get { return price; }
  17.             set { price = value; }
  18.         }
  19.        
  20.         public int NumberOfInvoice
  21.         {
  22.             get { return id; }
  23.             set { id = value; }
  24.         }
  25.  
  26.         private int amount;
  27.         public int AmountOfProduct
  28.         {
  29.             get { return amount; }
  30.             set { amount = value; }
  31.         }
  32.         public int AmountOfProduct_inKopa
  33.         {
  34.             get { return (amount/60); }
  35.         }
  36.         public int AmountOfProduct_inTuzin
  37.         {
  38.             get { return (amount / 12); }
  39.         }
  40.         public int AmountOfProduct_inGros
  41.         {
  42.             get { return (amount / 144); }
  43.         }
  44.         public Faktura(int id, int amount, double price, string name)
  45.         {
  46.             NumberOfInvoice = id;
  47.             AmountOfProduct = amount;
  48.             PriceOfProduct = price;
  49.             NameOfProduct = name;
  50.         }
  51.  
  52.     }
  53. }
  54.  
  55.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement