Exemplo n.º 1
0
        public DataTable GetMemCri(string GenPrefix, byte rowsExpected, string reportId, string MemCriId, string dbConnectionString, string dbPassword)
        {
            DataTable dt = null;

            using (SqlReportAccessBase dac = GetSqlReportAccess())
            {
                dt = dac.GetMemCri(GenPrefix, reportId, MemCriId, dbConnectionString, dbPassword);
            }
            if (dt.Rows.Count != rowsExpected)
            {
                using (SqlReportAccessBase dac = GetSqlReportAccess())
                {
                    dac.DelMemCri(GenPrefix, reportId, MemCriId, "N", dbConnectionString, dbPassword);
                    dac.IniMemCri(GenPrefix, reportId, MemCriId, dbConnectionString, dbPassword);
                    dt = dac.GetMemCri(GenPrefix, reportId, MemCriId, dbConnectionString, dbPassword);
                }
            }
            return(dt);
        }