public async Task <String> CheckConnection(string servername = "", string instanceName = "", string login = "", string pswd = "", string windowsoauth = "false") { Boolean oauthType = false; Boolean.TryParse(windowsoauth, out oauthType); String result = await ConnectionChecker.Check(servername, instanceName, login, pswd, oauthType); return(result); }
private void SettingsView_CheckRealtyConnectionRequested(object sender, EventArgs e) { var realty = userSettings.CreateConnectionString(settingsView.RealtyConnection); var export = userSettings.CreateConnectionString(settingsView.ExportConnection); var isRealtyExists = ConnectionChecker.Check(realty); var isExportExists = ConnectionChecker.Check(export); var message = $"Соединение с базой данных объектов {(isRealtyExists ? "" : "НЕ ")} установлено"; message += $"\nСоединение с базой данных экспорта {(isExportExists ? "" : "НЕ ")} установлено"; if (isRealtyExists && isExportExists) { messageService.ShowMessage(message); } else { messageService.ShowError(message); } }
public bool IsReady() { return(CheckMe && ConnectionChecker.Check(this)); }