Exemple #1
0
 public void ModifyData()
 {
     m_BookTitle     = BookUtil.InputString("책제목 : ");
     m_BookAuthors   = BookUtil.InputList("저자");
     m_BookContents  = BookUtil.InputList("목차");
     m_BookPublisher = BookUtil.InputString("출판사 : ");
 }
Exemple #2
0
 public bool InputData(IBookMgr bookMgr)
 {
     m_ISBN = BookUtil.InputString("ISBN : ");
     if (bookMgr.SearchBook(m_ISBN, Book.CompareISBN) != -1)
     {
         Console.WriteLine("이미 등록된 책입니다.");
         return(false);
     }
     ModifyData();
     return(true);
 }
Exemple #3
0
        public void ModifyBook(string strTitle, string strErrMsg, CompareBookDelegate compareBookDelegate)
        {
            string     str    = BookUtil.InputString(strTitle);
            List <int> Result = SearchInList(str, compareBookDelegate);

            if (Result.Count > 0)
            {
                ModifyBook(Result);
            }
            else
            {
                Console.WriteLine(strErrMsg);
            }
        }
Exemple #4
0
        public void SearchInList(string strTitle, string strErrMsg, CompareBookDelegate compareBookDelegate) //다중검색
        {
            string     strAuthor  = BookUtil.InputString(strTitle);
            List <int> ResultList = SearchInList(strAuthor, compareBookDelegate);

            if (ResultList.Count > 0)
            {
                PrintAllBooks(ResultList);
            }
            else
            {
                Console.WriteLine(strErrMsg);
            }
        }
Exemple #5
0
        public void SearchBook(string strTitle, string strErrMsg, CompareBookDelegate compareBookDelegate) //단일검색
        {
            string str    = BookUtil.InputString(strTitle);
            int    iIndex = SearchBook(str, compareBookDelegate);

            if (iIndex != -1)
            {
                m_BookList[iIndex].PrintData();
            }
            else
            {
                Console.WriteLine(strErrMsg);
            }
        }