示例#1
0
        public bool SqlBaseClear(SqlBaseItemXml basemodel)
        {
            bool revalue    = false;
            var  serverlist = DBConfig.GetServerItemXmlConfigList(basemodel);

            if (serverlist != null)
            {
                foreach (var serveritem in serverlist)
                {
                    string connstr      = DBProxyAction.GetConnStr(basemodel, serveritem);
                    var    databaselist = DBConfig.GetDatabaseItemXmlConfigList(basemodel, serveritem.Number);
                    if (databaselist != null)
                    {
                        foreach (var databaseitem in databaselist)
                        {
                            DBProxy.GetDBAccess(serveritem.DBType).DatabaseDrop(connstr, databaseitem.DatabaseName);
                        }
                    }
                }
                ManagerConfig servermanagerconfig = new ManagerConfig();
                //servermanagerconfig.InitServerXml(basemodel);
                servermanagerconfig.InitDatabaseXml(basemodel);
                servermanagerconfig.InitTableXml(basemodel);
                servermanagerconfig.InitFieldXml(basemodel);
            }
            return(revalue);
        }