Ejemplo n.º 1
0
        private void btnXoa_Click(object sender, EventArgs e)
        {
            DialogResult check = MessageBox.Show("Bạn có muốn xóa không", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (check == DialogResult.Yes)
            {
                ENTITY.ChiTietPhieuMuon ct = new ENTITY.ChiTietPhieuMuon();
                ct.ID_ChiTietPhieuMuon = txtMaCTPM.Text.Trim();
                DAL.ChiTietPhieuMuon_Controler c = new DAL.ChiTietPhieuMuon_Controler();
                c.deleteCTPhieuMuon(ct);
            }
            showLsvCTPM();
            lockControl();
        }
Ejemplo n.º 2
0
 private void btnLuu_Click(object sender, EventArgs e)
 {
     ENTITY.ChiTietPhieuMuon c = new ENTITY.ChiTietPhieuMuon();
     c.ID_ChiTietPhieuMuon = txtMaCTPM.Text.Trim();
     c.ID_PhieuMuon        = txtMaPM.Text.Trim();
     c.ID_Sach             = txtMaSach.Text.Trim();
     c.SoLuong             = txtSoLuong.Text.Trim();
     c.TrangThai           = txtTrangThai.Text.Trim();
     DAL.ChiTietPhieuMuon_Controler ct = new DAL.ChiTietPhieuMuon_Controler();
     if (kt == false)
     {
         ct.insertCTPhieuMuon(c);
     }
     showLsvCTPM();
     lockControl();
 }