Beispiel #1
0
        // 전체 대출 목록을 보여주고 반납, 연장을 할 수 있다.
        public void ViewRentalList()
        {
            string dueto = null;
            string isbn  = output.PrintRentalList(DB, student.StudentNo);

            if (isbn == null)
            {
                return;
            }

            if (output.YesOrNo("반납하시겠습니까?") == 1)
            {
                ReturnBook(isbn);
            }
            else
            {
                if (output.YesOrNo("연장하시겠습니까?") == 1)
                {
                    dueto = DB.Extension(isbn);
                    if (dueto != null)
                    {
                        output.PressAnyKey(dueto + "까지 연장되었습니다");
                        // 로그 기록
                        DB.InsertLog(student.StudentNo, DB.GetBookName(isbn), "도서 연장");
                    }
                    else
                    {
                        output.PressAnyKey("연장 횟수 초과 혹은 당일 연장 불가 입니다.");
                    }
                }
            }
        }