Example #1
0
 /// <summary>
 /// 주민번호를 입력받는 부분
 /// </summary>
 public void PrintResidentNum()
 {
     Console.Clear();
     printAboutControlMembers.AddMemberTitle();
     printAboutControlMembers.PrintResidentNum((int)LibraryConstants.Mode.Add);
     secureResidentNum = printAboutControlMembers.GetConsoleSecureResidentNumber();
     residentNum       = new NetworkCredential("", secureResidentNum).Password;
     if (residentNum.Equals("0"))
     {
         return;
     }
     if (residentNum.Equals("1"))
     {
         PrintName();
     }
     if (!exceptionHandler.CheckResidentNum(residentNum))
     {
         PrintResidentNum();
     }
     if (!dBExceptionHandler.CheckResidentNumber(residentNum))
     {
         PrintResidentNum();
     }
 }
Example #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;
            }
        }