Example #1
0
        public void GetState()
        {
            string newState = "";

            do
            {
                newState = EditCheck.GetString("Please provide state: ");
            } while (!EditCheck.NullOrEmpty(newState) || !addingOrderRules.StateCheck(newState));
            NewOrder.State = (States)Enum.Parse(typeof(States), newState.ToUpper());
            AddOrderResponse response = manager.StateTaxCheck(NewOrder.State);

            NewOrder.TaxRate = response.Order.TaxRate;
        }
        public void StateChange()
        {
            string stateInput = "";

            do
            {
                Console.WriteLine($"Current state: ({response.Order.State})");
                Console.Write("State Change: ");
                stateInput = Console.ReadLine();
                if (string.IsNullOrEmpty(stateInput))
                {
                    break;
                }
                response.Order.State = (States)Enum.Parse(typeof(States), stateInput.ToUpper());
            } while (!OrderingRule.StateCheck(stateInput));
            totalResponse          = manager.StateTaxCheck(response.Order.State);
            response.Order.TaxRate = totalResponse.Order.TaxRate;
        }