Beispiel #1
0
 public static Dictionary <string, object> ExecuteStoreProcedure(string spName, DataAccessParameterCollection parameters)
 {
     using (DataAccessBroker broker = DataAccessFactory.Instance())
     {
         return(broker.ExecuteProcReturnOutput(spName, parameters));
     }
 }
Beispiel #2
0
        public static Dictionary <string, object> ExecuteProcReturnOutput(DataAccessBroker broker, string commandString, DataAccessParameter[] dps)
        {
            DataAccessParameterCollection dpc = new DataAccessParameterCollection();

            if (dps != null && dps.Length > 0)
            {
                foreach (DataAccessParameter dp in dps)
                {
                    dpc.Add(dp.ParameterName, dp);
                }
            }
            return(broker.ExecuteProcReturnOutput(commandString, dpc));
        }