//private void btnFindServers_Click(object sender, RoutedEventArgs e) //{ // //it's possible to duplicate the list so we need to ensure that there isn't one already // if (cmbServers.Items.Count != 0) // { // } // else // { // //cmbServers.ItemsSource= GetSQLServerList(); // } //} //private void btnFindDatabases_Click(object sender, RoutedEventArgs e) //{ // //it's possible to duplicate the list so we need to ensure that there isn't one already // if (cmbDatabases.Items.Count != 0) // { // } // else // { // if (chkUseWindowsSecurity.IsChecked.Value) // { // //we just need to do a check with no details // GetSQLDatabaseList(cmbServers.SelectedItem.ToString(), true, txtUserName.Text, txtPassword.Text); // } // else // { // //we need to do a check with details // GetSQLDatabaseList(cmbServers.SelectedItem.ToString(), false, txtUserName.Text, txtPassword.Text); // } // } //} #endregion #region Methodes //private void GetSQLDatabaseList(string serverInstanceName, bool useWindowsAuthentication, string username, string password) //{ // //return new List<string>().ToArray() ; // AdministrationServiceClient client = new AdministrationServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Administration")); // client.GetSQLDatabaseListCompleted += (ss, res) => // { // if (res.Cancelled || res.Error != null) // { // string error = res.Error.Message; // Message.ShowError(error, Galatee.Silverlight.Resources.Langue.errorTitle); // return; // } // cmbDatabases.ItemsSource = res.Result; // //now disable the find databses button if we have a list // if (cmbDatabases.Items.Count != 0) // { // btnFindDatabases.IsEnabled = false; // } // else // { // btnFindDatabases.IsEnabled = true; // } // }; // client.GetSQLDatabaseListAsync(serverInstanceName, useWindowsAuthentication, username, password); //} /*Select providers*/ private void GetProviderList() { AdministrationServiceClient client = new AdministrationServiceClient(Utility.ProtocoleFacturation(), Utility.EndPoint("Administration")); client.GetProviderListCompleted += (ss, res) => { if (res.Cancelled || res.Error != null) { string error = res.Error.Message; Message.ShowError(error, Galatee.Silverlight.Resources.Langue.errorTitle); return; } cmbProvider.ItemsSource = res.Result; FillScreen(this.csimport.REQUTETTEBASEDISTANTE, this.csimport.PROVIDER, this.csimport.SERVER, this.csimport.BASEDEDONNE, this.csimport.UTILISATEUR, this.csimport.MOTDEPASSE); }; client.GetProviderListAsync(); //return new List<string>().ToArray(); }