Exemplo n.º 1
0
        public AddOrderResponse CheckAddArea(string area)
        {
            AddOrderRules areaRule = new AddOrderRules();

            AddOrderResponse response = areaRule.CheckArea(area);

            return(response);
        }
Exemplo n.º 2
0
        public AddOrderResponse CheckArea(string Area)
        {
            AddOrderResponse response      = new AddOrderResponse();
            AddOrderRules    addOrderRules = new AddOrderRules();
            decimal          newArea;

            decimal.TryParse(Area, out newArea);

            response = addOrderRules.CheckArea(newArea);

            return(response);
        }
Exemplo n.º 3
0
        public static int GetArea()
        {
            while (true)
            {
                Response      response = new Response();
                AddOrderRules rules    = new AddOrderRules();

                Console.WriteLine("\nPlease enter the square feet of the desired area:");
                string input = Console.ReadLine();
                response = rules.CheckArea(input);

                if (response.Success == false)
                {
                    Console.WriteLine($"{response.Message}");
                }
                else
                {
                    int userInt = int.Parse(input);
                    return(userInt);
                }
            }
        }