Esempio n. 1
0
 private void ClrBtn_Click(object sender, EventArgs e)
 {
     CardTxtBox.Clear();
     ISBNDispBox.Clear();
     TitleDispBox.Clear();
     CheckOutGrp.Hide();
 }
Esempio n. 2
0
        private void DoneBtn_Click(object sender, EventArgs e)
        {
            string Card_ID = CardTxtBox.Text;
            string ISBN    = ISBNDispBox.Text;
            string Date    = DateTime.Now.ToString("yyyy-MM-dd");


            bool Card_ID_Check = Verify_Card_ID(Card_ID);

            string Query = "insert into book_loans(ISBN, Card_ID, Date_out) values ('" + ISBN + "', '" + Card_ID + "', '" + Date + "');";

            if (Card_ID_Check == true)
            {
                bool Check = Check_Borrower(Card_ID);

                if (Check == true)
                {
                    Execute_Check_Out(ISBN, Card_ID, Date);
                }
                else
                {
                    MessageBox.Show("The user has already has 3 books checked out.");
                }
                ISBNDispBox.Clear();
                CardTxtBox.Clear();
                TitleDispBox.Clear();
                CheckOutGrp.Hide();
                Load_Book_View();
            }
            else
            {
                MessageBox.Show("There is no borrower with that card id.  Please try again.");
                CardTxtBox.Clear();
            }
        }
Esempio n. 3
0
 private void ClearBtn_Click(object sender, EventArgs e)
 {
     SearchBox1.Clear();
     if (CheckOutGrp.Visible == true)
     {
         CardTxtBox.Clear();
         ISBNDispBox.Clear();
         TitleDispBox.Clear();
         CheckOutGrp.Hide();
     }
     Load_Book_View();
 }