Пример #1
0
        public static void AskToContinue(IMember member)
        {
            StandardMessage.Continue();
            string answer = Console.ReadLine().ToLower();

            switch (answer)
            {
            case "y":
            {
                if (member.Post == "header")
                {
                    HeaderTypeOfAction.ChooseAction(member);
                }
                else
                {
                    TypeOfAction.ChooseAction(member);
                }
                break;
            }

            case "n":
                Environment.Exit(0);
                break;

            default:
                ErrorMessage.InputAnswerIsNotCorrect();
                AskToContinue(member);
                break;
            }
        }
Пример #2
0
        public static void InitializeMember()
        {
            StandardMessage.EnterName();
            string inputName = ValidInputValue.GetName();

            foreach (var member in ReaderMembersAndReports.members)
            {
                //DataOfMember.GetDataOfMember(person);
                if (member.Name == inputName)
                {
                    IMember person = CreateModel(member);
                    Console.Clear();
                    if (person.Post == "header")
                    {
                        HeaderTypeOfAction.ChooseAction(person);
                    }
                    else
                    {
                        TypeOfAction.ChooseAction(person);
                    }

                    return;
                }
            }

            ErrorMessage.MemberIsNotExists();
            InitializeMember();
        }