コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        //private static DataHandler instance = new DataHandler();

        //public static DataHandler getInstance(DataHandlerHelper helper)
        //{

        //    return instance;
        //}

        public DataHandler(DataHandlerHelper helper)
        {
            if (helper.ConnectionToUse == DataHandlerHelper.Connection.ConnectionOne)
            {
                connectionStringSHS = helper.ConnectionStringOne;
            }
            else if (helper.ConnectionToUse == DataHandlerHelper.Connection.ConnecitonTwo)
            {
                connectionStringSHS = helper.ConnectionStringTwo;
            }
            this.providerName = helper.ProviderName;
        }
コード例 #2
0
 private DatabaseHandler(DataHandlerHelper dataHelper)
 {
     //connectionStringSHS = connectionString.Equals("default") ? ConfigurationManager.ConnectionStrings[connectionString].ConnectionString : connectionString;
     connectionStringSHS = dataHelper.ConnectionToUse == DataHandlerHelper.Connection.ConnectionOne ? dataHelper.ConnectionStringOne : dataHelper.ConnectionStringTwo;
 }