private void BtnOk_OnClick(object sender, RoutedEventArgs e) { _cls.ClsConnect(); try { #region int thamso = 1; 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"); } _dt = _cls.LoadDataProcPara("usp_CtCanDoi", bien, giatri, thamso); if (_dt.Rows.Count > 0) { rpt_CtCanDoi rpt = new rpt_CtCanDoi(); RPUtility.ShowRp(rpt, _dt, this, srv.DbSourceSerVer(), srv.DbNameSerVer(), srv.DbUserSerVer(), srv.DbPassSerVer()); } else { MessageBox.Show("Chưa có số liệu ngày ", "Thông báo", MessageBoxButton.OK, MessageBoxImage.Warning); } #endregion } catch (Exception ex) { MessageBox.Show("Error" + ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error); } _cls.DongKetNoi(); }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { rpt_CtCanDoi rpt = new rpt_CtCanDoi(); rpt.Site = this.Site; return(rpt); }