Ejemplo n.º 1
0
        public static SinoRole CreateRoleItem(string _jsid, string _jsmc, string _jssm, string _ssdwid)
        {
            SinoRole _sr = new SinoRole();

            _sr.RoleID   = _jsid;
            _sr.RoleName = _jsmc;
            _sr.Descript = _jssm;
            _sr.RoleDwid = _ssdwid;
            return(_sr);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 将角色项转换为界面角色类
        /// </summary>
        /// <param name="_role"></param>
        /// <returns></returns>
        public static CSSinoRole SinoRole2CsRole(SinoRole _role)
        {
            CSSinoRole _sr = new CSSinoRole();

            _sr.RoleID   = _role.RoleID;
            _sr.RoleName = _role.RoleName;
            _sr.Descript = _role.Descript;
            _sr.RoleDwid = _role.RoleDwid;
            return(_sr);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 用一条数据库的记录来建立角色
        /// </summary>
        /// <param name="_dr"></param>
        /// <returns></returns>
        public static SinoRole CreateRoleItem(DataRow _dr)
        {
            SinoRole _sr = new SinoRole();

            _sr.RoleID   = _dr["JSID"].ToString();
            _sr.RoleName = _dr["JSMC"].ToString();
            _sr.Descript = _dr["JSSM"].ToString();
            _sr.RoleDwid = _dr.IsNull("SSDWID") ? "" : _dr["SSDWID"].ToString();
            return(_sr);
        }