예제 #1
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);
        }
예제 #2
0
        /// <summary>
        /// 通过一条记录来建立CS界面用的角色
        /// </summary>
        /// <param name="_dr"></param>
        /// <returns></returns>
        public static CSSinoRole CreateCsRoleItem(DataRow _dr)
        {
            CSSinoRole _sr = new CSSinoRole();

            _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);
        }