internal void Populate(TDatabaseAuthentication data)
 {
     if (data != null)
     {
         DatabaseAuthentication.Change(data);
     }
 }
Beispiel #2
0
 internal void Populate(TDatabaseAuthentication data)
 {
     if (data != null)
     {
         DatabaseConnectionData.CopyFrom(data);
     }
 }
Beispiel #3
0
    void SaveSettingsDispatcher (TDatabaseAuthentication databaseAuthentication)
    {
      var filePath = System.Environment.CurrentDirectory;
      var fileName = TNames.SettingsIniFileName;

      DatabaseConnection = DatabaseConnection ?? new TDatabaseConnection (filePath, fileName);

      if (DatabaseConnection.Save (databaseAuthentication)) {
        DatabaseConnection.Request (); // update

        // notify edit
        var message = new TShellMessage (TMessageAction.Response, TypeInfo);
        message.Support.Argument.Types.ConnectionData.CopyFrom (databaseAuthentication);

        DelegateCommand.PublishModuleMessage.Execute (message);

        // settings validating
        TDispatcher.Invoke (RequestServiceValidationDispatcher);
      }

      else {
        TDispatcher.Invoke (CloseSnackbarDispatcher);

        var errorMessage = new TErrorMessage (Properties.Resource.RES_ERROR, Properties.Resource.RES_SAVE, (string) DatabaseConnection.Result.ErrorContent)
        {
          Severity = TSeverity.Hight
        };

        TDispatcher.BeginInvoke (ShowErrorBoxDispatcher, errorMessage);
      }
    }
Beispiel #4
0
        internal void Select(TDatabaseAuthentication authentication)
        {
            switch (authentication.Authentication)
            {
            case TAuthentication.SQL:
                AuthenticationSQL.CopyFrom(authentication);
                break;

            case TAuthentication.Windows:
                AuthenticationWindows.CopyFrom(authentication);
                break;
            }
        }
Beispiel #5
0
        internal void Populate(TDatabaseAuthentication data)
        {
            if (data != null)
            {
                if (data.Authentication.Equals(DatabaseAuthentication.Authentication))
                {
                    DatabaseAuthentication.CopyFrom(data);

                    DatabaseConnection1 = $"Data Server = {data.DatabaseServer};  Initial Catalog = {data.DatabaseName}";
                }

                IsCheckedAuthentication = DatabaseAuthentication.IsActive;
            }
        }
        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;
            }
        }
Beispiel #7
0
    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;
        }
      }
    }
Beispiel #8
0
 public void Select (TDatabaseAuthentication database)
 {
   DatabaseAuthentication.CopyFrom (database);
 }
        public TSQLADBBackSettingsModel()
        {
            DatabaseAuthentication = TDatabaseAuthentication.Create(TAuthentication.SQL);

            CheckVisibility = Visibility.Hidden;
        }
        public TSQLADBFrontSettingsModel()
        {
            DatabaseAuthentication = TDatabaseAuthentication.Create(TAuthentication.SQL);

            IsEnabled = true;
        }
Beispiel #11
0
        public TWADBBackSettingsModel()
        {
            DatabaseConnectionData = TDatabaseAuthentication.Create(TAuthentication.Windows);

            CheckVisibility = Visibility.Hidden;
        }
Beispiel #12
0
 public TFactoryDatabaseModel()
 {
     AuthenticationSQL     = TDatabaseAuthentication.CreateDefault;
     AuthenticationWindows = TDatabaseAuthentication.CreateDefault;
 }
Beispiel #13
0
        public TWADBFrontSettingsModel()
        {
            DatabaseAuthentication = TDatabaseAuthentication.Create(TAuthentication.Windows);

            IsEnabled = true;
        }