示例#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();
        }
示例#2
0
文件: Check.cs 项目: Yasir0/x360ce
        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();
        }
示例#3
0
 public RoleEditEventArgs(Data.Role role)
 {
     this.m_role = role;
 }