Ejemplo n.º 1
0
 public override DS_Currency.SP_GetCurrencyDataTable GetCurrency(string currencyCode)
 {
     using (var adapter = SP_GetCurrencyTableAdapter.CreateInstance(ConfigurationManagerEx.ConnectionString, ConfigurationManagerEx.CommandTimeout))
     {
         return(adapter.GetData(currencyCode));
     }
 }
Ejemplo n.º 2
0
        public static SP_GetCurrencyTableAdapter CreateInstance(string connectionString, int commandTimeout)
        {
            var adapter = new SP_GetCurrencyTableAdapter();

            if (string.IsNullOrEmpty(connectionString))
            {
                return(adapter);
            }
            foreach (var cmd in adapter.CommandCollection)
            {
                cmd.Connection.ConnectionString = connectionString;
                cmd.CommandTimeout = commandTimeout;
            }

            return(adapter);
        }