Exemplo n.º 1
0
 public void SelectIndexChanged(GroupsModel group)
 {
     if (group != null)
     {
         GroupRolesSource.Clear();
         var roles = GroupRoles.Where(x => x.GrolrGIdFk == group.GId);
         foreach (var item in roles)
         {
             var role = Roles.Where(x => x.RoleId == item.GrolrRoleIdFk).FirstOrDefault();
             if (role != null)
             {
                 GroupRolesSource.Add(role.FillRoles(item));
             }
         }
     }
 }
Exemplo n.º 2
0
 protected void GroupItemChanging(GroupsModel newValue)
 {
     if (newValue != null)
     {
         GroupRolesSource.Clear();
         var roles = GroupRoles.Where(x => x.GrolrGIdFk == newValue.GId);
         foreach (var item in roles)
         {
             var role = Roles.Where(x => x.RoleId == item.GrolrRoleIdFk).FirstOrDefault();
             if (role != null)
             {
                 GroupRolesSource.Add(role.FillRoles(item));
             }
         }
     }
 }
Exemplo n.º 3
0
 protected void GroupItemChanging(GroupsModel newValue)
 {
     IsInProgress = true;
     new Thread(() =>
     {
     })
     {
         IsBackground = true
     }.Start();
     if (newValue != null)
     {
         GroupRolesSource.Clear();
         var roles = GroupRoles.Where(x => x.GrolrGIdFk == newValue.GId);
         foreach (var item in roles)
         {
             var role = Roles.Where(x => x.RoleId == item.GrolrRoleIdFk).FirstOrDefault();
             if (role != null)
             {
                 GroupRolesSource.Add(role.FillRoles(item));
             }
         }
     }
 }