// 摘要: // 获取指定登陆名称的用户信息 // // 参数: // loginName: // 登陆名称 // // 返回结果: // 用户信息 private void CreateUserFromRow(DataRow sysUserRow) { this.id = sysUserRow["ID"].ToString(); this.name = sysUserRow["NAME"].ToString(); this.IsAdmin = false; this.IsDisabled = ("1" == sysUserRow["C_STATE"].ToString()); this.LoginName = sysUserRow["LOGINNAME"].ToString(); this.OwningBusinessUnitId = sysUserRow["LEVELGROUPID"].ToString(); this.UserRoleID = sysUserRow["ROLE"].ToString(); this.UserRole = sysUserRow["F_ROLE"].ToString(); this.TeamCode = sysUserRow["TEAM_CODE"].ToString(); DbOperator opt = new DbOperator(); if (this.UserRoleID == "") { this.UserRoleID = opt.GetSegValue("select F_ROLE from ht_svr_org_group where F_CODE = '" + this.OwningBusinessUnitId + "'", "F_ROLE"); this.UserRole = opt.GetSegValue("select F_ROLE from ht_svr_sys_role where F_ID = '" + this.UserRoleID + "'", "F_ROLE"); } DataSet data = opt.CreateDataSetOra("select s.f_menu,s.f_type,s.F_MAPID,s.f_id from HT_SVR_SYS_ROLE t left join HT_SVR_SYS_MENU s on substr (t.f_right,s.f_id,1) = '1' and s.is_del = '0' where t.f_id = '" + this.UserRoleID + "' and s.f_menu is not null"); UserRights = new SysRightCollection(); if (data != null && data.Tables[0].Rows.Count > 0) { foreach (DataRow row in data.Tables[0].Rows) { SysRight right = new SysRight(row); UserRights.Add(right); } } }
// // 摘要: // 从集合中移除指定权限对象 // // 参数: // sysRole: // 权限对象 public void Remove(SysRight sysRight) { base.Remove(sysRight); }
// 摘要: // 添加权限对象到集合中 // // 参数: // sysRole: // 权限对象 // // 返回结果: // 当前权限对象在集合中的位置 public int Add(SysRight sysRight) { return(base.Add(sysRight)); }