示例#1
0
 public Product()
 {
     Product_Id        = ProductHolder.product_Id; ProductHolder.Increase();
     Product_name      = "Milk";
     Product_priсe     = 50;
     Product_producer  = "Cow";
     Product_quantity  = 2;
     DataBecomeToStock = DateTime.Now;
 }
示例#2
0
 public Product(
     string Product_name,
     int Product_priсe,
     int Product_quantity,
     string Product_producer)
 {
     Product_Id             = ProductHolder.product_Id; ProductHolder.Increase();
     this.Product_name      = Product_name;
     this.Product_priсe     = Product_priсe;
     this.Product_producer  = Product_producer;
     this.Product_quantity  = Product_quantity;
     this.DataBecomeToStock = DateTime.Now;
 }
示例#3
0
        public void AddProductFast()
        {
            Console.Write("Fast add product\n");
            Console.Write("Product id:\t\t{0}\n", ProductHolder.product_Id); ProductHolder.Increase();
            Console.Write("Product name:\t\t");
            string tempProduct_name = Console.ReadLine();

            Console.Write("Product priсe:\t\t");
            int tempProduct_priсe = Convert.ToInt32(Console.ReadLine());

            Console.Write("Product quantity:\t");
            int tempProduct_quantity = Convert.ToInt32(Console.ReadLine());

            Console.Write("Product producer:\t");
            string  tempProduct_producer = Console.ReadLine();
            Product newProduct           = new Product(tempProduct_name, tempProduct_priсe, tempProduct_quantity, tempProduct_producer);

            Stoc.Add(newProduct);
        }
示例#4
0
 public void AddProduct(Product newProduct)
 {
     ProductHolder.Increase();
     Stoc.Add(newProduct);
 }