Esempio n. 1
0
 public static Conect Conectar()
 {
     if (_instance == null)
     {
         lock (_lock)
         {
             if (_instance == null)
             {
                 _instance = new Conect();
             }
         }
     }
     return(_instance);
 }
Esempio n. 2
0
        public conectarBanco()
        {
            InitializeComponent();
            //modulos.CaminhoBD = @"Data Source=EDUARDO\SQLEXPRESS;Initial Catalog=CCB_Musica_Server;Integrated Security=True";

            ///Conexão Servidor Base Teste
            //modulos.CaminhoBD = @"Data Source=SERVMUNDO\CCBSQLEXPRESS;Initial Catalog=CCB_Musica_Teste;User Id=SA; Password=@mf170408";

            //// Conexao Servidor de Campo Grande
            //modulos.CaminhoBD = @"Data Source=SERVMUNDO\CCBSQLEXPRESS;Initial Catalog=CCB_Musica;User Id=SA; Password=@mf170408";

            //// Conexao Servidor de Cascavel
            //modulos.CaminhoBD = @"Data Source=SERVMUNDO\CCBSQLEXPRESS;Initial Catalog=CCB_Musica_Cascavel;User Id=SA; Password=@mf170408";

            ///Local
            modulos.CaminhoBD = @"Data Source=EDUARDO\SQLEXPRESS;Initial Catalog=CCB_Musica;Integrated Security=True";

            Conect.Conectar();
        }