Skip to content

Commit

Permalink
Merge pull request #74 from EPTamminga/Base_6x_Updates
Browse files Browse the repository at this point in the history
Base 6x updates
  • Loading branch information
EPTamminga authored Apr 13, 2021
2 parents 3ed0cc6 + d98f6e8 commit c3c79ef
Show file tree
Hide file tree
Showing 37 changed files with 551 additions and 507 deletions.
Binary file modified .references/DotNetNuke.Modules.RazorHost.dll
Binary file not shown.
Binary file added .references/DotNetNuke.Web.Client.dll
Binary file not shown.
Binary file added .references/DotNetNuke.Web.Razor.dll
Binary file not shown.
Binary file modified .references/DotNetNuke.WebUtility.dll
Binary file not shown.
Binary file added .references/DotNetNuke.dll
Binary file not shown.
12 changes: 6 additions & 6 deletions Components/Converters/ConverterInstanceInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public class ConverterInstanceInfo
/// -----------------------------------------------------------------------------
public string FieldName
{
get { return _FieldName; }
set { _FieldName = value; }
get { return this._FieldName; }
set { this._FieldName = value; }
}

/// -----------------------------------------------------------------------------
Expand All @@ -78,8 +78,8 @@ public string FieldName
/// -----------------------------------------------------------------------------
public string ConverterName
{
get { return _ConverterName; }
set { _ConverterName = value; }
get { return this._ConverterName; }
set { this._ConverterName = value; }
}

/// -----------------------------------------------------------------------------
Expand All @@ -92,8 +92,8 @@ public string ConverterName
/// -----------------------------------------------------------------------------
public string[] Arguments
{
get { return _Arguments; }
set { _Arguments = value; }
get { return this._Arguments; }
set { this._Arguments = value; }
}

#endregion
Expand Down
12 changes: 6 additions & 6 deletions Components/Data/DataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
#endregion


using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using DotNetNuke.Framework;
using DotNetNuke.Modules.Reports.Visualizers.Xslt;

namespace DotNetNuke.Modules.Reports.Data
{
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using DotNetNuke.Framework;
using DotNetNuke.Modules.Reports.Visualizers.Xslt;

/// -----------------------------------------------------------------------------
/// <summary>
/// Provides an abstract base class for Reports Data Providers
Expand Down
64 changes: 32 additions & 32 deletions Components/Data/SqlDataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@
#endregion


using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Transactions;
using Components;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Framework.Providers;
using DotNetNuke.Modules.Reports.Visualizers.Xslt;
using Microsoft.ApplicationBlocks.Data;

namespace DotNetNuke.Modules.Reports.Data
{
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Transactions;
using Components;
using DotNetNuke.Common.Utilities;
using DotNetNuke.Framework.Providers;
using DotNetNuke.Modules.Reports.Visualizers.Xslt;
using Microsoft.ApplicationBlocks.Data;

/// -----------------------------------------------------------------------------
/// <summary>
/// Implements the Reports Data Provider on Microsoft SQL Server
Expand All @@ -52,36 +52,36 @@ public class SqlDataProvider : DataProvider

public SqlDataProvider()
{
_providerConfiguration = ProviderConfiguration.GetProviderConfiguration(ReportsConstants.ProviderType);
this._providerConfiguration = ProviderConfiguration.GetProviderConfiguration(ReportsConstants.ProviderType);


// Read the configuration specific information for this provider
var objProvider =
(Provider) _providerConfiguration.Providers[_providerConfiguration.DefaultProvider];
(Provider) this._providerConfiguration.Providers[this._providerConfiguration.DefaultProvider];

// Read the attributes for this provider

//Get Connection string from web.config
_connectionString = Config.GetConnectionString();
this._connectionString = Config.GetConnectionString();

if (string.IsNullOrEmpty(_connectionString))
if (string.IsNullOrEmpty(this._connectionString))
{
// Use connection string specified in provider
_connectionString = objProvider.Attributes["connectionString"];
this._connectionString = objProvider.Attributes["connectionString"];
}

_providerPath = objProvider.Attributes["providerPath"];
this._providerPath = objProvider.Attributes["providerPath"];

_objectQualifier = objProvider.Attributes["objectQualifier"];
if (!string.IsNullOrEmpty(_objectQualifier) && _objectQualifier.EndsWith("_") == false)
this._objectQualifier = objProvider.Attributes["objectQualifier"];
if (!string.IsNullOrEmpty(this._objectQualifier) && this._objectQualifier.EndsWith("_") == false)
{
_objectQualifier += "_";
this._objectQualifier += "_";
}

_databaseOwner = objProvider.Attributes["databaseOwner"];
if (!string.IsNullOrEmpty(_databaseOwner) && _databaseOwner.EndsWith(".") == false)
this._databaseOwner = objProvider.Attributes["databaseOwner"];
if (!string.IsNullOrEmpty(this._databaseOwner) && this._databaseOwner.EndsWith(".") == false)
{
_databaseOwner += ".";
this._databaseOwner += ".";
}
}

Expand All @@ -97,14 +97,14 @@ public override IDataReader ExecuteSQL(string strScript, params DbParameter[] pa
// HACK: Copy-pasted from Core SqlDataProvider - core doesn't provide a system for parameterized dynamic sql

// TODO: Switch to Regex and use IgnoreCase (punting this fix in 5.1 due to testing burden)
strScript = strScript.Replace("{databaseOwner}", _databaseOwner);
strScript = strScript.Replace("{dO}", _databaseOwner);
strScript = strScript.Replace("{do}", _databaseOwner);
strScript = strScript.Replace("{Do}", _databaseOwner);
strScript = strScript.Replace("{objectQualifier}", _objectQualifier);
strScript = strScript.Replace("{oq}", _objectQualifier);
strScript = strScript.Replace("{oQ}", _objectQualifier);
strScript = strScript.Replace("{Oq}", _objectQualifier);
strScript = strScript.Replace("{databaseOwner}", this._databaseOwner);
strScript = strScript.Replace("{dO}", this._databaseOwner);
strScript = strScript.Replace("{do}", this._databaseOwner);
strScript = strScript.Replace("{Do}", this._databaseOwner);
strScript = strScript.Replace("{objectQualifier}", this._objectQualifier);
strScript = strScript.Replace("{oq}", this._objectQualifier);
strScript = strScript.Replace("{oQ}", this._objectQualifier);
strScript = strScript.Replace("{Oq}", this._objectQualifier);

// Convert the db parameters to sql parameters
var sqlParams = new SqlParameter[parameters.Length];
Expand All @@ -113,7 +113,7 @@ public override IDataReader ExecuteSQL(string strScript, params DbParameter[] pa
sqlParams[i] = (SqlParameter) parameters[i];
}

return SqlHelper.ExecuteReader(_connectionString, CommandType.Text, strScript, sqlParams);
return SqlHelper.ExecuteReader(this._connectionString, CommandType.Text, strScript, sqlParams);
}

public override IDataReader GetXsltExtensionObjects(int tabModuleId)
Expand Down
72 changes: 36 additions & 36 deletions Components/ReportInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace DotNetNuke.Modules.Reports
{
using System;
using System.Collections.Generic;
using Converters;
using DotNetNuke.Modules.Reports.Converters;

/// -----------------------------------------------------------------------------
/// <summary>
Expand Down Expand Up @@ -86,8 +86,8 @@ public class ReportInfo
/// -----------------------------------------------------------------------------
public int ModuleID
{
get { return _ModuleID; }
set { _ModuleID = value; }
get { return this._ModuleID; }
set { this._ModuleID = value; }
}

/// -----------------------------------------------------------------------------
Expand All @@ -101,8 +101,8 @@ public int ModuleID
/// -----------------------------------------------------------------------------
public string Title
{
get { return _Title; }
set { _Title = value; }
get { return this._Title; }
set { this._Title = value; }
}

/// -----------------------------------------------------------------------------
Expand All @@ -116,8 +116,8 @@ public string Title
/// -----------------------------------------------------------------------------
public string Description
{
get { return _Description; }
set { _Description = value; }
get { return this._Description; }
set { this._Description = value; }
}

/// -----------------------------------------------------------------------------
Expand All @@ -131,8 +131,8 @@ public string Description
/// -----------------------------------------------------------------------------
public string Parameters
{
get { return _Parameters; }
set { _Parameters = value; }
get { return this._Parameters; }
set { this._Parameters = value; }
}

/// -----------------------------------------------------------------------------
Expand All @@ -146,8 +146,8 @@ public string Parameters
/// -----------------------------------------------------------------------------
public int CacheDuration
{
get { return _CacheDuration; }
set { _CacheDuration = value; }
get { return this._CacheDuration; }
set { this._CacheDuration = value; }
}

/// -----------------------------------------------------------------------------
Expand All @@ -161,8 +161,8 @@ public int CacheDuration
/// -----------------------------------------------------------------------------
public int CreatedBy
{
get { return _CreatedBy; }
set { _CreatedBy = value; }
get { return this._CreatedBy; }
set { this._CreatedBy = value; }
}

/// -----------------------------------------------------------------------------
Expand All @@ -176,8 +176,8 @@ public int CreatedBy
/// -----------------------------------------------------------------------------
public DateTime CreatedOn
{
get { return _CreatedOn; }
set { _CreatedOn = value; }
get { return this._CreatedOn; }
set { this._CreatedOn = value; }
}

/// -----------------------------------------------------------------------------
Expand All @@ -189,7 +189,7 @@ public DateTime CreatedOn
/// [anurse] 10/13/2007 Created
/// </history>
/// -----------------------------------------------------------------------------
public IDictionary<string, IList<ConverterInstanceInfo>> Converters => _Converters;
public IDictionary<string, IList<ConverterInstanceInfo>> Converters => this._Converters;

/// -----------------------------------------------------------------------------
/// <summary>
Expand All @@ -202,8 +202,8 @@ public DateTime CreatedOn
/// -----------------------------------------------------------------------------
public string DataSource
{
get { return _DataSource; }
set { _DataSource = value; }
get { return this._DataSource; }
set { this._DataSource = value; }
}

/// -----------------------------------------------------------------------------
Expand All @@ -217,8 +217,8 @@ public string DataSource
/// -----------------------------------------------------------------------------
public string DataSourceClass
{
get { return _DataSourceClass; }
set { _DataSourceClass = value; }
get { return this._DataSourceClass; }
set { this._DataSourceClass = value; }
}

/// -----------------------------------------------------------------------------
Expand All @@ -232,8 +232,8 @@ public string DataSourceClass
/// -----------------------------------------------------------------------------
public Dictionary<string, string> DataSourceSettings
{
get { return _DataSourceSettings; }
set { _DataSourceSettings = value; }
get { return this._DataSourceSettings; }
set { this._DataSourceSettings = value; }
}

/// -----------------------------------------------------------------------------
Expand All @@ -247,8 +247,8 @@ public Dictionary<string, string> DataSourceSettings
/// -----------------------------------------------------------------------------
public string Visualizer
{
get { return _Visualizer; }
set { _Visualizer = value; }
get { return this._Visualizer; }
set { this._Visualizer = value; }
}

/// -----------------------------------------------------------------------------
Expand All @@ -262,8 +262,8 @@ public string Visualizer
/// -----------------------------------------------------------------------------
public Dictionary<string, string> VisualizerSettings
{
get { return _VisualizerSettings; }
set { _VisualizerSettings = value; }
get { return this._VisualizerSettings; }
set { this._VisualizerSettings = value; }
}

/// -----------------------------------------------------------------------------
Expand All @@ -276,8 +276,8 @@ public Dictionary<string, string> VisualizerSettings
/// -----------------------------------------------------------------------------
public bool ShowInfoPane
{
get { return _ShowInfoPane; }
set { _ShowInfoPane = value; }
get { return this._ShowInfoPane; }
set { this._ShowInfoPane = value; }
}

/// -----------------------------------------------------------------------------
Expand All @@ -290,8 +290,8 @@ public bool ShowInfoPane
/// -----------------------------------------------------------------------------
public bool ShowControls
{
get { return _ShowControls; }
set { _ShowControls = value; }
get { return this._ShowControls; }
set { this._ShowControls = value; }
}

/// -----------------------------------------------------------------------------
Expand All @@ -305,8 +305,8 @@ public bool ShowControls
/// -----------------------------------------------------------------------------
public bool AutoRunReport
{
get { return _AutoRunReport; }
set { _AutoRunReport = value; }
get { return this._AutoRunReport; }
set { this._AutoRunReport = value; }
}

/// -----------------------------------------------------------------------------
Expand All @@ -320,8 +320,8 @@ public bool AutoRunReport
/// -----------------------------------------------------------------------------
public bool ExportExcel
{
get { return _ExportExcel; }
set { _ExportExcel = value; }
get { return this._ExportExcel; }
set { this._ExportExcel = value; }
}


Expand All @@ -331,8 +331,8 @@ public bool ExportExcel
/// <value><c>true</c> if [token replace]; otherwise, <c>false</c>.</value>
public bool TokenReplace
{
get { return _TokenReplace; }
set { _TokenReplace = value; }
get { return this._TokenReplace; }
set { this._TokenReplace = value; }
}

#endregion
Expand Down
4 changes: 2 additions & 2 deletions Components/ReportsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ namespace DotNetNuke.Modules.Reports
/// [anurse] 06/16/2006 Created
/// </history>
/// -----------------------------------------------------------------------------
[DNNtc.BusinessControllerClass]
public class ReportsController : ModuleSearchBase, IPortable
{
#region Friend Methods
Expand Down Expand Up @@ -714,8 +715,7 @@ private static void UpdateReportView(ModuleController ctrl, int TabModuleId, Rep
reportsModuleSettings.ShowControls = objReport.ShowControls;
reportsModuleSettings.AutoRunReport = objReport.AutoRunReport;
reportsModuleSettings.ExportExcel = objReport.ExportExcel;
reportsModuleSettings.TokenReplace = objReport.TokenReplace;
reportsModuleSettings.CacheDuration = objReport.CacheDuration;
reportsModuleSettings.TokenReplace = objReport.TokenReplace;

//Update the visualizer setting
reportsModuleSettings.Visualizer = objReport.Visualizer;
Expand Down
2 changes: 1 addition & 1 deletion Components/ReportsModuleSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class ReportsModuleSettings
public string Visualizers { get; set; } = string.Empty;

[TabModuleSetting(Prefix = "dnn_Reports_")]
public int CacheDuration { get; set; } = 0;
public int CacheDuration { get; set; }

[TabModuleSetting(Prefix = "dnn_Reports_")]
public string Visualizer { get; set; } = string.Empty;
Expand Down
Loading

0 comments on commit c3c79ef

Please sign in to comment.