Example #1
0
        private void tmn_In_Click(object sender, EventArgs e)
        {
            m_dstamung.WriteXml("v_dstontamung.xml", XmlWriteMode.WriteSchema);
            frmReport af = new frmReport(m_v, m_dstamung.Tables[0], "v_tontamung.rpt", "", "", "", "", "", "", "", "", "", "Tồn Tạm Ứng", 1, true);

            af.ShowDialog();
        }
Example #2
0
        private void tmn_In_Click(object sender, EventArgs e)
        {
            string reportname = "", asyt = "", abv = "", inbc = "";

            if (!System.IO.Directory.Exists("..//..//Datareport//"))
            {
                System.IO.Directory.CreateDirectory("..//..//Datareport//");
            }
            dscho.WriteXml("..//..//Datareport//v_2007_dscho_ttrv.xml", XmlWriteMode.WriteSchema);
            asyt = m_v.Syte;
            abv  = m_v.Tenbv;
            inbc = lan.Change_language_MessageText("Từ ngày ") + " " + txtTN.Text.Substring(0, 10) + " " + lan.Change_language_MessageText("đến ngày ") + " " + txtDN.Text.Substring(0, 10);
            if (txtTN.Text == txtDN.Text)
            {
                inbc = lan.Change_language_MessageText("Ngày ") + " " + txtTN.Text.Substring(0, 10);
            }
            reportname = "v_2007_dscho_ttrv.rpt";
            frmReport f = new frmReport(m_v, dscho.Tables[0], reportname, asyt.ToUpper(), abv.ToUpper(), inbc, "", "", "", "", "", "", "", 1, true);

            f.ShowDialog();
        }
Example #3
0
 private void butIn_Click(object sender, EventArgs e)
 {
     try
     {
         //m_dsgoivp.WriteXml("v_goivp.xml",XmlWriteMode.WriteSchema);
         string aten = "";
         try
         {
             aten = m_v.get_data("select ten from medibv.v_giavp where id=" + m_id_gia).Tables[0].Rows[0]["ten"].ToString();
         }
         catch
         {
             aten = "";
         }
         //int tylegiamgia = int.Parse(txtTiLe.Value.ToString());
         frmReport af = new frmReport(m_v, m_dskythuatxungdot.Tables[0], "v_kythuatxungdot.rpt", "", "", "", "", aten, "", "", "", "", "Gói viện phí", 1, true);
         af.ShowDialog();
     }
     catch
     {
     }
 }
Example #4
0
        private void f_Xem()
        {
            string acurdir = System.Environment.CurrentDirectory;

            tmn_Export.Enabled = false;
            tmn_Xem.Enabled    = false;
            try
            {
                DataSet ads = f_Get_Data();
                if (ads.Tables[0].Rows.Count == 0)
                {
                    MessageBox.Show(lan.Change_language_MessageText("Không có số liệu!"), LibVP.AccessData.Msg);
                    return;
                }
                if (ads != null)
                {
                    string areport = "", asyt = "", abv = "", angayin = "", anguoiin = "", aghichu = "";
                    areport = "v_2007_bkhoantra.rpt";
                    if (rdBC_02.Checked)
                    {
                        areport = "v_2007_bkhoantra_trongngay.rpt";
                    }
                    else
                    if (rdBC_03.Checked)
                    {
                        areport = "v_2007_bkhoantra_khacngay.rpt";
                    }
                    if (rdBC_01.Checked && chkBHYTTraBnTra.Checked)
                    {
                        areport = "v_2007_bkhoantra_bhyt.rpt";
                        if (System.IO.File.Exists("..//..//..//report//" + areport) == false)
                        {
                            areport = "v_2007_bkhoantra.rpt";
                        }
                    }
                    asyt     = m_v.Syte;
                    abv      = m_v.Tenbv;
                    angayin  = lan.Change_language_MessageText("Ngày") + " " + txtNgayin.Value.Day.ToString().PadLeft(2, '0') + " " + lan.Change_language_MessageText("tháng") + " " + txtNgayin.Value.Month.ToString().PadLeft(2, '0') + " " + lan.Change_language_MessageText("năm") + " " + txtNgayin.Value.Year.ToString();
                    anguoiin = txtNguoilapphieu.Text.Trim();
                    if (rdThang.Checked)
                    {
                        aghichu = lan.Change_language_MessageText("Tháng:") + " " + txtThang.Value.ToString().PadLeft(2, '0') + " " + lan.Change_language_MessageText("Năm:") + " " + txtNam.Value.ToString();
                    }
                    else
                    {
                        aghichu = lan.Change_language_MessageText("Từ ngày:") + " " + txtTN.Text.Substring(0, 10) + " " + lan.Change_language_MessageText("Đến ngày:") + " " + txtDN.Text.Substring(0, 10);
                    }

                    if (!System.IO.Directory.Exists("..\\..\\Report_vp\\"))
                    {
                        System.IO.Directory.CreateDirectory("..\\Report_vp\\");
                    }
                    if (System.IO.Directory.Exists("..//..//datareport") == false)
                    {
                        System.IO.Directory.CreateDirectory("..//..//datareport");
                    }
                    ads.WriteXml("..//..//datareport//v_2007_bkhoantra.xml", XmlWriteMode.WriteSchema);
                    //
                    frmReport fa = new frmReport(m_v, ads.Tables[0], areport, asyt.ToUpper(), abv.ToUpper(), angayin, anguoiin, aghichu, txtNguoilapphieu.Text.Trim(), txtThuquy.Text.Trim(), txtKetoanvp.Text.Trim(), txtPhongtckt.Text.Trim(), "Bảng kê hoá đơn hoàn trả.", 1, chkXem.Checked?true:false);
                    fa.KetxuatExcel = bKetxuatExcel;
                    fa.ShowDialog();
                }
            }
            catch
            {
            }
            finally
            {
                System.Environment.CurrentDirectory = acurdir;
                tmn_Export.Enabled = true;
                tmn_Xem.Enabled    = true;
            }
        }
Example #5
0
        private void f_Xem()
        {
            string areport = "";
            string acurdir = System.Environment.CurrentDirectory;

            tmn_Export.Enabled = false;
            tmn_Xem.Enabled    = false;
            try
            {
                DataSet ads = f_Get_Data();
                if (ads != null)
                {
                    string asyt = "", abv = "", angayin = "", anguoiin = "", aghichu = "";
                    areport = "v_2007_bkthutamung.rpt";
                    if (rdBC_03.Checked)
                    {
                        areport = "v_2007_bkthutamung_conghoan.rpt";
                    }

                    if (cbMaubaocao.SelectedIndex > 0)
                    {
                        string areportt = areport.Replace(".rpt", "_" + cbMaubaocao.SelectedValue.ToString().Trim() + ".rpt");
                        if (System.IO.File.Exists("..\\..\\Report_vp\\" + areportt))
                        {
                            areport = areportt;
                        }
                    }

                    asyt     = m_v.Syte;
                    abv      = m_v.Tenbv;
                    angayin  = lan.Change_language_MessageText("Ngày") + " " + txtNgayin.Value.Day.ToString().PadLeft(2, '0') + " " + lan.Change_language_MessageText("tháng") + " " + txtNgayin.Value.Month.ToString().PadLeft(2, '0') + " " + lan.Change_language_MessageText("năm") + " " + txtNgayin.Value.Year.ToString();
                    anguoiin = txtNguoilapphieu.Text.Trim();
                    if (rdThang.Checked)
                    {
                        aghichu = lan.Change_language_MessageText("Tháng:") + " " + txtThang.Value.ToString().PadLeft(2, '0') + " " + lan.Change_language_MessageText("Năm:") + " " + txtNam.Value.ToString();
                    }
                    else
                    {
                        if (chkGio.Checked)
                        {
                            aghichu = lan.Change_language_MessageText("Từ ngày:") + " " + txtTN.Text.Substring(0, 16) + " " + lan.Change_language_MessageText("Đến ngày:") + " " + txtDN.Text.Substring(0, 16);
                        }
                        else
                        {
                            aghichu = lan.Change_language_MessageText("Từ ngày:") + " " + txtTN.Text.Substring(0, 10) + " " + lan.Change_language_MessageText("Đến ngày:") + " " + txtDN.Text.Substring(0, 10);
                        }
                    }

                    if (!System.IO.Directory.Exists("..//..//Datareport//"))
                    {
                        System.IO.Directory.CreateDirectory("..//..//Datareport//");
                    }
                    ads.WriteXml("..//..//Datareport//v_BKtamung.xml", XmlWriteMode.WriteSchema);

                    if (!System.IO.Directory.Exists("..\\..\\Report_vp\\"))
                    {
                        System.IO.Directory.CreateDirectory("..\\Report_vp\\");
                    }
                    if (ads.Tables[0].Rows.Count == 0)
                    {
                        MessageBox.Show(lan.Change_language_MessageText("Không có số liệu!"), LibVP.AccessData.Msg);
                        return;
                    }


                    if ((chkInrieng.Checked == false && chkInchung.Checked == false) || chkInrieng.Checked)
                    {
                        frmReport fa = new frmReport(m_v, ads.Tables[0], areport, asyt.ToUpper(), abv.ToUpper(), angayin, anguoiin, aghichu, txtNguoilapphieu.Text.Trim(), txtThuquy.Text.Trim(), txtKetoanvp.Text.Trim(), txtPhongtckt.Text.Trim(), "Báo cáo thu viện phí trực tiếp", 1, chkXemkhiin.Checked?true:false);
                        fa.KetxuatExcel = bKetxuatExcel;
                        fa.ShowDialog();
                    }
                    if (chkInchung.Checked)
                    {
                        areport = areport.Replace(".rpt", "_inchung.rpt");
                        frmReport fa = new frmReport(m_v, ads.Tables[0], areport, asyt.ToUpper(), abv.ToUpper(), angayin, anguoiin, aghichu, txtNguoilapphieu.Text.Trim(), txtThuquy.Text.Trim(), txtKetoanvp.Text.Trim(), txtPhongtckt.Text.Trim(), "Báo cáo thu viện phí trực tiếp", 1, chkXemkhiin.Checked?true:false);
                        fa.KetxuatExcel = bKetxuatExcel;
                        fa.ShowDialog();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(areport + "\n" + ex.ToString());
            }
            finally
            {
                System.Environment.CurrentDirectory = acurdir;
                tmn_Export.Enabled = true;
                tmn_Xem.Enabled    = true;
            }
        }