public RoleEditEventArgs(string roleName) { var db = new Data.SecurityEntities(); this.m_role = (from item in db.Roles where item.Application.ApplicationName == System.Web.Security.Roles.ApplicationName && item.RoleName == roleName select item).FirstOrDefault(); }
public static void UpdateRole(string roleName, string description) { var db = new Data.SecurityEntities(); Data.Role role = (from item in db.Roles where item.Application.ApplicationName == System.Web.Security.Roles.ApplicationName && item.RoleName == roleName select item).FirstOrDefault(); if (role != null) { role.Description = description; } db.SaveChanges(); }
public RoleEditEventArgs(Data.Role role) { this.m_role = role; }