public static DataTable GetSiteIDs() { StringBuilder sqlCommand = new StringBuilder(); sqlCommand.Append("SELECT DISTINCT SiteID "); sqlCommand.Append("FROM mp_IndexingQueue "); sqlCommand.Append("ORDER BY SiteID "); sqlCommand.Append(";"); IDataReader reader = MySqlHelper.ExecuteReader( ConnectionString.GetReadConnectionString(), sqlCommand.ToString(), null); return(DBPortal.GetTableFromDataReader(reader)); }
public static DataTable GetSiteIDs() { StringBuilder sqlCommand = new StringBuilder(); sqlCommand.Append("SELECT DISTINCT SiteID "); sqlCommand.Append("FROM mp_IndexingQueue "); sqlCommand.Append("ORDER BY "); sqlCommand.Append("SiteID "); sqlCommand.Append(";"); return(DBPortal.GetTableFromDataReader(SqlHelper.ExecuteReader( GetConnectionString(), CommandType.Text, sqlCommand.ToString(), null))); }
/// <summary> /// Gets an IDataReader with all rows in the mp_IndexingQueue table. /// </summary> public static DataTable GetIndexPaths() { StringBuilder sqlCommand = new StringBuilder(); sqlCommand.Append("SELECT DISTINCT indexpath "); sqlCommand.Append("FROM mp_indexingqueue "); sqlCommand.Append("ORDER BY indexpath "); sqlCommand.Append(";"); IDataReader reader = NpgsqlHelper.ExecuteReader( ConnectionString.GetReadConnectionString(), CommandType.Text, sqlCommand.ToString(), null); return(DBPortal.GetTableFromDataReader(reader)); }
private 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.GroupName, "); sqlCommand.Append("ds.RegexValidationExpression "); sqlCommand.Append("FROM mp_Modules m "); sqlCommand.Append("JOIN mp_ModuleDefinitionSettings ds "); sqlCommand.Append("ON ds.ModuleDefID = m.ModuleDefID "); sqlCommand.Append("WHERE m.ModuleID = @ModuleID "); sqlCommand.Append("ORDER BY ds.SortOrder, ds.GroupName ;"); SqlCeParameter[] arParams = new SqlCeParameter[1]; arParams[0] = new SqlCeParameter("@ModuleID", SqlDbType.Int); arParams[0].Direction = ParameterDirection.Input; arParams[0].Value = moduleId; IDataReader reader = SqlHelper.ExecuteReader( GetConnectionString(), CommandType.Text, sqlCommand.ToString(), arParams); return(DBPortal.GetTableFromDataReader(reader)); }
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.groupname, "); sqlCommand.Append("ds.regexvalidationexpression "); sqlCommand.Append("FROM mp_modules m "); sqlCommand.Append("JOIN mp_moduledefinitionSettings ds "); sqlCommand.Append("ON ds.moduledefid = m.moduledefid "); sqlCommand.Append("WHERE m.moduleid = :moduleid "); sqlCommand.Append("ORDER BY ds.sortorder, ds.groupname ;"); NpgsqlParameter[] arParams = new NpgsqlParameter[1]; arParams[0] = new NpgsqlParameter("moduleid", NpgsqlTypes.NpgsqlDbType.Integer); arParams[0].Direction = ParameterDirection.Input; arParams[0].Value = moduleId; IDataReader reader = NpgsqlHelper.ExecuteReader( ConnectionString.GetReadConnectionString(), CommandType.Text, sqlCommand.ToString(), arParams); return(DBPortal.GetTableFromDataReader(reader)); }
public static DataTable GetBySite(int siteId) { StringBuilder sqlCommand = new StringBuilder(); sqlCommand.Append("SELECT * "); sqlCommand.Append("FROM mp_IndexingQueue "); sqlCommand.Append("WHERE "); sqlCommand.Append("[SiteID] = @SiteID "); sqlCommand.Append("ORDER BY "); sqlCommand.Append("RowId "); sqlCommand.Append(";"); SqlCeParameter[] arParams = new SqlCeParameter[1]; arParams[0] = new SqlCeParameter("@SiteID", SqlDbType.Int); arParams[0].Direction = ParameterDirection.Input; arParams[0].Value = siteId; return(DBPortal.GetTableFromDataReader(SqlHelper.ExecuteReader( GetConnectionString(), CommandType.Text, sqlCommand.ToString(), arParams))); }
/// <summary> /// Gets an DataTable with rows from the mp_IndexingQueue table with the passed path. /// </summary> public static DataTable GetByPath(string indexPath) { StringBuilder sqlCommand = new StringBuilder(); sqlCommand.Append("SELECT * "); sqlCommand.Append("FROM mp_IndexingQueue "); sqlCommand.Append("WHERE "); sqlCommand.Append("[IndexPath] = @IndexPath "); sqlCommand.Append("ORDER BY "); sqlCommand.Append("RowId "); sqlCommand.Append(";"); SqlCeParameter[] arParams = new SqlCeParameter[1]; arParams[0] = new SqlCeParameter("@IndexPath", SqlDbType.NVarChar, 255); arParams[0].Direction = ParameterDirection.Input; arParams[0].Value = indexPath; return(DBPortal.GetTableFromDataReader(SqlHelper.ExecuteReader( GetConnectionString(), CommandType.Text, sqlCommand.ToString(), arParams))); }
private static String GetConnectionString() { return(DBPortal.GetConnectionString()); }
public static String GetConnectionString() { return(DBPortal.GetConnectionString()); }