Esempio n. 1
0
        public DataTable GetRptCriteria(Int32 rowsExpected, string GenPrefix, Int32 reportId, Int32 usrId, string dbConnectionString, string dbPassword)
        {
            DataTable dt = null;

            using (SqlReportAccessBase dac = GetSqlReportAccess())
            {
                dt = dac.GetRptCriteria(GenPrefix, reportId, usrId, dbConnectionString, dbPassword);
            }
            if (dt.Rows.Count != rowsExpected)
            {
                using (SqlReportAccessBase dac = GetSqlReportAccess())
                {
                    dac.DelRptCriteria(GenPrefix, reportId, usrId, dbConnectionString, dbPassword);
                    dac.IniRptCriteria(GenPrefix, reportId, usrId, dbConnectionString, dbPassword);
                    dt = dac.GetRptCriteria(GenPrefix, reportId, usrId, dbConnectionString, dbPassword);
                }
            }
            return(dt);
        }