/// <summary> /// 이름을 입력받는 부분 /// </summary> public void PrintName() { Console.Clear(); printAboutControlMembers.AddMemberTitle(); printAboutControlMembers.PrintName((int)LibraryConstants.Mode.Add); name = Console.ReadLine(); if (name.Equals("0")) { return; } if (name.Equals("1")) { PrintPassword(); } if (!exceptionHandler.CheckName(name)) { PrintName(); } }
/// <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; } }