Ejemplo n.º 1
0
 public void CheckOut()
 {
     patron.CheckOut(Barcode1);
     Assert.That(patron.Holdings, Is.EqualTo(new List <string> {
         Barcode1
     }));
 }
Ejemplo n.º 2
0
 private void OnCheckOut(object sender, RoutedEventArgs e)
 {
     if (DocList.SelectedItem == null)
     {
         InfoText.Content = "Select a document you would like to check out";
     }
     else
     {
         Patron currentPatron = (Patron)SDM.CurrentUser;
         string s, item = (string)DocList.SelectedItem;
         s = item.Substring(0, item.IndexOf('|'));
         int docID = Convert.ToInt32(s);
         InfoText.Content = currentPatron.CheckOut(docID);
         UpdateUI();
     }
 }
Ejemplo n.º 3
0
        /// <summary> Trying to check out selected doc </summary>
        private void OnCheckOut(object sender, RoutedEventArgs e)
        {
            if (docTable.SelectedIndex == -1)
            {
                return;
            }

            MessageBoxResult result = MessageBox.Show(SDM.Strings.CHECK_OUT_CONFIRMATION_TEXT,
                                                      SDM.Strings.ATTENTION_TEXT, MessageBoxButton.YesNo);

            switch (result)
            {
            case MessageBoxResult.Yes:
                DocumentsTable lb_row        = docTable.SelectedItems[0] as DocumentsTable;
                int            bookID        = lb_row.docID;
                Patron         currentPatron = (Patron)SDM.CurrentUser;
                MessageBox.Show(currentPatron.CheckOut(bookID));
                UpdateUI();
                break;

            case MessageBoxResult.No:
                break;
            }
        }