Beispiel #1
0
 private void btnOk_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         ServerInfor srv = new ServerInfor();
         cls.ClsConnect();
         int      thamso = 2;
         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);
         dt        = cls.LoadDataProcPara("usp_Khtc03", bien, giatri, thamso);
         if (dt.Rows.Count > 0)
         {
             rpt_khtc03 rpt = new rpt_khtc03();
             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();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Lổi " + ex.Message, "Mess");
     }
 }
Beispiel #2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rpt_khtc03 rpt = new rpt_khtc03();

            rpt.Site = this.Site;
            return(rpt);
        }