public object TestConnectionString(DBConnectionDTO DBConnectionDTO) { using (DBConnectionService dBConnectionService = new DBConnectionService()) { sysBpmsDBConnection dBConnection = new sysBpmsDBConnection(); ResultOperation resultOperation = dBConnection.Update(DBConnectionDTO.ID, DBConnectionDTO.Name, DBConnectionDTO.DataSource, DBConnectionDTO.InitialCatalog, DBConnectionDTO.UserID, DBConnectionDTO.Password, DBConnectionDTO.IntegratedSecurity); if (resultOperation.IsSuccess) { if (dBConnectionService.TestConnection(dBConnection)) { return(new PostMethodMessage(SharedLang.Get("Success.Text"), DisplayMessageType.success)); } else { return(new PostMethodMessage("Error while testing", DisplayMessageType.error)); } } else { return(new PostMethodMessage(resultOperation.GetErrors(), DisplayMessageType.error)); } } }