protected void RoleBind() { List <WMUserRole> list = WMUserRole.GetList(); RoleList.DataSource = list; RoleList.DataBind(); }
protected void RoleBind() { List <WMUserRole> list = WMUserRole.GetList(); if (!General.IsNullable(list)) { UserRole.Items.Clear(); foreach (var role in list) { ListItem item = new ListItem(); item.Text = role.RoleName; item.Value = role.RoleId.ToString(); UserRole.Items.Add(item); } } }