Esempio n. 1
0
        //회원 정보 삭제
        public void RemoveMember()
        {
            string confirm;

            MemberVO foundMember = SearchMember("removeSearch");

            print.DeleteMember(foundMember);

            confirm = Console.ReadLine();
            if (errorCheck.Confirm(confirm))
            {
                print.MenuErrorMsg("Y/N오류");
                menu.MemberManagementMenu();
                return;
            }

            sqlQuery = "delete from member where id='" + foundMember.Id + "';";
            SendQuery();
            dataReader.Read();

            if (errorCheck.IsValidChange(dataReader) == false) //편집 에러
            {
                CloseDB();
                print.ErrorMsg("회원 삭제");
                menu.MemberManagementMenu();
                return;
            }

            CloseDB();
            print.CompleteMsg("회원 삭제 완료");
            menu.MemberManagementMenu();
            return;
        }
Esempio n. 2
0
        public void RemoveBook(string searchBy)
        {
            string confirm;

            BookVO foundBook = SearchBook("removeSearch", searchBy);

            print.RemoveBook(foundBook);

            if (foundBook == null)
            {
                menu.BookManagementMenu();
                return;
            }

            print.RemoveBook(foundBook);
            confirm = Console.ReadLine();

            if (errorCheck.Confirm(confirm))
            {
                print.MenuErrorMsg("Y/N오류");
                menu.BookManagementMenu();
            }

            sqlQuery = "delete from book where name ='" + foundBook.Name + "';";
            SendQuery();
            dataReader.Read();

            if (errorCheck.IsValidChange(dataReader) == false) //편집 에러
            {
                CloseDB();
                print.ErrorMsg("도서 정보 삭제");
                menu.BookManagementMenu();
                return;
            }

            CloseDB();
            print.CompleteMsg("도서 정보 삭제 완료");
            menu.BookManagementMenu();
            return;
        }