private void FinPayBtn_Click(object sender, EventArgs e) { string Loan_ID = dataGridView1.CurrentRow.Cells["Loan_ID"].Value.ToString(); bool Check = Check_Book_In(Loan_ID); if (Check == true) { Execute_Pay_Fine(Loan_ID); } else { MessageBox.Show("The book has not been checked in."); } Load_Fine_View(); FinPayBtn.Hide(); CancelBtn.Hide(); }
private void PayFineBtn_Click(object sender, EventArgs e) { string Card_ID = dataGridView1.CurrentRow.Cells["Card_ID"].Value.ToString(); string Query = "select * from fine_view_all_unpaid where Card_ID like '%" + Card_ID + "%';"; try { MySqlDataAdapter Adap = new MySqlDataAdapter(Query, Connection); DataSet Data1 = new DataSet(); Adap.Fill(Data1); dataGridView1.DataSource = Data1.Tables[0]; FinPayBtn.Show(); MessageBox.Show("Select the fine corresponding to the book checked out and click execute."); } catch (MySqlException ex) { MessageBox.Show(ex.Message); } FinPayBtn.Show(); CancelBtn.Show(); }
private void CancelBtn_Click(object sender, EventArgs e) { FinPayBtn.Hide(); CancelBtn.Hide(); Load_Fine_View(); }