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