public static void RenewAllLoans(borrower br, List <BorrowedBookCopy> borrowes) { DateTime ToBeReturnedDate = DateTime.Today.AddDays(CategoryRepository.GetCategoryById(br.CategoryId).Period); foreach (BorrowedBookCopy b in borrowes) { BorrowRepository.UpdateBorrowDates(br.PersonId, b.Borrow.Barcode, ToBeReturnedDate); } }
public static void RenewLoad(borrower br, string barcode) { DateTime ToBeReturnedDate = DateTime.Today.AddDays(CategoryRepository.GetCategoryById(br.CategoryId).Period); BorrowRepository.UpdateBorrowDates(br.PersonId, barcode, ToBeReturnedDate); }