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(); } }
private void ClrBtn_Click(object sender, EventArgs e) { CardTxtBox.Clear(); ISBNDispBox.Clear(); TitleDispBox.Clear(); CheckOutGrp.Hide(); }
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(); }
private void CheckOutBtn_Click(object sender, EventArgs e) { string ISBN = dataGridView1.CurrentRow.Cells["ISBN"].Value.ToString(); bool Book_Out = Check_Book(ISBN); if (Book_Out == true) { CheckOutGrp.Show(); ISBNDispBox.Text = dataGridView1.CurrentRow.Cells["ISBN"].Value.ToString(); TitleDispBox.Text = dataGridView1.CurrentRow.Cells["Title"].Value.ToString(); MessageBox.Show("Enter a user's Card ID into the text box and click the enter button."); } else { MessageBox.Show("This book is already checked out. Sorry."); } }