private void btnInTK_Click(object sender, EventArgs e)
 {
     Report.frmBAOCAO.type = 4;
     Report.frmBAOCAO.dt = nvBUS.danhsachnv();
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
        private void btnInHoaDon_Click(object sender, EventArgs e)
        {
            ctDTO.Mahd = cbbSoHD.Text.Trim();
            Report.frmBAOCAO.dt = ctBUS.inhoadon_kham(ctDTO);
            Report.frmBAOCAO.type = 23;
            Report.frmBAOCAO bc = new Report.frmBAOCAO();
            bc.Show();

            dt2 = hdBUS.laymahoadon();
            double[] arrcode = new double[dt2.Rows.Count];
            double code;
            if (dt2.Rows.Count > 0)
            {
                for (int i = 0; i < dt2.Rows.Count; i++)
                {
                    code = int.Parse(dt2.Rows[i]["MaHD"].ToString().Remove(0, 4));
                    arrcode[i] = code;
                }
                code = arrcode.Max() + 1;
                cbbSoHD.Text = "HD00" + code;
            }
            else
            {
                cbbSoHD.Text = "HD000";
            }

            txtBNChiTra.Text = "0";
            pkDTO.Ngaykham = DateTime.Today;
            gridControl1.DataSource = pkBUS.laybn_ngay(pkDTO);
        }
 private void btnTKDV_Click(object sender, EventArgs e)
 {
     Report.frmBAOCAO.dt = dvBUS.thongkedichvu();
     Report.frmBAOCAO.type = 12;
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
 private void btnInPhieu_Click(object sender, EventArgs e)
 {
     dtDTO.Madonthuoc = int.Parse(cbbMaToaThuoc.Text.Trim());
     Report.frmBAOCAO.dt = dtBUS.indonthuoc(dtDTO);
     Report.frmBAOCAO.type = 5;
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
 private void btnInPhieukham_Click(object sender, EventArgs e)
 {
     pkDTO.Maphieukham = cbbMaPhieuKham.Text;
     Report.frmBAOCAO.dt = pkBUS.inphieukham(pkDTO);
     Report.frmBAOCAO.type = 1;
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
 private void btnInPhieu_Click(object sender, EventArgs e)
 {
     kbDTO.Chuandoan = cbbTenBenh.Text.Trim();
     Report.frmBAOCAO.dt = kbBUS.dsbenh_chuandoan(kbDTO);
     Report.frmBAOCAO.type = 7;
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
 private void btnIn_Click(object sender, EventArgs e)
 {
     tuDTO.Matu = lblMaTU.Text.Trim();
     Report.frmBAOCAO.dt = tuBUS.inphieutamung(tuDTO);
     Report.frmBAOCAO.type = 20;
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
 private void btnCN_Click(object sender, EventArgs e)
 {
     cnDTO.Macn = cbbCN.SelectedValue.ToString();
     Report.frmBAOCAO.dt = cnBUS.timkiemnvtheocn(cnDTO);
     Report.frmBAOCAO.type = 9;
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
 private void btnDVTEN_Click(object sender, EventArgs e)
 {
     dvDTO.Madv = cbbDichVu.SelectedValue.ToString();
     Report.frmBAOCAO.dt = dvBUS.tkdv_ten(dvDTO);
     Report.frmBAOCAO.type = 22;
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
Esempio n. 10
0
 private void btnCV_Click(object sender, EventArgs e)
 {
     cvDTO.Macv = cbbChucVu.SelectedValue.ToString();
     Report.frmBAOCAO.dt = cvBUS.timkiemnvtheocv(cvDTO);
     Report.frmBAOCAO.type = 8;
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
Esempio n. 11
0
 private void btnKhoa_Click(object sender, EventArgs e)
 {
     kDTO.Makhoa = cbbKhoa.SelectedValue.ToString();
     Report.frmBAOCAO.dt = kBUS.timkiemnvtheokhoa(kDTO);
     Report.frmBAOCAO.type = 10;
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
 private void btnInPhieu_Click(object sender, EventArgs e)
 {
     pnvDTO.Maphieunv = cbbPhieuNhapVien.Text;
     Report.frmBAOCAO.dt = pnvBUS.inphieunv(pnvDTO);
     Report.frmBAOCAO.type = 2;
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
 private void btnInBA_Click(object sender, EventArgs e)
 {
     baDTO.Maba = cbbMaBA.Text.Trim();
     Report.frmBAOCAO.dt = baBUS.inbenhan(baDTO);
     Report.frmBAOCAO.type = 18;
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
 private void btnInPhieu_Click(object sender, EventArgs e)
 {
     ctxnDTO.Maphieuxn = cbbMaPhieuXN.Text.Trim();
     Report.frmBAOCAO.dt = ctxnBUS.inphieuxn(ctxnDTO);
     Report.frmBAOCAO.type = 21;
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
     btnInPhieu.Enabled = true;
 }
 private void btnInPhieu_Click(object sender, EventArgs e)
 {
     cdDTO.Mabn = txtMaBN.Text.Trim();
     cdDTO.Ngaychidinh =dtpTG.Value;
     Report.frmBAOCAO.dt = cdBUS.inphieucdxn(cdDTO);
     Report.frmBAOCAO.type = 6;
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
 private void simpleButton1_Click(object sender, EventArgs e)
 {
     DateTime a, b;
     a = dtpTuNgay.Value.Date;
     b = dtpDenNgay.Value.Date;
     Report.frmBAOCAO.dt = pnvBUS.tkbn_nhapvien(a, b);
     Report.frmBAOCAO.type = 16;
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
 private void btnBHYT_Click(object sender, EventArgs e)
 {
     DateTime a, b;
     a = dtpTuNgay.Value.Date;
     b = dtpDenNgay.Value.Date;
     Report.frmBAOCAO.dt = bnBUS.tkbn_bhyt(a,b);
     Report.frmBAOCAO.type = 17;
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
 private void btnTuVong_Click(object sender, EventArgs e)
 {
     DateTime a, b;
     a = dtpTuNgay.Value.Date;
     b = dtpDenNgay.Value.Date;
     Report.frmBAOCAO.dt = baBUS.tkbn_tuvong(a,b);
     Report.frmBAOCAO.thamso1 = a;
     Report.frmBAOCAO.thamso2 = b;
     Report.frmBAOCAO.type = 15;
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
 private void btnInPhieu_Click(object sender, EventArgs e)
 {
     DateTime a, b;
     a = dtpTuNgay.Value.Date;
     b = dtpDenNgay.Value.Date;
     Report.frmBAOCAO.type = 3;
     Report.frmBAOCAO.thamso1 = a;
     Report.frmBAOCAO.thamso2 = b;
     Report.frmBAOCAO.dt = pkBUS.timbn_ngaykham(a, b);
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
 private void btnTKSuDungThuoc_Click(object sender, EventArgs e)
 {
     DateTime a, b;
     a = dtpTuNgay.Value.Date;
     b = dtpDenNgay.Value.Date;
     Report.frmBAOCAO.dt = hdBUS.tksudungthuoc(a, b);
     Report.frmBAOCAO.thamso1 = a;
     Report.frmBAOCAO.thamso2 = b;
     Report.frmBAOCAO.type = 26;
     Report.frmBAOCAO bc = new Report.frmBAOCAO();
     bc.Show();
 }
Esempio n. 21
0
 private void btnNgayVL_Click(object sender, EventArgs e)
 {
     if (btpTuNgay.Value.Date > dtpDenNgay.Value.Date)
     {
         MessageBox.Show("Ngày sau phải lớn hơn ngày đầu");
     }
     else
     {
         DateTime a, b;
         a = btpTuNgay.Value.Date;
         b = dtpDenNgay.Value.Date;
         Report.frmBAOCAO.dt = nvbus.timkiemnvtheongayvl(a, b);
         Report.frmBAOCAO.type = 11;
         Report.frmBAOCAO bc = new Report.frmBAOCAO();
         bc.Show();
     }
 }
Esempio n. 22
0
 private void btnDVTG_Click(object sender, EventArgs e)
 {
     if (dtpTuNgay.Value.Date > dtpDenNgay.Value.Date)
     {
         MessageBox.Show("Ngày sau phải lớn hơn ngày đầu");
     }
     else
     {
         DateTime a, b;
         a = dtpTuNgay.Value.Date;
         b = dtpDenNgay.Value.Date;
         Report.frmBAOCAO.dt = sddvBUS.thongkedichvu_ngay(a, b);
         Report.frmBAOCAO.type = 13;
         Report.frmBAOCAO.thamso1 = a;
         Report.frmBAOCAO.thamso2 = b;
         Report.frmBAOCAO bc = new Report.frmBAOCAO();
         bc.Show();
     }
 }