private void Login() { OrderConnection = UnityContainer.Resolve <IOrderConnection>(); try { using (SqlConnection conn = OrderConnection.GetSqlConnection()) { conn.Open(); if (conn.State == ConnectionState.Open) { DialogResult = DialogResult.OK; } } SetUserProperty(); } catch (Exception ex) { Log.Error("Ошибка подключения к базе данных.", ex); } }
public virtual void TestSetup() { OrderConnection connection = new OrderConnection(_server, _dataBase, _userName, _userPassword); }