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; }
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; }
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); }
public void AddProduct(Product newProduct) { ProductHolder.Increase(); Stoc.Add(newProduct); }