コード例 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rpt_Khtc01 rpt = new rpt_Khtc01();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
ファイル: WpfKhtc01.xaml.cs プロジェクト: tutmvbsp/vbspinfor
        private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            // MessageBox.Show(BienBll.Ndma);
            ServerInfor srv = new ServerInfor();

            _cls.ClsConnect();
            int thamso = 3;

            string[] bien   = new string[thamso];
            object[] giatri = new object[thamso];
            bien[0] = "@Ngay";
            if (dtpNgay.SelectedDate != null)
            {
                giatri[0] = dtpNgay.SelectedDate.Value.ToString("yyyy-MM-dd");
            }
            bien[1]   = "@MaPos";
            giatri[1] = _str.Left(cboPos.SelectedValue.ToString().Trim(), 6);
            string mau = "";

            if (ration1.IsChecked == true)
            {
                mau = "1";
            }
            else if (ration2.IsChecked == true)
            {
                mau = "2";
            }
            else if (ration3.IsChecked == true)
            {
                mau = "3";
            }
            else
            {
                mau = "4";
            }
            bien[2]   = "@Mau";
            giatri[2] = mau;
            _dt       = _cls.LoadDataProcPara("usp_Khtc01", bien, giatri, thamso);
            if (_dt.Rows.Count > 0)
            {
                rpt_Khtc01 rpt = new rpt_Khtc01();
                RPUtility.ShowRp(rpt, _dt, this, srv.DbSourceSerVer(), srv.DbNameSerVer(), srv.DbUserSerVer(), srv.DbPassSerVer());
            }
            else
            {
                MessageBox.Show("Chưa có số liệu", "Thông báo");
            }
            _cls.DongKetNoi();
        }