Beispiel #1
0
        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();
        }
Beispiel #2
0
        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();
        }
Beispiel #3
0
 public RoleEditEventArgs(Data.Role role)
 {
     this.m_role = role;
 }