示例#1
0
 private void frmReport_Load(object sender, System.EventArgs e)
 {
     this.Report.Size = new System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
     this.Size        = new System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
     i_soluong_le     = d.d_soluong_le(i_nhom);
     i_dongia_le      = d.d_dongia_le(i_nhom);
     i_thanhtien_le   = d.d_thanhtien_le(i_nhom);
     this.Tag         = System.Environment.CurrentDirectory.ToString();
     if (b_baohiem)
     {
         Baohiem();
     }
     else if (b_bienlai)
     {
         Bienlai();
     }
     else if (ds == null || bia)
     {
         Bia();
     }
     else if (b_145)
     {
         Report145();
     }
     else if (b_benhan)
     {
         Benhan();
     }
     else
     {
         PreviewReport();
     }
 }
示例#2
0
 private void frmSophongluu_Load(object sender, System.EventArgs e)
 {
     user = m.user;
     dtdt = m.get_data("select a.*,to_char(madoituong) as madoituong1 from " + user + ".doituong a").Tables[0];
     dtxt = m.get_data("select * from " + user + ".xutrikb").Tables[0];
     dsxt.ReadXml("..//..//..//xml//m_xtdt.xml");
     dsdt.ReadXml("..//..//..//xml//m_xtdt.xml");
     soluongle = d.d_soluong_le(m.nhom_duoc);
 }
示例#3
0
 private void frmSokham_Load(object sender, System.EventArgs e)
 {
     user = m.user;
     dtdt = m.get_data("select a.*,to_char(madoituong) as madoituong1 from " + user + ".doituong a").Tables[0];
     dtxt = m.get_data("select * from " + user + ".xutrikb").Tables[0];
     dsxt.ReadXml("..//..//..//xml//m_xtdt.xml");
     dsdt.ReadXml("..//..//..//xml//m_xtdt.xml");
     sql = "select * from " + user + ".btdkp_bv where loai=1";
     if (s_makp != "")
     {
         string s = s_makp.Replace(",", "','");
         sql += " and makp in ('" + s.Substring(0, s.Length - 3) + "')";
     }
     sql               += " order by loai,makp";
     dtkp               = m.get_data(sql).Tables[0];
     makp.DataSource    = dtkp;
     makp.DisplayMember = "TENKP";
     makp.ValueMember   = "MAKP";
     soluongle          = d.d_soluong_le(m.nhom_duoc);
 }
示例#4
0
        private void frmReport_Load(object sender, System.EventArgs e)
        {
            this.Report.Size = new System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
            this.Size        = new System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
            string dir = System.IO.Directory.GetCurrentDirectory();

            //
            bAdminHethong = d.bAdmin(d_userid);
            i_nhom        = get_nhomkho();
            if (!bAdminHethong && d.bUserthuong_CamxuatExcel_E11(i_nhom))
            {
                butExcel.Enabled        = false;
                Report.ShowExportButton = false;
            }
            //
            ExportPath = "";
            int j = 0;

            for (int i = 0; i < dir.Length; i++)
            {
                if (dir.Substring(i, 1) == "\\")
                {
                    j++;
                }
                if (j == 2)
                {
                    break;
                }
                ExportPath += dir.Substring(i, 1);
            }
            ExportPath += "\\pdf\\";
            if (!System.IO.Directory.Exists(ExportPath))
            {
                System.IO.Directory.CreateDirectory(ExportPath);
            }
            s_dirreport    = get_dirreport(56);       //doc thu muc report cua tung benh vien
            i_soluong_le   = d.d_soluong_le(i_nhom);
            i_dongia_le    = d.d_dongia_le(i_nhom);
            i_thanhtien_le = d.d_thanhtien_le(i_nhom);
            //
            if (b_bienlai)
            {
                Bienlai();
            }
            else if (ReportFile.ToString().ToLower() == "d_phieunhap.rpt")
            {
                Phieunhap();
            }
            else if (bDs)
            {
                Reportds();
            }
            else if (msg != "")
            {
                treem();
            }
            else
            {
                PreviewReport();
            }
        }