Exemplo n.º 1
0
 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);
     }
 }
Exemplo n.º 2
0
 public virtual void TestSetup()
 {
     OrderConnection connection = new OrderConnection(_server, _dataBase, _userName, _userPassword);
 }