Beispiel #1
0
        private bool bDataBaseUpdated(string strAdminUser, string strAdminPassword, out string strReturn)
        {
            bool bReturn = false;

            strReturn = "";
            mdlDataBaseAccess.clsDataBaseAccess cls_dba_ConnectionDB = new mdlDataBaseAccess.clsDataBaseAccessSqlServer(ref m_cls_ter_TratadorErro, m_strHost, m_strPort, m_strDataBaseName, m_strUser, m_strPassword);
            cls_dba_ConnectionDB.DBHost            = m_strHost;
            cls_dba_ConnectionDB.DBPort            = m_strPort;
            cls_dba_ConnectionDB.DBDataBaseName    = m_strDataBaseName;
            cls_dba_ConnectionDB.DBUser            = m_strUser;
            cls_dba_ConnectionDB.DBPassword        = m_strPassword;
            cls_dba_ConnectionDB.DBAdminUser       = strAdminUser;
            cls_dba_ConnectionDB.DBAdminPassword   = strAdminPassword;
            cls_dba_ConnectionDB.ShowDialogsErrors = false;
            if (!(bReturn = (cls_dba_ConnectionDB.nUpdateDataBase() >= 0)))
            {
                strReturn = "Não foi possível atualizar a estrutura do banco de dados.";
            }
            return(bReturn);
        }
Beispiel #2
0
        private void vCarregaDadosAdmin(string strAdminUser, string strAdminPassword, out bool bServer, out bool bSqlServer, out bool bDataBase, out bool bUser, out bool bUserAssociated, out bool bDataBaseUpdated, out bool bDefaultData)
        {
            bServer          = false;
            bSqlServer       = false;
            bDataBase        = false;
            bUser            = false;
            bUserAssociated  = false;
            bDataBaseUpdated = false;
            bDefaultData     = false;

            mdlDataBaseAccess.clsDataBaseAccess cls_dba_ConnectionDB = new mdlDataBaseAccess.clsDataBaseAccessSqlServer(ref m_cls_ter_TratadorErro, m_strHost, m_strPort, m_strDataBaseName, m_strUser, m_strPassword);
            cls_dba_ConnectionDB.DBHost          = m_strHost;
            cls_dba_ConnectionDB.DBPort          = m_strPort;
            cls_dba_ConnectionDB.DBDataBaseName  = m_strDataBaseName;
            cls_dba_ConnectionDB.DBUser          = m_strUser;
            cls_dba_ConnectionDB.DBPassword      = m_strPassword;
            cls_dba_ConnectionDB.DBAdminUser     = strAdminUser;
            cls_dba_ConnectionDB.DBAdminPassword = strAdminPassword;

            if (bServer = cls_dba_ConnectionDB.bComputerAvailable(m_strHost))
            {
                if (bSqlServer = cls_dba_ConnectionDB.bServerAvailable())
                {
                    if (bDataBase = cls_dba_ConnectionDB.bDataBaseAvailable())
                    {
                        if (bUser = cls_dba_ConnectionDB.bUserAvailable())
                        {
                            if (bUserAssociated = cls_dba_ConnectionDB.bUserAssociated())
                            {
                                cls_dba_ConnectionDB.ShowDialogsErrors = false;
                                if (bDataBaseUpdated = (cls_dba_ConnectionDB.nUpdateDataBase() >= 0))
                                {
                                    string strTemp;
                                    bDefaultData = bDBDefaultData(out strTemp);
                                }
                            }
                        }
                    }
                }
            }
        }