执行sql语句并返回bool型值

执行sql语句并返回bool型值

        public bool DeleteOriOrder(string OriOrderID)
        {
            string sql = "delete from OriOrder where OriOrderID = '" + OriOrderID + "'";
            Database db = DatabaseFactory .CreateDatabase();
            DBCommandWrapper cmd = db.GetSqlStringCommandWrapper(sql);
            db.ExecuteNonQuery(cmd);
            return cmd.RowsAffected > 0;
        }
展开阅读全文

没有更多推荐了,返回首页