public static DataSet GetDataSet(string sql)
        {
            DataSet dataSet = new DataSet();

            using (BaseDB.BaseAdapter baseAdapter = new BaseDB.BaseAdapter())
            {
                using (BaseDB.BaseDataAccess baseDataAccess = new BaseDB.BaseDataAccess())
                {
                    using (BaseDB.BaseCommand cmd = new BaseDB.BaseCommand(baseDataAccess.MsConn))
                    {
                        cmd.CommandText           = sql;
                        cmd.CommandType           = System.Data.CommandType.Text;
                        baseAdapter.SelectCommand = cmd.Command;
                        baseAdapter.Fill(dataSet, "Table");
                    }
                }
            }
            return(dataSet);
        }
        public static System.Xml.XmlReader ExecuteSPForXml(string spName, ArrayList parameterArr, ArrayList valueArr)
        {
            using (BaseDB.BaseAdapter baseAdapter = new BaseDB.BaseAdapter())
            {
                using (BaseDB.BaseDataAccess baseDataAccess = new BaseDB.BaseDataAccess())
                {
                    using (BaseDB.BaseCommand cmd = new BaseDB.BaseCommand(baseDataAccess.MsConn))
                    {
                        cmd.CommandText = spName;
                        cmd.CommandType = System.Data.CommandType.StoredProcedure;
                        for (int i = 0; i < parameterArr.Count; i++)
                        {
                            cmd.Command.Parameters.AddWithValue("@" + parameterArr[i], valueArr[i]);
                        }

                        baseAdapter.SelectCommand = cmd.Command;
                        System.Xml.XmlReader x = cmd.Command.ExecuteXmlReader();
                        return(x);
                    }
                }
            }
        }
        public static DataSet ExecuteSP(string spName, ArrayList parameterArr, ArrayList valueArr)
        {
            DataSet Data = new DataSet();

            using (BaseDB.BaseAdapter baseAdapter = new BaseDB.BaseAdapter())
            {
                using (BaseDB.BaseDataAccess baseDataAccess = new BaseDB.BaseDataAccess())
                {
                    using (BaseDB.BaseCommand cmd = new BaseDB.BaseCommand(baseDataAccess.MsConn))
                    {
                        cmd.CommandText = spName;
                        cmd.CommandType = System.Data.CommandType.StoredProcedure;
                        for (int i = 0; i < parameterArr.Count; i++)
                        {
                            cmd.Command.Parameters.AddWithValue("@" + parameterArr[i], valueArr[i]);
                        }

                        baseAdapter.SelectCommand = cmd.Command;
                        baseAdapter.Fill(Data, "Table");
                    }
                }
            }
            return(Data);
        }