Beispiel #1
0
 private void btnTra_Click(object sender, EventArgs e)
 {
     //pm.UpdateTrangThaiPM_TraSach(txtMaTL.Text);
     if (tl.UodateSoLuongTLID_TraSach(txtMaTL.Text) == true)
     {
         dgvSachDaMuon.DataSource = bd.ThongKeSachDaMuonTheoID(txtMaBD.Text);
         if (MessageBox.Show("Trả Sách Hoàn Tất. Bạn có muốn tiếp tục?", "Question", MessageBoxButtons.YesNo) == DialogResult.No)
         {
             this.Close();
         }
     }
     else
     {
         MessageBox.Show("Trả Sách Thất Bại!. Vui lòng thực hiện lại !");
     }
 }
        private void btnTra_Click(object sender, EventArgs e)
        {
            //pm.UpdateTrangThaiPM_TraSach(txtMaTL.Text);
            int b = ctpm.TraTaiLieu(txtMaBD.Text, txtMaTL.Text);

            if (b > 0)
            {
                tl.UodateSoLuongTLID_TraSach(txtMaTL.Text);
                dgvSachDaMuon.DataSource = bd.ThongKeSachDaMuonTheoID(txtMaBD.Text);
                if (MessageBox.Show("Trả Sách Hoàn Tất. Bạn có muốn tiếp tục?", "Question", MessageBoxButtons.YesNo) == DialogResult.No)
                {
                    this.Close();
                }
                txtMaTL.Text = txtNhanDe.Text = txtNXB.Text = txtTheLoai.Text = txttacGia.Text = "";
            }
            else
            {
                MessageBox.Show("Trả Sách Thất Bại.");
            }
        }