Esempio n. 1
0
        public DataSet GetDataSet(string SearchField, string SearchCondition)
        {
            DataSet ds = null;

            try
            {
                string strSQL = "  SELECT  "
                                + " " + SearchField
                                + " FROM " + SMSCheckSystemListModel.TableName;

                if (SearchCondition.Length > 0)
                {
                    strSQL += " WHERE " + SearchCondition;
                }



                using (CommonDal Access = new CommonDal(_dct))
                {
                    ds = Access.GetDataByParameterizedSql(strSQL, model.paramList);
                }
            }
            catch (Exception ex)
            {
                ds = null;
                this._infomation = ex.Message;
            }

            return(ds);
        }
Esempio n. 2
0
        public DataSet GetDataSet(string strSQL, List <CustomSqlParam> paramList)
        {
            DataSet ds = null;

            try
            {
                using (CommonDal Access = new CommonDal(_dct))
                {
                    ds = Access.GetDataByParameterizedSql(strSQL, paramList);
                }
            }
            catch (Exception ex)
            {
                ds = null;
                this._infomation = ex.Message;
            }

            return(ds);
        }