Пример #1
0
        private void btnDocXml_Click(object sender, EventArgs e)
        {
            DialogResult result = folderBrowserDialog.ShowDialog();
            if (result == DialogResult.OK)
            {
                // Thread updateFile = new Thread(new ThreadStart(LoadFile));
                // updateFile.Start();
                string folderName = folderBrowserDialog.SelectedPath;
                string txtDuongDan = folderName;
                CultureInfo enUS = CultureInfo.CreateSpecificCulture("en-US");

                for (int i = 0; i < Directory.GetFiles(txtDuongDan, "*.XML", System.IO.SearchOption.TopDirectoryOnly).Length; i++)
                {
                    DataRow row = tbBangKeXML.NewRow();
                    tbBangKeXML.Rows.Add(row);
                    tbBangKeXML.Rows[i]["BangKe_id"] = i;
                    FileInfo info = new FileInfo(Directory.GetFiles(txtDuongDan, "*.XML", System.IO.SearchOption.TopDirectoryOnly)[i].ToString());
                    using (XmlReader reader = XmlReader.Create(info.FullName))
                    {
                        while (reader.Read())
                        {
                            // Only detect start elements.
                            if (reader.IsStartElement())
                            {
                                // Get element name and switch on it.
                                switch (reader.Name)
                                {
                                    case "BangKe":
                                        string PhienBan = reader["PhienBan"];
                                        string LoaiBangKe = reader["LoaiBangKe"];
                                        objBangKe.LoaiBangKe = int.Parse(LoaiBangKe);
                                        tbBangKeXML.Rows[i]["LoaiBangKe"] = LoaiBangKe;
                                        if ((reader.NodeType == XmlNodeType.Element) && (reader.Name == "Cube"))
                                        {

                                        }
                                        break;
                                    //case "MaCSKCBBanDau":
                                    //     objBangKe.MaCSKCBBanDau = reader.ReadString();
                                    //     tbBangKeXML.Rows[i]["MaCSKCBBanDau"] = objBangKe.MaCSKCBBanDau;
                                    //        break;
                                    case "MaKhamChuaBenh":
                                        {

                                            objBangKe.MaCSKCB = reader.ReadString();
                                            tbBangKeXML.Rows[i]["MaCSKCB"] = objBangKe.MaCSKCB;
                                        }
                                        break;
                                    case "MaNguoiBenh":
                                        {

                                            objBangKe.MaNguoiBenh = reader.ReadString();
                                            tbBangKeXML.Rows[i]["MaNguoiBenh"] = objBangKe.MaNguoiBenh;
                                        }
                                        break;
                                    case "Khoa":
                                        {

                                            objBangKe.Khoa = reader.ReadString();
                                            tbBangKeXML.Rows[i]["Khoa"] = objBangKe.Khoa;
                                        }
                                        break;
                                    case "HoTen":
                                        {

                                            objBangKe.HoTen = reader.ReadString();
                                            tbBangKeXML.Rows[i]["HoTen"] = objBangKe.HoTen;
                                        }
                                        break;
                                    case "NgaySinh":
                                        {

                                            objBangKe.NgaySinh = Utils.convertDateTime(reader.ReadString());
                                            tbBangKeXML.Rows[i]["NgaySinh"] = objBangKe.NgaySinh;
                                        }
                                        break;
                                    case "NamSinh":
                                        {

                                            objBangKe.NamSinh = Utils.convertInt(reader.ReadString());
                                            tbBangKeXML.Rows[i]["NamSinh"] = objBangKe.NamSinh;
                                        }
                                        break;
                                    case "GioiTinh":
                                        {

                                            objBangKe.GioiTinh = Utils.convertInt(reader.ReadString());
                                            tbBangKeXML.Rows[i]["GioiTinh"] = objBangKe.GioiTinh;
                                        }
                                        break;
                                    case "DiaChi":
                                        {

                                            objBangKe.DiaChi = reader.ReadString();
                                            tbBangKeXML.Rows[i]["DiaChi"] = objBangKe.DiaChi;
                                        }
                                        break;
                                    case "SoTheBHYT":
                                        {

                                            objBangKe.SoTheBHYT = reader.ReadString();
                                            tbBangKeXML.Rows[i]["SoTheBHYT"] = objBangKe.SoTheBHYT;
                                        }
                                        break;
                                    case "SuDungTu":
                                        {

                                            objBangKe.TuNgayBH = Utils.convertDateTime(reader.ReadString());
                                            tbBangKeXML.Rows[i]["TuNgayBH"] = objBangKe.TuNgayBH;
                                        }
                                        break;
                                    case "SuDungDen":
                                        objBangKe.DenNgayBH = Utils.convertDateTime(reader.ReadString());
                                        tbBangKeXML.Rows[i]["DenNgayBH"] = objBangKe.DenNgayBH;
                                        break;
                                    case "MaDKBanDau":
                                        objBangKe.MaCSKCBBanDau = (reader.ReadString());
                                        tbBangKeXML.Rows[i]["MaCSKCBBanDau"] = objBangKe.MaCSKCBBanDau;
                                        break;
                                    case "MaNoiSinhSong":
                                        objBangKe.MaNoiSinhSong = (reader.ReadString());
                                        tbBangKeXML.Rows[i]["MaNoiSinhSong"] = objBangKe.MaNoiSinhSong;
                                        break;
                                    case "ChungNhanKhongCTC":
                                        objBangKe.ChungNhanKhongCCT = bool.Parse(reader.ReadString());
                                        tbBangKeXML.Rows[i]["ChungNhanKhongCCT"] = objBangKe.ChungNhanKhongCCT;
                                        break;
                                    case "NgayDenKham":
                                        {

                                            objBangKe.NgayDenKham = Utils.convertDateTime(reader.ReadString());
                                            tbBangKeXML.Rows[i]["NgayDenKham"] = objBangKe.NgayDenKham;
                                        }
                                        break;
                                    case "NgayKetThuc":
                                        {

                                            objBangKe.NgayKetThuc = Utils.convertDateTime(reader.ReadString());
                                            tbBangKeXML.Rows[i]["NgayKetThuc"] = objBangKe.NgayKetThuc;
                                        }
                                        break;

                                    case "NgayQuyetToan":
                                        {

                                            objBangKe.NgayQuyetToan = Utils.convertDateTime(reader.ReadString());
                                            tbBangKeXML.Rows[i]["NgayQuyetToan"] = objBangKe.NgayQuyetToan;
                                        }
                                        break;
                                    case "SoNgayDieuTri":
                                        {

                                            objBangKe.SoNgayDieuTri = Utils.convertInt(reader.ReadString());
                                            tbBangKeXML.Rows[i]["SoNgayDieuTri"] = objBangKe.SoNgayDieuTri;
                                        }
                                        break;
                                    case "LyDoVV":
                                        {

                                            objBangKe.TuyenKhamBenh = Utils.convertInt(reader.ReadString());
                                            tbBangKeXML.Rows[i]["TuyenKhamBenh"] = objBangKe.TuyenKhamBenh;
                                        }
                                        break;
                                    case "MaNoiChuyenDen":
                                        {

                                            objBangKe.MaNoiChuyenDen = (reader.ReadString());
                                            tbBangKeXML.Rows[i]["MaNoiChuyenDen"] = objBangKe.MaNoiChuyenDen;
                                        }
                                        break;
                                    case "ChuanDoan":
                                        {

                                            objBangKe.ChanDoan = (reader.ReadString());
                                            tbBangKeXML.Rows[i]["ChanDoan"] = objBangKe.ChanDoan;
                                        }
                                        break;
                                    case "PhanTramDuocHuong":
                                        {

                                            objBangKe.PhanTramDuocHuong = Utils.convertDecimal((reader.ReadString()), NumberStyles.Currency, enUS);
                                            tbBangKeXML.Rows[i]["PhanTramDuocHuong"] = objBangKe.PhanTramDuocHuong;
                                        }
                                        break;
                                    case "TongChiPhi":
                                        {

                                            objBangKe.TongChiPhi = Utils.convertDecimal((reader.ReadString()), NumberStyles.Currency, enUS);
                                            tbBangKeXML.Rows[i]["TongChiPhi"] = objBangKe.TongChiPhi;
                                        }
                                        break;

                                    case "NguonKhac":
                                        {

                                            objBangKe.NguonKhac = Utils.convertDecimal((reader.ReadString()), NumberStyles.Currency, enUS);
                                            tbBangKeXML.Rows[i]["NguonKhac"] = objBangKe.NguonKhac;
                                        }
                                        break;
                                    case "BHYTThanhToan":
                                        {

                                            objBangKe.BHYTThanhToan = Utils.convertDecimal((reader.ReadString()), NumberStyles.Currency, enUS);
                                            tbBangKeXML.Rows[i]["BHYTThanhToan"] = objBangKe.BHYTThanhToan;
                                        }
                                        break;
                                    case "NguoiBenhTra":
                                        {

                                            objBangKe.NguoiBenhTra = Utils.convertDecimal((reader.ReadString()), NumberStyles.Currency, enUS);
                                            tbBangKeXML.Rows[i]["NguoiBenhTra"] = objBangKe.NguoiBenhTra;
                                        }
                                        break;
                                    case "ChiPhiNgoaiDinhSuat":
                                        {

                                            objBangKe.ChiPhiNgoaiDinhSuat = Utils.convertDecimal((reader.ReadString()), NumberStyles.Currency, enUS);
                                            tbBangKeXML.Rows[i]["ChiPhiNgoaiDinhSuat"] = objBangKe.ChiPhiNgoaiDinhSuat;
                                        }
                                        break;
                                    case "MaChiNhanh":
                                        {

                                            objBangKe.MaChiNhanh = ((reader.ReadString()));
                                            tbBangKeXML.Rows[i]["MaChiNhanh"] = objBangKe.MaChiNhanh;
                                        }
                                        break;
                                    case "MaBenh":
                                        {

                                            objBangKe.MaICD = ((reader.ReadString()));
                                            tbBangKeXML.Rows[i]["MaICD"] = objBangKe.MaICD;
                                        }
                                        break;
                                    case "BenhKhac":
                                        {

                                            objBangKe.BenhKhac = ((reader.ReadString()));
                                            tbBangKeXML.Rows[i]["BenhKhac"] = objBangKe.BenhKhac;
                                        }
                                        break;

                                    case "ChiPhi":
                                        {
                                            string MaChiPhi = reader["MaChiPhi"];
                                            string TenChiPhi = reader["TenChiPhi"];
                                            string DonViTinh = reader["DonViTinh"];
                                            string MaNhom1 = reader["MaNhom1"];
                                            string MaNhom2 = reader["MaNhom2"];

                                            decimal PhanTramDuocHuong = Utils.convertDecimal(reader["PhanTramDuocHuong"], NumberStyles.Currency, enUS);
                                            decimal SoLuong = Utils.convertDecimal(reader["SoLuong"], NumberStyles.Currency, enUS);
                                            decimal DonGiaBHYT = Utils.convertDecimal(reader["DonGiaBHYT"], NumberStyles.Currency, enUS);
                                            decimal ThanhTien = Utils.convertDecimal(reader["ThanhTien"], NumberStyles.Currency, enUS);
                                            decimal NguonKhac = Utils.convertDecimal(reader["NguonKhac"], NumberStyles.Currency, enUS);
                                            decimal BHYTThanhToan = Utils.convertDecimal(reader["BHYTThanhToan"], NumberStyles.Currency, enUS);
                                            decimal NguoiBenhTra = Utils.convertDecimal(reader["NguoiBenhTra"], NumberStyles.Currency, enUS);
                                            decimal ChiPhiNgoaiDinhSuat = Utils.convertDecimal(reader["ChiPhiNgoaiDinhSuat"], NumberStyles.Currency, enUS);
                                            clsBangKeChiTiet ct = new clsBangKeChiTiet();
                                            ct.MaChiPhi = MaChiPhi;
                                            ct.TenChiPhi = TenChiPhi;
                                            ct.DonViTinh = DonViTinh;
                                            ct.MaNhom1 = MaNhom1;
                                            ct.MaNhom2 = MaNhom2;
                                            ct.PhanTramDuocHuong = (PhanTramDuocHuong);
                                            ct.SoLuong = (SoLuong);
                                            ct.DonGiaBHYT = (DonGiaBHYT);
                                            ct.ThanhTienBHYT = (ThanhTien);
                                            ct.NguonKhac = (NguonKhac);
                                            ct.BHYTThanhToan = (BHYTThanhToan);
                                            ct.NguoiBenhTra = (NguoiBenhTra);
                                            ct.ChiPhiNgoaiDinhSuat = (ChiPhiNgoaiDinhSuat);
                                            objBangKeChiTiet.Add(ct);
                                            break;
                                        }

                                }

                            }
                        }

                    }
                }
            }
        }
Пример #2
0
        private void LoadData(int status)
        {
            if (IsRunCheck == true)
            {
                return;
            }
            //Nếu trang thái là 3 và có số đăng ký ở trang thái thêm mới thì GetSoDangKy từ DangKyKhamBenh
            if (status == 3 && txtSoDK.Text.Trim().Length > 0 && TrangThai == "ThemMoi")
            {

                clsDangKyKhamBenh obj = new clsDangKyKhamBenh();
                obj.GetByKey(txtSoDK.Text.Trim());

                if (obj.KhamBenh_Id <= 0)
                {
                    txtSoDK.Text = string.Empty;
                    ResetControl();
                    return;
                }
                IsRunCheck = true;
                txtSoTheBHYT.Text = obj.SoTheBHYT.ToString();
                txtHoTen.Text = obj.HoTen;
                txtDiaChi.Text = obj.DiaChi;
                txtTuNgay.Text = string.Format("{0:dd/MM/yyyy}", obj.TuNgay);
                txtDenNgay.Text = string.Format("{0:dd/MM/yyyy}", obj.DenNgay);
                txtNgaySinh.Text = string.Format("{0:dd/MM/yyyy}", obj.NgaySinh);
                txtNgayVao.Text = string.Format("{0:dd/MM/yyyy}", obj.NgayDenKham);
                txtNamSinh.Text = obj.NgaySinh.Value.Year.ToString();

                clsDM_CSKCB objCSKCB = new clsDM_CSKCB();
                objCSKCB.GetByKey(obj.MaCSKCBBĐ);
                txtMaCSKCBBD.Text = obj.MaCSKCBBĐ;
                txtTenCSKCBBD.Text = objCSKCB.TenCSKCB;
                txtNoiChuyenDen.Text = obj.MaNoiChuyenDen;
                cboTuyenKham.SelectedValue = obj.LyDoVV.ToString();
                cboGioiTinh.SelectedValue = obj.GioiTinh.ToString();
                cboMaNoiSinhSong.SelectedValue = obj.MaNoiSinhSong.ToString();

                LoadMaCSKCBTheoMaTinh();
                //CheckDungTuyen();
                txtMaBenhNhan.Focus();
            }

            /*
             * Load thông tin từ Bảng Kê
             * Trang thái 0 : Get từ Form Search
             * Trang Thai 1: Get thông tin bằng Mã khám chữa bệnh
             * Trạng thái 2: Get thông tin bằng thẻ BHYT
             * Trang thái 3: Get bằng số đăng ký.
             */
            if (status == 0 || status == 1 || status == 2 || (TrangThai == "" && status == 3))
            {
                clsBangKe obj = new clsBangKe();
                if (TrangThai.Trim() == "" && status == 1)
                {
                    if (txtMaKhamChuBenh.Text.Trim().Length > 0)
                    {
                        obj.GetByMaKhamChuaBenh(txtMaKhamChuBenh.Text);
                        if (obj.MaKhamChuaBenh == null || obj.MaKhamChuaBenh.Trim() == "")
                        {
                            MessageBox.Show("Không tìm thấy Mã khám chữa bệnh " + txtMaKhamChuBenh.Text + " này.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);

                            ResetControl();
                            txtMaKhamChuBenh.Focus();
                            return;
                        }
                        m_BangKe_Id = obj.BangKe_Id;
                    }
                    else
                    {
                        ResetControl();
                        txtMaKhamChuBenh.Focus();
                        return;
                    }
                    IsRunCheck = true;
                }
                else if (TrangThai.Trim() == "" && status == 2)
                {

                    if (txtSoTheBHYT.Text.Replace("-", "").Trim().Length > 0)
                    {
                        obj.GetByKey(txtSoTheBHYT.Text.Replace("-", "").Trim());
                        if (obj.MaKhamChuaBenh == null || obj.MaKhamChuaBenh.Trim() == "")
                        {
                            MessageBox.Show("Không tìm thấy số thẻ " + txtSoTheBHYT.Text + " này.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);

                            ResetControl();
                            txtSoTheBHYT.Focus();
                            return;
                        }

                    }
                    else
                    {
                        ResetControl();
                        txtSoTheBHYT.Focus();
                        return;
                    }
                    IsRunCheck = true;
                }
                else if (TrangThai.Trim() == "" && status == 3)
                {
                    obj.GetBySoDK(txtSoDK.Text);
                    if (obj.MaKhamChuaBenh == null || obj.MaKhamChuaBenh.Trim() == "")
                    {
                        MessageBox.Show("Không tìm thấy số đăng ký " + txtSoDK.Text + " này.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);

                        ResetControl();
                        txtSoDK.Focus();
                        return;
                    }

                }
                else if (status == 0)
                {
                    IsRunCheck = true;
                    obj.GetByKey(m_BangKe_Id);
                }
                m_BangKe_Id = obj.BangKe_Id;

                //txtSoHoSo.Text = obj.SoHoSo;

                txtSoHoSo.Text = obj.BangKe_Id.ToString();
                txtMaKhamChuBenh.Text = obj.MaKhamChuaBenh;

                //if (status != 2)
                //{
                txtSoTheBHYT.Text = obj.SoTheBHYT;
                //}

                txtTuNgay.Text = string.Format("{0:dd/MM/yyyy}", obj.TuNgayBH);
                txtDenNgay.Text = string.Format("{0:dd/MM/yyyy}", obj.DenNgayBH);
                txtDiaChi.Text = obj.DiaChi;
                txtKhoa.Text = obj.Khoa;
                txtHoTen.Text = obj.HoTen;
                txtMaBenhNhan.Text = obj.MaNguoiBenh;
                cboTuyenKham.SelectedValue = obj.TuyenKhamBenh.ToString();

                txtNamSinh.Text = obj.NamSinh.ToString();

                cboTinhTrang.SelectedIndex = obj.DaGuiBHYT.Value ? 1 : 0;

                txtSoNgay.Text = obj.SoNgayDieuTri.Value.ToString();
                txtNgayVao.Text = string.Format("{0:dd/MM/yyyy}", obj.NgayDenKham);
                txtNgayRa.Text = string.Format("{0:dd/MM/yyyy}", obj.NgayKetThuc);
                txtNgayQuyetToan.Text = string.Format("{0:dd/MM/yyyy}", obj.NgayQuyetToan);
                txtMaICD.Text = obj.MaICD;
                txtChanDoan.Text = obj.ChanDoan;
                cboGioiTinh.SelectedValue = obj.GioiTinh.ToString();
                cboMaNoiSinhSong.SelectedValue = obj.MaNoiSinhSong;
                txtMaCSKCBBD.Text = obj.MaCSKCBBanDau;
                txtTenCSKCBBD.Text = obj.TenCSKCBBanDau;
                txtNoiChuyenDen.Text = obj.MaNoiChuyenDen;
                txtNgaySinh.Text = string.Format("{0:dd/MM/yyyy}", obj.NgaySinh);
                txtBenhKhac.Text = obj.BenhKhac;

                chkChungTuKhongCCT.Checked = obj.ChungNhanKhongCCT.Value;

                txtSoDK.Text = obj.SoHoSo;

                LoadMaCSKCBTheoMaTinh();

                // txtMaCSKCBBD.UpdateData();
                txtThuoc.Clear();

                clsBangKeChiTiet chitiet = new clsBangKeChiTiet();
                TableChiPhiThuoc = chitiet.GetAll(m_BangKe_Id);
                grdChiPhiThuoc.DataSource = TableChiPhiThuoc;

                txtTongChiPhi.Text = string.Format("{0:#,##0}", TableChiPhiThuoc.Compute("Sum(ThanhTienBHYT)", "True"));
                txtBHYTThanhToan.Text = string.Format("{0:#,##0}", TableChiPhiThuoc.Compute("Sum(BHYTThanhToan)", "True"));
                txtNguoiBenhTra.Text = string.Format("{0:#,##0}", TableChiPhiThuoc.Compute("Sum(NguoiBenhTra)", "True"));
                txtNguonKhac.Text = string.Format("{0:#,##0}", TableChiPhiThuoc.Compute("Sum(NguonKhac)", "True"));
                txtNgoaiDinhSuat.Text = string.Format("{0:#,##0}", TableChiPhiThuoc.Compute("Sum(ChiPhiNgoaiDinhSuat)", "True"));
                txtThuoc.Focus();
                txtThuoc.Text = "";
                txtSoLuongThuoc.Value = 1;
                txtPhanTramHuong.Value = obj.PhanTramDuocHuong ?? 0;
            }

            //txtMaICD.UpdateData();

            this.grdChiPhiThuoc.Sort(this.grdChiPhiThuoc.Columns["GroupName"], ListSortDirection.Ascending);
            IsRunCheck = false;
        }
Пример #3
0
        private void FillBangKe(ref List<clsBangKeChiTiet> chitiets, int intBangKe_Id)
        {
            foreach (DataRow dr in TableChiPhiThuoc.Rows)
            {
                clsBangKeChiTiet obj = new clsBangKeChiTiet();
                obj.BangKe_Id = intBangKe_Id;
                obj.MaChiPhi = dr["MaChiPhi"].ToString();
                obj.MaPhu = dr["MaPhu"].ToString();
                obj.TenChiPhi = dr["TenChiPhi"].ToString();
                obj.DonViTinh = dr["DonViTinh"].ToString();
                obj.SoLuong = (decimal)dr["SoLuong"];
                obj.PhanTramDuocHuong = (decimal)dr["PhanTramDuocHuong"];
                obj.DonGiaBHYT = (decimal)dr["DonGiaBHYT"];
                obj.ThanhTienBHYT = (decimal)dr["ThanhTienBHYT"];
                obj.BHYTThanhToan = (decimal)dr["BHYTThanhToan"];
                obj.NguonKhac = (decimal)dr["NguonKhac"];
                obj.NguoiBenhTra = (decimal)dr["NguoiBenhTra"];
                obj.ChiPhiNgoaiDinhSuat = (decimal)dr["ChiPhiNgoaiDinhSuat"];
                obj.MaNhom1 = dr["MaNhom1"].ToString();
                obj.MaNhom2 = dr["MaNhom2"].ToString();
                obj.MaLoaiChiPhi = dr["MaLoaiChiPhi"].ToString();
                obj.VTYTDichVuKTC = string.IsNullOrEmpty(dr["VTYTDichVuKTC"].ToString()) ? false : (bool)dr["VTYTDichVuKTC"];
                obj.DichVuKTC = string.IsNullOrEmpty(dr["DichVuKTC"].ToString()) ? false : (bool)dr["DichVuKTC"];
                obj.GhiChu = dr["GhiChu"].ToString();
                obj.TyLeThanhToan = string.IsNullOrEmpty(dr["TyLeThanhToan"].ToString()) ? 100 : (decimal)dr["TyLeThanhToan"];
                chitiets.Add(obj);
            }

            //}
        }
Пример #4
0
        private List<clsBangKeChiTiet> LayBangKeChiTiet(DataTable tbBangKeChiTiet)
        {
            List<clsBangKeChiTiet> lsBangKeChiTiet = new List<clsBangKeChiTiet>();
            DataTable tb = tbBangKeChiTiet;
            if (tb == null)
                return null;
            for (int i = 0; i < tb.Rows.Count; i++)
            {
                clsBangKeChiTiet objBangKeChiTiet = new clsBangKeChiTiet();

                objBangKeChiTiet.BangKeChiTiet_Id = int.Parse(tb.Rows[i]["BangKeChiTiet_Id"].ToString());
                objBangKeChiTiet.BangKe_Id = int.Parse(tb.Rows[i]["BangKe_Id"].ToString());
                objBangKeChiTiet.MaChiPhi = tb.Rows[i]["MaChiPhi"].ToString();
                objBangKeChiTiet.MaPhu = tb.Rows[i]["MaPhu"].ToString();
                objBangKeChiTiet.TenChiPhi = (tb.Rows[i]["TenChiPhi"].ToString());
                objBangKeChiTiet.DonViTinh = (tb.Rows[i]["DonViTinh"].ToString());

                try
                {
                    objBangKeChiTiet.SoLuong = decimal.Parse(tb.Rows[i]["SoLuong"].ToString());
                    objBangKeChiTiet.PhanTramDuocHuong = decimal.Parse(tb.Rows[i]["PhanTramDuocHuong"].ToString());
                    objBangKeChiTiet.DonGiaBHYT = decimal.Parse(tb.Rows[i]["DonGiaBHYT"].ToString());
                    objBangKeChiTiet.ThanhTienBHYT = decimal.Parse(tb.Rows[i]["ThanhTienBHYT"].ToString());
                    objBangKeChiTiet.BHYTThanhToan = decimal.Parse(tb.Rows[i]["BHYTThanhToan"].ToString());
                    objBangKeChiTiet.NguonKhac = decimal.Parse(tb.Rows[i]["NguonKhac"].ToString());

                    objBangKeChiTiet.NguoiBenhTra = decimal.Parse(tb.Rows[i]["NguoiBenhTra"].ToString());
                    objBangKeChiTiet.ChiPhiNgoaiDinhSuat = decimal.Parse(tb.Rows[i]["ChiPhiNgoaiDinhSuat"].ToString());
                }
                catch (Exception ex) { }
                objBangKeChiTiet.MaNhom1 = tb.Rows[i]["MaNhom1"].ToString();

                objBangKeChiTiet.MaNhom2 = tb.Rows[i]["MaNhom2"].ToString();
                objBangKeChiTiet.MaLoaiChiPhi = tb.Rows[i]["MaLoaiChiPhi"].ToString();

                objBangKeChiTiet.VTYTDichVuKTC = bool.Parse(tb.Rows[i]["VTYTDichVuKTC"].ToString());
                objBangKeChiTiet.DichVuKTC = bool.Parse(tb.Rows[i]["DichVuKTC"].ToString());
                objBangKeChiTiet.GhiChu = tb.Rows[i]["GhiChu"].ToString();
                lsBangKeChiTiet.Add(objBangKeChiTiet);

            }

            return lsBangKeChiTiet;
        }