Example #1
0
 /// <summary>
 /// 로그인을 담당하는 메서드
 /// </summary>
 public void Login()
 {
     drawUI.LoginTitle();
     id = drawUI.GetConsoleIdNumber(7);
     if (id.Equals("back"))
     {
         Console.SetCursorPosition(5, 8);
         return;
     }
     if (id.Equals("0"))
     {
         Console.SetCursorPosition(5, 8);
         return;
     }
     Console.SetCursorPosition(14, 6);
     securePassword = drawUI.GetConsoleSecurePassword();
     stringPassword = new NetworkCredential("", securePassword).Password;
     if (stringPassword.Equals("b"))
     {
         Console.SetCursorPosition(5, 8);
         return;
     }
     if (stringPassword.Equals("0"))
     {
         Console.SetCursorPosition(5, 8);
         return;
     }
     if (dataControl.LoginCheck(id, stringPassword))
     {
         MainMenu();
     }
     else
     {
         Login();
     }
 }
Example #2
0
        /// <summary>
        /// 추가하기 전에 검색을 도와주는 메서드
        /// </summary>
        /// <param name="id">현 사용자의 아이디</param>
        /// <param name="dataControl">데이터 정보를 컨트롤 해주는 객체</param>
        /// <param name="readAndWriteExcelFile">액셀 정보를 관리해주는 객체</param>
        public void SearchRegister(string id, DataControl dataControl, ReadAndWriteExcelFile readAndWriteExcelFile)
        {
            bool   searchFlag = true;
            string mode;

            while (searchFlag)
            {
                drawUI.SearchMenu(TimeTableConstants.REGISTER);
                mode = drawUI.GetConsoleIdNumber(1);
                if (mode.Equals("back"))
                {
                    return;
                }
                switch (mode)
                {                   //각 모드는 어떤 정보에 대해서 검색할지에 대한 것이다.
                case TimeTableConstants.SEARCH_MAJOR:
                    Search(TimeTableConstants.SEARCH_MAJOR, id, dataControl, readAndWriteExcelFile);
                    break;

                case TimeTableConstants.SEARCH_NUMBER:
                    Search(TimeTableConstants.SEARCH_NUMBER, id, dataControl, readAndWriteExcelFile);
                    break;

                case TimeTableConstants.SEARCH_SUBJECT:
                    Search(TimeTableConstants.SEARCH_SUBJECT, id, dataControl, readAndWriteExcelFile);
                    break;

                case TimeTableConstants.SEARCH_GRADE:
                    Search(TimeTableConstants.SEARCH_GRADE, id, dataControl, readAndWriteExcelFile);
                    break;

                case TimeTableConstants.SEARCH_PROFESSOR:
                    Search(TimeTableConstants.SEARCH_PROFESSOR, id, dataControl, readAndWriteExcelFile);
                    break;

                case TimeTableConstants.SEARCH_INTEREST:
                    Search(TimeTableConstants.SEARCH_INTEREST, id, dataControl, readAndWriteExcelFile);
                    break;

                case TimeTableConstants.SEARCH_REGISTER_BACK:
                    searchFlag = false;
                    break;

                default:
                    break;
                }
            }
        }