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