Example #1
0
        public void CreateFruit()
        {
            ConzapTools.ClearScreen();
            ConzapTools.PrintLine("CREATE NEW FRUIT");
            var fruit = new Fruit();

            fruit.Type        = ConzapTools.ChooseString("Type: ");
            fruit.Description = ConzapTools.ChooseString("Description: ");
            fruit.Quantity    = ConzapTools.ChooseInt("Amount: ", 0, 100);

            Fruits.Add(fruit);
        }
Example #2
0
        public void CreatePerson()
        {
            Console.Clear();
            var now    = DateTime.Now;
            var person = new Person();

            Console.WriteLine("CREATE NEW PERSON");
            person.Name = ConzapTools.ChooseString("Name: ");
            person.Age  = ConzapTools.ChooseInt("Age: ", 0, 110);
            var year = ConzapTools.ChooseInt("Year: ", 1900, DateTime.Now.Year);

            person.Year = new DateTime(year, now.Month, now.Day);

            Persons.Insert(0, person);
        }