Maximize productivity with
30% off* for a limited time
using BOOSTDEV30.
Includes 3- and 5-packs.
*Some exclusions may apply.New Product LaunchBoldDesk: Help desk ticketing software starts at $10 for 3 agents.
Try it for free.
{
ConnectionStringBuilder obj = new ConnectionStringBuilder();
DashboardCryptoProvider provider = new DashboardCryptoProvider(EncryptionType.AES);
ConnectionParameters connectionParameter = new ConnectionParameters
{
Url : "", // Pass the web datasource url
UserName: "",
Password: "",
};
ConnectionProviderType connectionType = ConnectionProviderType.WebDataConnector; // Connection type used in the dashboard
OdbcDbmsType odbcType = OdbcDbmsType.None; // ODBC DBMS type, if any
Connection connectionName = new Connection { DataSources = new List<DataSourceConnectionString>() };
connectionName.DataSources.Add(new DataSourceConnectionString
{
Name = "Northwind Traders Sales Analysis", // Nane of the Data Source while designing the Dashboard in the Dashboard Designer
ConnectionString = obj.GenerateConnectionString(connectionParameter, connectionType, odbcType)
});
ViewBag.EncryptedString = provider.DoEncryption(Converter.SerializeObject(connectionName)); // You can pass the encrypted String in the onApplyConnection event API to change the change connection String
} |