public static DataTable GetDefaultModuleSettingsForModule(int moduleId) { StringBuilder sqlCommand = new StringBuilder(); sqlCommand.Append("SELECT "); sqlCommand.Append("m.ModuleID, "); sqlCommand.Append("m.Guid AS ModuleGuid, "); sqlCommand.Append("ds.SettingName, "); sqlCommand.Append("ds.SettingValue, "); sqlCommand.Append("ds.ControlType, "); sqlCommand.Append("ds.ControlSrc, "); sqlCommand.Append("ds.HelpKey, "); sqlCommand.Append("ds.SortOrder, "); sqlCommand.Append("ds.RegexValidationExpression "); sqlCommand.Append("FROM cy_Modules m "); sqlCommand.Append("JOIN cy_ModuleDefinitionSettings ds "); sqlCommand.Append("ON ds.ModuleDefID = m.ModuleDefID "); sqlCommand.Append("WHERE m.ModuleID = :ModuleID "); sqlCommand.Append("ORDER BY ds.ID ;"); SqliteParameter[] arParams = new SqliteParameter[1]; arParams[0] = new SqliteParameter(":ModuleID", DbType.Int32); arParams[0].Direction = ParameterDirection.Input; arParams[0].Value = moduleId; IDataReader reader = SqliteHelper.ExecuteReader( GetConnectionString(), sqlCommand.ToString(), arParams); return(DBPortal.GetTableFromDataReader(reader)); }
/// <summary> /// Gets an IDataReader with all rows in the cy_IndexingQueue table. /// </summary> public static DataTable GetIndexPaths() { StringBuilder sqlCommand = new StringBuilder(); sqlCommand.Append("SELECT DISTINCT IndexPath "); sqlCommand.Append("FROM cy_IndexingQueue "); sqlCommand.Append("ORDER BY IndexPath "); sqlCommand.Append(";"); IDataReader reader = SqliteHelper.ExecuteReader( GetConnectionString(), sqlCommand.ToString(), null); return(DBPortal.GetTableFromDataReader(reader)); }