using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace DevadminDAL.Query.ReportFormat { public static class ReportFormatQB { public const string GET_SELECTLIST_REPORTFORMAT_SQL = @" WITH ReportFormat AS ( SELECT rf.REPORTFORMATID AS ReportFormatId, rf.REPORTFORMATCODE AS ReportFormatCode, rf.REPORTFORMATNAME AS ReportFormatName, rf.REPORTFILE AS ReportFormatReportFile, rf.ISOREFERENCENUMBER AS ReportFormatISOReferenceNumber, ROW_NUMBER() OVER (ORDER BY rf.REPORTFORMATID) AS RowNum FROM MREPORTFORMAT rf WHERE rf.STATUS = 1 AND (@reportformatname IS NULL OR rf.REPORTFORMATNAME LIKE '%' + @reportformatname + '%') ) SELECT ReportFormatId, ReportFormatCode, ReportFormatName, ReportFormatReportFile, ReportFormatISOReferenceNumber FROM ReportFormat WHERE (@firstnumber = -1 AND @maxresult = -1) OR (RowNum BETWEEN @firstnumber AND @maxresult); "; public const string GET_SELECTLIST_REPORTFORMAT_PG = @" WITH ReportFormat AS ( SELECT rf.REPORTFORMATID AS ""ReportFormatId"", rf.REPORTFORMATCODE AS ""ReportFormatCode"", rf.REPORTFORMATNAME AS ""ReportFormatName"", rf.REPORTFILE AS ""ReportFormatReportFile"", rf.ISOREFERENCENUMBER AS ""ReportFormatISOReferenceNumber"", ROW_NUMBER() OVER (ORDER BY rf.REPORTFORMATID) AS ""RowNum"" FROM MREPORTFORMAT rf WHERE rf.STATUS = 1 AND (:reportformatname IS NULL OR rf.REPORTFORMATNAME ILIKE '%' || :reportformatname || '%') ) SELECT ""ReportFormatId"", ""ReportFormatCode"", ""ReportFormatName"", ""ReportFormatReportFile"", ""ReportFormatISOReferenceNumber"" FROM ReportFormat WHERE (:firstnumber = -1 AND :maxresult = -1) OR (""RowNum"" BETWEEN :firstnumber AND :maxresult); "; public const string GET_SELECTLIST_REPORTFORMAT_ORACLE = @";"; public const string GET_SELECTLIST_REPORTFORMAT_MYSQL = @";"; } }