//private void button2_Click_1(object sender, EventArgs e)
        //{
        //    if (txb_MaPK.Text == "")
        //    {
        //        MessageBox.Show("Hãy chọn phiếu khám cần xóa!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Error);

        //        return;
        //    }
        //    CTTT_GUI x = new CTTT_GUI(txb_MaPK.Text);

        //    x.ShowDialog();
        //    x.Hide();

        //    //if (txb_MaPK.Text == "")
        //    //{
        //    //    MessageBox.Show("Hãy chọn phiếu khám cần xóa!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Error);

        //    //    return;
        //    //}
        //    PHIEUKHAM bnDTO = new PHIEUKHAM();
        //    bnDTO.MaPK1 = int.Parse(txb_MaPK.Text);
        //    if (LapPhieuKB_BUS.XoaPhieuKham(bnDTO) == true)
        //    {
        //        TaiDuLieuVaoDataGirdView();

        //        MessageBox.Show("Xóa thành công!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Information);

        //        return;
        //    }
        //    MessageBox.Show(" Xóa không thành công!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
        //    this.Show();

        //}

        private void button_Xoa_Click(object sender, EventArgs e)
        {
            if (txb_MaPK.Text == "")
            {
                MessageBox.Show("Hãy chọn phiếu khám cần xóa!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Error);

                return;
            }

            //if (txb_MaPK.Text == "")
            //{
            //    MessageBox.Show("Hãy chọn phiếu khám cần xóa!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Error);

            //    return;
            //}
            PHIEUKHAM bnDTO = new PHIEUKHAM();

            bnDTO.MaPK1 = int.Parse(txb_MaPK.Text);

            // ma benh nhan lay tu form themthongtinbenhnhan
            bnDTO.MaBN1       = int.Parse(txb_MaBN.Text);
            bnDTO.NgayKham1   = DateTime.Parse(dtp_NgayKham.Text);
            bnDTO.TrieuChung1 = txb_TrieuChung.Text;

            if (LapPhieuKB_BUS.XoaPhieuKham(bnDTO) == true)
            {
                TaiDuLieuVaoDataGirdView();

                MessageBox.Show("Xóa thành công!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Information);

                return;
            }
            MessageBox.Show(" Xóa không thành công!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            this.Show();
        }
        private void button2_Click_1(object sender, EventArgs e)
        {
            if (txb_MaPK.Text == "")
            {
                MessageBox.Show("Hãy chọn phiếu khám cần xóa!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Error);

                return;
            }
            CTTT_GUI x = new CTTT_GUI(txb_MaPK.Text);

            x.ShowDialog();
            x.Hide();

            //if (txb_MaPK.Text == "")
            //{
            //    MessageBox.Show("Hãy chọn phiếu khám cần xóa!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Error);

            //    return;
            //}
            PHIEUKHAM bnDTO = new PHIEUKHAM();

            bnDTO.MaPK1 = int.Parse(txb_MaPK.Text);
            if (LapPhieuKB_BUS.XoaPhieuKham(bnDTO) == true)
            {
                TaiDuLieuVaoDataGirdView();

                MessageBox.Show("Xóa thành công!", "Thông Báo", MessageBoxButtons.OK, MessageBoxIcon.Information);

                return;
            }
            MessageBox.Show(" Xóa không thành công!", "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            this.Show();
        }