Exemple #1
0
        private void ProcFile(String file)
        {
            OnMessageEvent("   Check file: " + Path.GetFileName(file), Resources.file_apply, null);
            ConnectionStringSettingsCollection wConnectionStrings = GetCnnstrings(file);
            CnnString cnn;

            if (wConnectionStrings != null)
            {
                foreach (ConnectionStringSettings c in wConnectionStrings)
                {
                    if (!c.Name.Equals("LocalSqlServer", StringComparison.OrdinalIgnoreCase))
                    {
                        cnn = new CnnString(c.Name, c.ConnectionString);

                        if (cnn.TestConnection())
                        {
                            OnMessageEvent("       Connection: " + c.Name + " OK ", null, Resources.apply);
                        }
                        else
                        {
                            OnMessageEvent("       Connection: " + c.Name + " not found ", null, Resources.del);
                        }
                    }
                }
            }
        }
        private void ProcFile(String file)
        {
            OnMessageEvent("   Check file: " + Path.GetFileName(file), Resources.file_apply, null);
            ConnectionStringSettingsCollection wConnectionStrings = GetCnnstrings(file);
            CnnString cnn;
            if (wConnectionStrings != null)
            {

                foreach (ConnectionStringSettings c in wConnectionStrings)
                {
                    if (!c.Name.Equals("LocalSqlServer", StringComparison.OrdinalIgnoreCase))
                    {
                        cnn = new CnnString(c.Name, c.ConnectionString);

                        if (cnn.TestConnection())
                        {
                            OnMessageEvent("       Connection: " + c.Name + " OK ", null, Resources.apply);
                        }
                        else
                        {
                            OnMessageEvent("       Connection: " + c.Name + " not found ", null, Resources.del);
                        }
                    }
                }
            }


        }