コード例 #1
0
ファイル: ReturnItem.cs プロジェクト: ramsalo1981/Library
        /// <summary>
        /// the user gets to choose which movie loan of the members movie loans to return
        /// the book loans endDate gets updated to DateTime.Today
        /// </summary>
        public static void UpdateMovieLoan(Member member)
        {
            Loan loanToReturn = SelectLoanById.SelectMovieLoan(member);

            if (loanToReturn != null)
            {
                DateTime returnDate = DateTime.Today;
                MovieLoanRepository.ReturnMovie(loanToReturn, returnDate);

                StandardMessages.ItemReturned("movie");
            }
            else
            {
                StandardMessages.NothingToReturn("movies");
            }
        }
コード例 #2
0
ファイル: ReturnItem.cs プロジェクト: ramsalo1981/Library
        public static void UpdateBookLoan(Member member)
        {
            Loan loanToReturn = SelectLoanById.SelectBookLoan(member);

            if (loanToReturn != null)
            {
                DateTime returnDate = DateTime.Today;
                BookLoanRepository.ReturnBook(loanToReturn, returnDate);

                StandardMessages.ItemReturned("book");
            }
            else
            {
                StandardMessages.NothingToReturn("books");
            }
        }