internal void Populate(TDatabaseAuthentication data) { if (data.NotNull()) { if (data.Authentication.Equals(DatabaseAuthentication.Authentication)) { DatabaseAuthentication.CopyFrom(data); DatabaseConnection1 = $"Data Server = {data.DatabaseServer}; Initial Catalog = {data.DatabaseName}"; DatabaseConnection2 = $"User Id = {data.UserId}; Password = {data.UserPassword}"; } IsCheckedAuthentication = DatabaseAuthentication.IsActive; } }
internal void Select (TDatabaseAuthentication authentication) { if (authentication.NotNull ()) { switch (authentication.Authentication) { case TAuthentication.SQL: AuthenticationSQL.CopyFrom (authentication); if (authentication.IsActive) { Authentication = TAuthentication.SQL; } break; case TAuthentication.Windows: AuthenticationWindows.CopyFrom (authentication); if (authentication.IsActive) { Authentication = TAuthentication.Windows; } break; } } }