DashboardCryptoProvider provider = newDashboardCryptoProvider(EncryptionTypes.AES);
Connection D1C1 = new Connection { DataSources = newList<DataSourceConnectionString>() };
D1C1.DataSources.Add(new DataSourceConnectionString
{
Name = "DataSource1",
ConnectionString = "Data Source = .; Trusted_Connection = true; Initial Catalog = North; MultipleActiveResultSets = True"
});
ViewBag.Dashboard1DS1 = provider.DoEncryption(Converter.SerializeObject(D1C1)); |
dashboardObj.model.onApplyConnection = 'modifyConnectionString1';
function modifyConnectionString1(e) {
var changestring = '@ViewBag.Dashboard1DS1';
e.data.modifiedConnectionStrings = JSON.stringify(changestring);
} |