public ProductType RegisterProductType(ref ProductType pt)
 {
     Action<string> cww = Console.Write;
     cww("Enter Product type name: ");
     pt.TypeOfProduct = Console.ReadLine();
     return pt;
 }
Exemple #2
0
        public Product registerProduct(ref ProductType pdt)
        {
            Action<String> cw = Console.WriteLine;
            Action<string> cww = Console.Write;
            Product prod =new Product();

            prod.TypeId = pdt.TypeId;
            prod.TypeOfProduct = pdt.TypeOfProduct;
            cww("Enter Product name: ");
            prod.Name = Console.ReadLine();
            cww("Enter Product description: ");
            prod.Description = Console.ReadLine();
            cww("Enter Use guide: ");
            prod.Guide = Console.ReadLine();
            cww("Enter Produce country: ");
            prod.Country = Console.ReadLine();
            cww("Enter Price (>=0): ");
            prod.Price = Double.Parse(Console.ReadLine());
            cww("Enter Sell price (>=0): ");
            prod.SellPrice = Double.Parse(Console.ReadLine());
            return prod;
        }