Exemple #1
0
        public int insertTable(string sqlStr)
        {
            if (string.IsNullOrEmpty(sqlStr))
            {
                return(0);
            }
            DBAsser dbassesser = new DBAsser();
            int     result     = dbassesser.ExecuteNonQuery(sqlStr);

            return(result);
        }
Exemple #2
0
        public DataTable getDataTable(string sqlStr)
        {
            DataTable dtTable = new DataTable();

            if (string.IsNullOrEmpty(sqlStr))
            {
                return(dtTable);
            }
            DBAsser dbassesser = new DBAsser();
            DataSet dtSet      = dbassesser.ExecuteDataSet(sqlStr);

            dtTable = dtSet.Tables[0];
            return(dtTable);
        }