Esempio n. 1
0
        public fZRZ_Final(CDBAgent dbAgent)
        {
            InitializeComponent();
            this.WindowState = FormWindowState.Maximized;
            try
            {
                dbAgent.ConnectOpen();

                string sql = "SELECT custname,enddate,amt from contractout where busikind='0' and status='2'";
                ds = dbAgent.DataSetQuery(sql);
                dt = ds.Tables[0];

                this.rvReport.LocalReport.ReportPath = @"Reports\rpt_ZRZ_Final.rdlc";
                this.rvReport.LocalReport.DataSources.Clear();
                this.rvReport.LocalReport.DataSources.Add(new ReportDataSource("ZRZ_Final_DataSet", dt));

                this.rvReport.RefreshReport();
            }
            catch (Exception ex)
            {
                DialogResult eMsg = MessageBox.Show(ex.ToString(), "错误提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 2
0
        public fZRZ_Order_Corp(CDBAgent dbAgent)
        {
            InitializeComponent();
            this.WindowState = FormWindowState.Maximized;
            DisplaySet();
            try
            {
                dbAgent.ConnectOpen();

                string sql = "select custname,(orderamt/10000) as orderamt,(allocateamt/10000) as allocateamt,market from creditorderrec where busikind='0' and orderstatus in ('0','2','3','A') order by custname ";
                ds = dbAgent.DataSetQuery(sql);
                dt = ds.Tables[0];

                this.reportViewer1.LocalReport.ReportPath = @"Reports\rpt_ZRZ_Order.rdlc";
                this.reportViewer1.LocalReport.DataSources.Clear();
                this.reportViewer1.LocalReport.DataSources.Add(new ReportDataSource("ZRZ_Order_DataSet", dt));

                this.reportViewer1.RefreshReport();
            }
            catch (Exception ex)
            {
                DialogResult eMsg = MessageBox.Show(ex.ToString(), "错误提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }