Esempio n. 1
0
        public CThanhToanBHYT f_loadKhoaPhong_UBNDTra(string idttrv, DateTime Ngay)
        {
            string         kq       = "";
            string         ChanDoan = "";
            CThanhToanBHYT obj      = new CThanhToanBHYT();

            sql  = " select b.makp makp,round(b.miencs,0) miencs";
            sql += " from {userdata}.v_ttrvll  b";
            sql += " where b.id='{idttrv}' ";


            sql = sql.Replace("{userdata}", m_format.getdatabase(Ngay));
            sql = sql.Replace("{idttrv}", idttrv);
            DataSet dset = new DataSet();

            try
            {
                dset        = data.get_data(sql);
                obj.Makp    = dset.Tables[0].Rows[0]["makp"].ToString();
                obj.Ubndtra = long.Parse(dset.Tables[0].Rows[0]["miencs"].ToString());
            }
            catch { }


            return(obj);
        }
Esempio n. 2
0
        private void txtMaMay_Leave(object sender, EventArgs e)
        {
            try {

                if (txtMaMay.Text.Length == 8)
                {
                    CBenhNhan item = new CBenhNhan();
                    CBenhNhanOracle dataOra = new CBenhNhanOracle();
                    item = dataOra.getBenhNhan(txtMaMay.Text);
                    txtTen.Text=item.HoTen + " ("+item.NamSinh+")";
                    CThanhToanBHYTOracle dataBHYTOra = new CThanhToanBHYTOracle();
                    CThanhToanBHYT bhyt = new CThanhToanBHYT();
                    bhyt = dataBHYTOra.f_loadTT_BHYT_TiepNhan(txtMaMay.Text,DateTime.Today);
                    txtNguoiYC.Text = bhyt.SoTheBHYT ;
                    txtHSD.Text = string.Format("{0:dd/MM/yyyy}", bhyt.HSD);
                    setList(cbPhuongThuc, bhyt.TraiTuyen.ToString());
                }
                else {
                    txtTen.Text = "";
                }
                            
               
            }
            catch { }
        }
Esempio n. 3
0
        private void txtMaBN_Leave(object sender, EventArgs e)
        {
            try {
                if (txtMaBN.Text.Length == 8)
                {
                    CBenhNhan       item    = new CBenhNhan();
                    CBenhNhanOracle dataOra = new CBenhNhanOracle();
                    item            = dataOra.getBenhNhan(txtMaBN.Text);
                    txtHoten.Text   = item.HoTen;
                    txtNamsinh.Text = item.NamSinh.ToString();
                    CThanhToanBHYTOracle dataBHYTOra = new CThanhToanBHYTOracle();
                    CThanhToanBHYT       bhyt        = new CThanhToanBHYT();
                    bhyt          = dataBHYTOra.f_loadTT_BHYT_TiepNhan(txtMaBN.Text, DateTime.Today);
                    txtSothe.Text = bhyt.SoTheBHYT;
                    //txtHSD.Text = string.Format("{0:dd/MM/yyyy}", bhyt.HSD);
                    //setList(cbPhuongThuc, bhyt.TraiTuyen.ToString());
                    //if(ckLuu.Checked==true)
                    //{
                    //    if (toolSave.Enabled == true)
                    //    {

                    //        SendKeys.Send("{F5}");
                    //    }
                    //}
                }
                else
                {
                    txtHoten.Text = "";
                }
            }
            catch { }
        }
Esempio n. 4
0
        private void frmDuyetBHYT_Load(object sender, EventArgs e)
        {
            BN   = new CBenhNhan();
            BHYT = new CThanhToanBHYT();
            CDanhMucOracle OraDanhmuc = new CDanhMucOracle();

            _khambenh  = OraDanhmuc.f_getgiaVP("30228");
            lbkhu.Text = AccessData.s_tenkhuvuc;
            //f_init_addmodul();
            Listthuock = new List <string>();
            d_dmbdbh_Orace ora_dmbd = new d_dmbdbh_Orace();

            Listthuock = ora_dmbd.getDanhSachThuocK();
        }
Esempio n. 5
0
        private void frmDuyetBHYT_Load(object sender, EventArgs e)
        {
            BN   = new CBenhNhan();
            BHYT = new CThanhToanBHYT();
            CDanhMucOracle OraDanhmuc = new CDanhMucOracle();

            _khambenh      = OraDanhmuc.f_getgiaVP("30228");
            lbkhu.Text     = AccessData.s_tenkhuvuc;
            panel1.Visible = false;
            panel2.Visible = false;

            d_dmbdbh_Orace ora_dmbd = new d_dmbdbh_Orace();

            init();
        }
Esempio n. 6
0
        public int Insert(CThanhToanBHYT t)
        {
            int roweffect = 0;

            try
            {
                sql  = "Insert into thanhtoanbhyt(mabn,nhomthe,loaithe,mavaovien,sothebhyt,noidangky,icd,chandoan,tongtien,bhyttra,bntra,thuoc,mau,xetnghiem,cdha,dvktthongthuong,dvktcao,vtyt,tienkham,chiphivc,thamdochucnang,giuong,traituyen,idttrv,ngaylamviec,sophieu,khac,manhomthe,ngayhd,loaiba,sobienlai,tungay)";
                sql += " values('" + t.MaBN + "',N'" + t.NhomThe + "','" + t.LoaiThe + "'," + t.MaVaoVien + ",";
                sql += "'" + t.SoTheBHYT + "',N'" + t.NoiDangKyBHYT + "','" + t.ICD + "',N'" + t.ChanDoan + "',";
                sql += t.TongTien + "," + t.BHYTTra + "," + t.BNTra + "," + t.Thuoc + "," + t.Mau + "," + t.XetNghiem + ",";
                sql += t.CDHA + "," + t.DVKTthongthuong + "," + t.DVKTcao + "," + t.VTYT + "," + t.TienKham + "," + t.ChiPhiVC + ",";
                sql += t.ThamDoChucNang + "," + t.Giuong + "," + t.TraiTuyen + "," + t.IDTTRV + ",'" + FormatYYYY_MM_DD(t.NgayLamViec) + "','" + t.SoPhieu + "'," + t.Khac + ",'" + t.MaNhomThe + "','" + FormatYYYY_MM_DD(t.HSD) + "','" + t.LoaiBA + "'," + t.SoBienLai + ",'" + FormatYYYY_MM_DD(t.TuNgay) + "')";
                CConnection data = new CConnection();
                roweffect = data.setData(sql);
            }
            catch { }
            return(roweffect);
        }
Esempio n. 7
0
        public int f_delete(CThanhToanBHYT thanhtoan)
        {
            int result = 0;

            try
            {
                string userid = AccessData.m_userid;
                //delete
                sql    = "delete " + schema + ".v_bhytds where id={id} ";
                sql    = sql.Replace("{id}", thanhtoan.ID.ToString());
                result = OracleData.f_execute_data(sql);

                eve_log.Action  = "DELETE";
                eve_log.Content = schema + ".v_BHYTDS_" + thanhtoan.ID.ToString() + "_" + thanhtoan.MaBN + "_" + thanhtoan.SoTheBHYT;
                eve_logDAO.f_insert(eve_log);
            }
            catch
            {
            }
            return(result);
        }
Esempio n. 8
0
        private void btXoa_Click(object sender, EventArgs e)
        {
            if (AccessData.m_date_lock < m_format.DateTime_parse(haison1.tungay))
            {
                string          idduyet     = txtIDDuyet.Text;
                v_bhytct_Oracle v_bhytctOra = new v_bhytct_Oracle();
                v_bhytll_Oracle v_bhytllOra = new v_bhytll_Oracle();
                v_bhytds_Oracle v_bhytdsOra = new v_bhytds_Oracle();
                v_bhytctOra.f_delete(long.Parse(idduyet));
                v_bhytllOra.f_delete(long.Parse(idduyet));

                CThanhToanBHYT thanhtoan = new CThanhToanBHYT();
                thanhtoan.MaBN      = txtMaBN.Text;
                thanhtoan.SoTheBHYT = txtMaBHYT.Text;
                thanhtoan.ID        = long.Parse(idduyet);
                v_bhytdsOra.f_delete(thanhtoan);
                f_LoadDSDaDuyet();
            }
            else
            {
                MessageBox.Show(string.Format("Số liệu đã khóa đến ngày {0:dd/MM/yyyy}! ", AccessData.m_date_lock));
            }
        }
Esempio n. 9
0
 public CThanhToanBHYTOracleVienPhi()
 {
     thanhtoanbhyt = new CThanhToanBHYT();
     data          = new AccessData();
     ds            = new DataSet();
 }