/// <summary>
        /// 添加数据
        /// <param name="es">数据实体对象数组</param>
        /// <returns></returns>
        /// </summary>
        public bool Insert(SysRoleFunction e)
        {
            MySqlConnection oc = ConnectManager.Create();
            MySqlCommand _cmdInsertSysRoleFunction = cmdInsertSysRoleFunction.Clone() as MySqlCommand;
            bool returnValue = false;
            _cmdInsertSysRoleFunction.Connection = oc;
            try
            {
                if (oc.State == ConnectionState.Closed)
                    oc.Open();
                _cmdInsertSysRoleFunction.Parameters["@SysRoleFunctionId"].Value = e.SysRoleFunctionId;
                _cmdInsertSysRoleFunction.Parameters["@RoleId"].Value = e.RoleId;
                _cmdInsertSysRoleFunction.Parameters["@FunctionId"].Value = e.FunctionId;

                _cmdInsertSysRoleFunction.ExecuteNonQuery();
                return returnValue;
            }
            finally
            {
                oc.Close();
                oc.Dispose();
                oc = null;
                _cmdInsertSysRoleFunction.Dispose();
                _cmdInsertSysRoleFunction = null;
            }
        }
        /// <summary>
        /// 修改指定的数据
        /// <param name="e">修改后的数据实体对象</param>
        /// <para>数据对应的主键必须在实例中设置</para>
        /// </summary>
        public void Update(SysRoleFunction e)
        {
            MySqlConnection oc = ConnectManager.Create();
            MySqlCommand _cmdUpdateSysRoleFunction = cmdUpdateSysRoleFunction.Clone() as MySqlCommand;
            _cmdUpdateSysRoleFunction.Connection = oc;

            try
            {
                if (oc.State == ConnectionState.Closed)
                    oc.Open();

                _cmdUpdateSysRoleFunction.Parameters["@SysRoleFunctionId"].Value = e.SysRoleFunctionId;
                _cmdUpdateSysRoleFunction.Parameters["@RoleId"].Value = e.RoleId;
                _cmdUpdateSysRoleFunction.Parameters["@FunctionId"].Value = e.FunctionId;

                _cmdUpdateSysRoleFunction.ExecuteNonQuery();

            }
            finally
            {
                oc.Close();
                oc.Dispose();
                oc = null;
                _cmdUpdateSysRoleFunction.Dispose();
                _cmdUpdateSysRoleFunction = null;
                GC.Collect();
            }
        }
        /// <summary>
        /// 获取指定记录
        /// <param name="id">Id值</param>
        /// </summary>
        public SysRoleFunction Get(int SysRoleFunctionId)
        {
            SysRoleFunction returnValue = null;
            MySqlConnection oc = ConnectManager.Create();
            MySqlCommand _cmdGetSysRoleFunction = cmdGetSysRoleFunction.Clone() as MySqlCommand;

            _cmdGetSysRoleFunction.Connection = oc;
            try
            {
                _cmdGetSysRoleFunction.Parameters["@SysRoleFunctionId"].Value = SysRoleFunctionId;

                if (oc.State == ConnectionState.Closed)
                    oc.Open();

                MySqlDataReader reader = _cmdGetSysRoleFunction.ExecuteReader();
                if (reader.HasRows)
                {
                    reader.Read();
                    returnValue = new SysRoleFunction().BuildSampleEntity(reader);
                }
            }
            finally
            {
                oc.Close();
                oc.Dispose();
                oc = null;
                _cmdGetSysRoleFunction.Dispose();
                _cmdGetSysRoleFunction = null;
                GC.Collect();
            }
            return returnValue;
        }