public static void ExecuteNonQuery(string StoredProcedureName, List <KeyValuePair <string, object> > paramlist) { ProcedureDefinition oProc = StoredProcedures.GetProcedureDefinition(StoredProcedureName); SQLUtil utils = new SQLUtil(); if (!Object.Equals(paramlist, null)) { foreach (KeyValuePair <string, object> param in paramlist) { utils.AddParameter(param.Key, param.Value); } } utils.ExecuteNonQuery(oProc.FullyQualifiedCommand, oProc.Connection); }
public static DataSet GetDataSetByName(string StoredProcedureName, params object[] paramlist) { ProcedureDefinition oProc = StoredProcedures.GetProcedureDefinition(StoredProcedureName); SQLUtil utils = new SQLUtil(); DataSet ds = new DataSet(); if (!Object.Equals(paramlist, null)) { foreach (KeyValuePair <string, object> param in paramlist) { utils.AddParameter(param.Key, param.Value); } } ds = utils.ExecuteDataSet(oProc.FullyQualifiedCommand, oProc.Connection); if (Object.Equals(ds, null) || ds.Tables.Count <= 0) { ds = null; } return(ds); }