/// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(UserPermission.Model.USER_SHARE_ROLEFUN model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update USER_SHARE_ROLEFUN set ");
            strSql.Append("ROLEID=@ROLEID,");
            strSql.Append("FUNID=@FUNID");
            strSql.Append(" where ");
            Database  db        = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());

            db.AddInParameter(dbCommand, "ROLEID", DbType.String, model.ROLEID);
            db.AddInParameter(dbCommand, "FUNID", DbType.String, model.FUNID);
            db.ExecuteNonQuery(dbCommand);
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public void Add(UserPermission.Model.USER_SHARE_ROLEFUN model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into USER_SHARE_ROLEFUN(");
            strSql.Append("ROLEID,FUNID)");

            strSql.Append(" values (");
            strSql.Append("@ROLEID,@FUNID)");
            Database  db        = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());

            db.AddInParameter(dbCommand, "ROLEID", DbType.String, model.ROLEID);
            db.AddInParameter(dbCommand, "FUNID", DbType.String, model.FUNID);
            db.ExecuteNonQuery(dbCommand);
        }
        /// <summary>
        /// 对象实体绑定数据
        /// </summary>
        public UserPermission.Model.USER_SHARE_ROLEFUN ReaderBind(IDataReader dataReader)
        {
            UserPermission.Model.USER_SHARE_ROLEFUN model = new UserPermission.Model.USER_SHARE_ROLEFUN();
            object ojb;

            ojb = dataReader["ROLEID"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.ROLEID = (decimal)ojb;
            }
            ojb = dataReader["FUNID"];
            if (ojb != null && ojb != DBNull.Value)
            {
                model.FUNID = (decimal)ojb;
            }
            return(model);
        }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public UserPermission.Model.USER_SHARE_ROLEFUN GetModel()
        {
            //该表无主键信息,请自定义主键/条件字段
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select ROLEID,FUNID from USER_SHARE_ROLEFUN ");
            strSql.Append(" where ");
            Database  db        = DatabaseFactory.CreateDatabase();
            DbCommand dbCommand = db.GetSqlStringCommand(strSql.ToString());

            UserPermission.Model.USER_SHARE_ROLEFUN model = null;
            using (IDataReader dataReader = db.ExecuteReader(dbCommand))
            {
                if (dataReader.Read())
                {
                    model = ReaderBind(dataReader);
                }
            }
            return(model);
        }