Exemple #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.PhieuDanhGia p = new ENTITY.PhieuDanhGia();
                p.ID_PhieuDanhGia = txtID_PhieuDanhGia.Text.Trim();
                DAL.PhieuDanhGia_Model pdg = new DAL.PhieuDanhGia_Model();
                pdg.deletePhieuDanhGia(p);
            }
            showLsvPhieuDanhGia();
            lockControl();
            clearControl();
        }
Exemple #2
0
 private void btnTimKiem_Click(object sender, EventArgs e)
 {
     try
     {
         clearLsvPhieuDanhGia();
         DAL.PhieuDanhGia_Model p  = new DAL.PhieuDanhGia_Model();
         SqlDataReader          dr = p.searchPhieuDanhGia(cmbTimKiem.Text.Trim(), cmbValue.Text.Trim());
         while (dr.Read())
         {
             addList(dr);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemple #3
0
 private void btnLuu_Click(object sender, EventArgs e)
 {
     ENTITY.PhieuDanhGia p = new ENTITY.PhieuDanhGia();
     p.ID_PhieuDanhGia = txtID_PhieuDanhGia.Text.Trim();
     p.ID_PhieuKhaoSat = cmbID_PhieuKhaoSat.Text.Trim();
     p.MaBaoHiem       = txtMaBH.Text.Trim();
     p.TinhTrangXe     = txtTinhTrangXe.Text.Trim();
     p.BaoGia          = txtBaoGia.Text.Trim();
     DAL.PhieuDanhGia_Model pdg = new DAL.PhieuDanhGia_Model();
     if (kt == true)
     {
         pdg.insertPhieuDanhGia(p);
     }
     else
     {
         pdg.editPhieuDanhGia(p);
     }
     showLsvPhieuDanhGia();
     lockControl();
     clearControl();
 }