| | |
| | | { |
| | | |
| | | |
| | | public List<SysDictData> userRoleList { get; set; } //账号类型或称用户角色。 |
| | | public string IP { get; set; } |
| | | |
| | | protected void Page_Load(object sender, EventArgs e) |
| | | { |
| | | this.IP = this.Request.UserHostAddress; |
| | | this.CheckRight("104", FailedOperation.PromptOnly); |
| | | |
| | | } |
| | | |
| | | private string GenerateTextPadding(SysMenu menu) |
| | |
| | | return stringBuilder.ToString(); |
| | | } |
| | | } |
| | | |
| | | //所有用户角色(字典类型为:USER_ROLE) |
| | | protected string UserRoleList() |
| | | { |
| | | using (SysDictDataDao sysDictDataDao = new SysDictDataDao()) |
| | | { |
| | | SysDictData sysDictData = new SysDictData(); |
| | | sysDictData.DictType = "USER_ROLE"; //字典类型:用户角色 |
| | | sysDictData.Status = 1; //状态:1-启用 |
| | | List<SysDictData> userRoleList = sysDictDataDao.getAllList(sysDictData); |
| | | |
| | | //List<GwProduct> list = gwProductDao.getAllList(gwProduct); |
| | | |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | stringBuilder.Append("<table cellpadding='5'>"); |
| | | if (userRoleList.Count > 0) |
| | | { |
| | | for (int i = 0; i < userRoleList.Count; i++) |
| | | { |
| | | SysDictData bean = (SysDictData)userRoleList[i]; |
| | | |
| | | //行开始符 |
| | | if (i % 5 == 0) |
| | | { |
| | | stringBuilder.Append("<tr>"); |
| | | } |
| | | |
| | | //行单元格 |
| | | stringBuilder.AppendFormat("<td><input type=\"checkbox\" id=\"_UserRole\" name=\"_UserRole\" value=\"{0}\" /><span style='padding:5px;'>{1} </span> \r\n </td>", (object)bean.DictValue, (object)bean.DictLabel); |
| | | |
| | | //行结束符 |
| | | if (i % 5 == 4 || i == (userRoleList.Count - 1)) |
| | | { |
| | | stringBuilder.Append("</tr>"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | stringBuilder.Append("</table>"); |
| | | |
| | | return stringBuilder.ToString(); |
| | | } |
| | | } |
| | | |
| | | } |