renamed SQL property "DomainName" to "Domain" for consistency reasons

This commit is contained in:
Faryan Rezagholi
2020-06-09 16:25:15 +02:00
parent 57018bfba7
commit 46e5d8e669
5 changed files with 8 additions and 8 deletions

View File

@@ -85,7 +85,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
connectionInfo.Icon = (string)dataRow["Icon"];
connectionInfo.Panel = (string)dataRow["Panel"];
connectionInfo.Username = (string)dataRow["Username"];
connectionInfo.Domain = (string)dataRow["DomainName"];
connectionInfo.Domain = (string)dataRow["Domain"];
connectionInfo.Password = DecryptValue((string)dataRow["Password"]);
connectionInfo.Hostname = (string)dataRow["Hostname"];
connectionInfo.VmId = (string)dataRow["VmId"];

View File

@@ -106,7 +106,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
dataTable.Columns.Add("Icon", typeof(string));
dataTable.Columns.Add("Panel", typeof(string));
dataTable.Columns.Add("Username", typeof(string));
dataTable.Columns.Add("DomainName", typeof(string));
dataTable.Columns.Add("Domain", typeof(string));
dataTable.Columns.Add("Password", typeof(string));
dataTable.Columns.Add("Hostname", typeof(string));
dataTable.Columns.Add("Port", typeof(int));
@@ -266,7 +266,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
dataRow["Icon"].Equals(connectionInfo.Icon) &&
dataRow["Panel"].Equals(connectionInfo.Panel) &&
dataRow["Username"].Equals(_saveFilter.SaveUsername ? connectionInfo.Username : "") &&
dataRow["DomainName"].Equals(_saveFilter.SaveDomain ? connectionInfo.Domain : "");
dataRow["Domain"].Equals(_saveFilter.SaveDomain ? connectionInfo.Domain : "");
isFieldNotChange = isFieldNotChange && dataRow["Hostname"].Equals(connectionInfo.Hostname);
isFieldNotChange = isFieldNotChange && dataRow["VmId"].Equals(connectionInfo.VmId);
@@ -514,7 +514,7 @@ namespace mRemoteNG.Config.Serializers.MsSql
dataRow["Icon"] = connectionInfo.Icon;
dataRow["Panel"] = connectionInfo.Panel;
dataRow["Username"] = _saveFilter.SaveUsername ? connectionInfo.Username : "";
dataRow["DomainName"] = _saveFilter.SaveDomain ? connectionInfo.Domain : "";
dataRow["Domain"] = _saveFilter.SaveDomain ? connectionInfo.Domain : "";
dataRow["Password"] = _saveFilter.SavePassword
? _cryptographyProvider.Encrypt(connectionInfo.Password, _encryptionKey)
: "";

View File

@@ -34,7 +34,7 @@ CREATE TABLE [dbo].[tblCons] (
DisableMenuAnimations bit NOT NULL,
DisplayThemes bit NOT NULL,
DisplayWallpaper bit NOT NULL,
DomainName varchar(512),
Domain varchar(512),
EnableDesktopComposition bit NOT NULL,
EnableFontSmoothing bit NOT NULL,
ExtApp varchar(256),

View File

@@ -37,7 +37,7 @@ CREATE TABLE `tblCons` (
`DisableMenuAnimations` tinyint(1) NOT NULL,
`DisplayThemes` tinyint(1) NOT NULL,
`DisplayWallpaper` tinyint(1) NOT NULL,
`DomainName` varchar(512) DEFAULT NULL,
`Domain` varchar(512) DEFAULT NULL,
`EnableDesktopComposition` tinyint(1) NOT NULL,
`EnableFontSmoothing` tinyint(1) NOT NULL,
`ExtApp` varchar(256) DEFAULT NULL,

View File

@@ -56,7 +56,7 @@ namespace mRemoteNGTests.Config.Serializers
var model = CreateConnectionTreeModel();
_saveFilter.SaveDomain = true;
var dataTable = _dataTableSerializer.Serialize(model);
Assert.That(dataTable.Rows[0]["DomainName"], Is.Not.EqualTo(""));
Assert.That(dataTable.Rows[0]["Domain"], Is.Not.EqualTo(""));
}
[Test]
@@ -94,7 +94,7 @@ namespace mRemoteNGTests.Config.Serializers
var model = CreateConnectionTreeModel();
_saveFilter.SaveDomain = false;
var dataTable = _dataTableSerializer.Serialize(model);
Assert.That(dataTable.Rows[0]["DomainName"], Is.EqualTo(""));
Assert.That(dataTable.Rows[0]["Domain"], Is.EqualTo(""));
}
[Test]