예제 #1
0
 private void BtnReturnBook_Click(object sender, RoutedEventArgs e)
 {
     if (customer != null)
     {
         if (returnRentedBookLists.Any())
         {
             if (MessageBox.Show("Do you want to return this books?", "Question", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes)
             {
                 foreach (ReturnRentedBookList bk in returnRentedBookLists)
                 {
                     dr.ReturnBook(bk.Id, bk.RentedBookId, bk.CalcPrice);
                 }
                 this.Close();
             }
         }
         else
         {
             MessageBox.Show("You not select Book!!!");
         }
     }
     else
     {
         MessageBox.Show("You not select Customer!!!");
     }
 }