예제 #1
0
        public DataSet ExecuteDataSet(MsDatParameters db_params)
        {
            var _sqlstr = String.Format("SELECT * FROM {0}\n", m_tblName);

            var _index = 0;
            var _where = "";

            foreach (MsDatParameter _p in db_params)
            {
                if (String.IsNullOrEmpty(_where) == true)
                {
                    _where += " WHERE ";
                }

                if (String.IsNullOrEmpty(_p.Field) == true)
                {
                    _where += String.Format("{0}={1}", _p.Name.Substring(1), _p.Name);
                }
                else
                {
                    _where += String.Format("{0}={1}", _p.Field, _p.Name);
                }

                if (_index != db_params.Count - 1)
                {
                    _where += " AND ";
                }

                _index++;
            }
            _sqlstr += _where;

            return(DatHelper.ExecuteDataSet(ConnectionString, _sqlstr, db_params));
        }
예제 #2
0
 public DataSet ExecuteDataSet(string sql_string, MsDatParameters db_params)
 {
     return(DatHelper.ExecuteDataSet(ConnectionString, sql_string, db_params));
 }
예제 #3
0
        public DataSet ExecuteDataSet()
        {
            var _sqlstr = "SELECT * FROM " + m_tblName;

            return(DatHelper.ExecuteDataSet(ConnectionString, _sqlstr));
        }