Пример #1
0
        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);
        }