private void btnInPhieu_Click(object sender, EventArgs e)
        {
            if (txtMaPT.Text == "")
            {
                MessageBox.Show("phải chọn ít nhất 1 phiếu để in!");
                return;
            }
            string LyDo = "";

            foreach (DataGridViewRow row in dtgvCTPT.Rows)
            {
                if (row.Cells["CT_IMEI"].Value != null)
                {
                    LyDo = LyDo + "Sản phẩm: " + row.Cells["TenSP"].Value + " - Mã IMEI:  " + row.Cells["CT_IMEI"].Value + " - Lý do:  " + row.Cells["CT_LyDo"].Value + Environment.NewLine;
                }
            }
            fBaoCao f = new fBaoCao(Convert.ToInt32(txtMaPT.Text), LyDo);

            this.Hide();
            f.ShowDialog();
            this.Show();
        }
 private void btnThemPT_Click(object sender, EventArgs e)
 {
     try
     {
         if (txtTenKH.Text == "" || txtSDT.Text == "")
         {
             MessageBox.Show("nhập đầy đủ thông tin khách hàng!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             return;
         }
         string ThemPhieuDT = DoiTra_DAO.Instance.HoanThanh(listDT, dtpkNgayDoi.Value, txtTenKH.Text, Convert.ToInt32(cbNhanVien.SelectedValue), txtSDT.Text);
         MessageBox.Show("thêm thành công 1 phiếu đổi!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
         var XuatPhieu = MessageBox.Show("Bạn có muốn in phiếu vừa tạo ?", "In phiếu", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (XuatPhieu == DialogResult.No)
         {
             return;
         }
         else
         {
             int    idPhieuTra = MauBieu_DAO.Instance.LayIDPhieuDoiMoi();
             string LyDo       = "";
             foreach (DataGridViewRow row in dtgvDSDT.Rows)
             {
                 if (row.Cells["PDT_IMEI"].Value != null)
                 {
                     LyDo = LyDo + "Sản phẩm: " + row.Cells["PDT_TenSP"].Value + " - Mã IMEI:  " + row.Cells["PDT_IMEI"].Value + " - Lý do:  " + row.Cells["PDT_LyDo"].Value + Environment.NewLine;
                 }
             }
             fBaoCao f = new fBaoCao(idPhieuTra, LyDo);
             this.Hide();
             f.ShowDialog();
             this.Show();
         }
     } catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }