public IEnumerable <ReportDetail> GetRSReport(DateTime startDate, DateTime endDate, string orgCodes, string reportTypes, string reportName, int pageNo, int pageSize, out int total) { var dbHelper = new OracleDBHelper(FileDBConStr); var parameters = new[] { new OracleParameter("I_REPORTNAME", OracleDbType.NVarchar2) { Value = reportName }, new OracleParameter("I_INSTITUTIONINFOCODE", OracleDbType.Varchar2) { Value = orgCodes }, new OracleParameter("I_REPORTTYPE", OracleDbType.NVarchar2) { Value = reportTypes }, new OracleParameter("I_STARTDATE", OracleDbType.TimeStamp) { Value = (OracleTimeStamp)startDate }, new OracleParameter("I_ENDDATE", OracleDbType.TimeStamp) { Value = (OracleTimeStamp)endDate }, new OracleParameter("I_CULTRURENAME", OracleDbType.NVarchar2) { Value = Thread.CurrentThread.CurrentUICulture.Name }, new OracleParameter("I_PAGENO", OracleDbType.Int32) { Value = pageNo }, new OracleParameter("I_PAGESIZE", OracleDbType.Int32) { Value = pageSize }, new OracleParameter("O_TOTAL", OracleDbType.Int32) { Direction = ParameterDirection.Output }, new OracleParameter("O_CUR", OracleDbType.RefCursor) { Direction = ParameterDirection.Output } }; object outValue; var dt = dbHelper.GetDataSetBySp("FILEDETAIL_REPORTSEARCH", parameters, "O_TOTAL", out outValue).Tables[0]; total = string.IsNullOrEmpty(outValue.ToString()) ? 0 : Convert.ToInt32(outValue.ToString()); var result = (from DataRow row in dt.Rows select new ReportDetail { FileId = Convert.ToInt32(row["FILEID"]), DisplayName = Thread.CurrentThread.CurrentUICulture.Name == "zh-CN" ? row["FILENAMECN"].ToString() : row["FILENAMEEN"].ToString(), FileTypeCode = row["FILENAMEEN"].ToString(), //english name as code FileType = Thread.CurrentThread.CurrentUICulture.Name == "zh-CN" ? row["FILETYPECN"].ToString() : row["FILETYPEEN"].ToString(), InstitutionName = Thread.CurrentThread.CurrentUICulture.Name == "zh-CN" ? row["INSTITUTIONNAMECN"].ToString() : row["INSTITUTIONNAMEEN"].ToString(), InstitutionInfoCode = row["INSTITUTIONINFOCODE"].ToString(), ReportDate = Convert.ToDateTime(row["REPORTDATE"]), DisplayDate = ((DateTime)row["REPORTDATE"]).ToString("yyyy-MM-dd"), Author = row["AUTHOR"].ToString(), Ext = row["EXTENSION"].ToString() }).ToList(); return(result); }