⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 system_user_r_role.cs

📁 .net 开发的基础框架
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;
using Sybase.DataWindow;

namespace SPRFrame.DataType
{
    // 用户与角色的关系
    public class System_User_R_Role : Sybase.DataWindow.DataStore
    {
        public System_User_R_Role()
        {
            this.LibraryList = SPRF.PbdFile;
            this.DataWindowObject = "dw_system_user_r_role";
            this.SetTransaction(SPRF.GetDB());
        }
        #region 属性
        public int USER_ID
        {
            get
            {
                if (this.RowCount == 0) return -1;
                return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "user_id"));
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "user_id", value);
            }
        }
        public int ROLE_ID
        {
            get
            {
                if (this.RowCount == 0) return -1;
                return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "role_id"));
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "role_id", value);
            }
        }
        #endregion

        #region 设定取得数据的方法
        public void SetDataByUserId(int iUserId)
        {
            string SqlString = this.GetSqlSelect();
            SqlString += "where user_id = " + iUserId.ToString(); ;
            this.SetSqlSelect(SqlString);
        }
        public void SetDataByRoleId(int iRoleId)
        {
            string SqlString = this.GetSqlSelect();
            SqlString += "where role_id = " + iRoleId.ToString(); ;
            this.SetSqlSelect(SqlString);
        }
        #endregion
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -