Ejemplo n.º 1
0
 /// <summary>
 /// 비밀번호를 입력받는 부분
 /// </summary>
 public void PrintPassword()
 {
     Console.Clear();
     printAboutControlMembers.AddMemberTitle();
     printAboutControlMembers.PrintSignPassword((int)LibraryConstants.Mode.Add);
     securePassword = printAboutControlMembers.GetConsoleSecurePassword();
     password       = new NetworkCredential("", securePassword).Password;
     if (password.Equals("0"))
     {
         return;
     }
     if (password.Equals("1"))
     {
         PrintId();
     }
     if (!exceptionHandler.CheckPw(password))
     {
         PrintPassword();
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 탐색할 때 입력 값에 대한 예외처리를 해주는 메소드
        /// 들어온 enum 값에 따라 해당 작업을 한다.
        /// </summary>
        /// <param name="list">회원 정보 리스트</param>
        /// <param name="mode">어떤 카테고리로 검색할지</param>
        public void SearchSub(string mode)
        {
            switch (mode)
            {
            case LibraryConstants.SEARCH_WITH_NAME:
                printAboutControlMembers.PrintName((int)LibraryConstants.Mode.Search);
                search = Console.ReadLine();
                if (search.Equals("0"))
                {
                    return;
                }

                break;

            case LibraryConstants.SEARCH_WITH_RESIDENT_NUMBER:
                printAboutControlMembers.PrintResidentNum((int)LibraryConstants.Mode.Search);
                search = Console.ReadLine();
                if (search.Equals("0"))
                {
                    return;
                }

                break;

            case LibraryConstants.SEARCH_WITH_ID:
                printAboutControlMembers.PrintSignId((int)LibraryConstants.Mode.Search);
                search = Console.ReadLine();
                if (search.Equals("0"))
                {
                    return;
                }


                break;

            case LibraryConstants.SEARCH_WITH_PASSWORD:
                printAboutControlMembers.PrintSignPassword((int)LibraryConstants.Mode.Search);
                search = Console.ReadLine();
                if (search.Equals("0"))
                {
                    return;
                }

                break;

            case LibraryConstants.SEARCH_WITH_ADDRESS:
                printAboutControlMembers.PrintAddress((int)LibraryConstants.Mode.Search);
                search = Console.ReadLine();
                if (search.Equals("0"))
                {
                    return;
                }

                break;

            case LibraryConstants.SEARCH_WITH_PHONE:
                printAboutControlMembers.PrintPhone((int)LibraryConstants.Mode.Search);
                search = Console.ReadLine();
                if (search.Equals("0"))
                {
                    return;
                }

                break;

            case LibraryConstants.SEARCH_WITH_AGE:
                printAboutControlMembers.PrintSearchAge();
                search = Console.ReadLine();
                if (search.Equals("0"))
                {
                    return;
                }

                break;

            default:
                break;
            }
        }