Esempio n. 1
0
 static ConnectionStringFactory()
 {
     NXJCConnectionString = ApplicationSettingsFactory.GetApplicationSettings().NXJCConnectionString;
     dataFactory          = new SqlServerDataFactory(NXJCConnectionString);
     Initialize();
 }
Esempio n. 2
0
        /// <summary>
        /// 将DatabaseModel翻译成连接字符串
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        private static string TranslateToConnectionString(DatabaseModel model)
        {
            string connModel = ApplicationSettingsFactory.GetApplicationSettings().ConnectionStringModel;

            return(String.Format(connModel, model.IPAddress, model.DatabaseName, model.UserID, model.Password));
        }