UpdateUserGroupStatus(string userGroupId, UserGroupStatus newStatus)
 {
     return RestEndpointFactory.Create<IUserGroupsEndpoint>(SessionManager
         .Instance.CurrentLoggedUser)
         .UpdateUserGroup(userGroupId, new UserGroup { Status = newStatus })
         .ToObservable()
             .SubscribeOn(TaskPoolScheduler.Default)
             .InterpretingErrors();
 }
Example #2
0
        protected void raise_UserGroupStatus(ulong value0, ulong value1, [MarshalAs(UnmanagedType.U1)] bool value2, [MarshalAs(UnmanagedType.U1)] bool value3)
        {
            // TODO [vicent] current stub implementation
            // UserGroupStatus userGroupStatus = this.<backing_store>UserGroupStatus;
            UserGroupStatus userGroupStatus = this.UserGroupStatus;

            if (userGroupStatus != null)
            {
                userGroupStatus(value0, value1, value2, value3);
            }
        }
Example #3
0
        private string GetOption(UserGroupStatus id, int vid, string name, UserGroupStatus sel)
        {
            var res = "<option value=\"" + vid + "\"";

            if (id != sel)
            {
                return(res + ">" + name + "</option>");
            }
            else
            {
                return(res + " selected>" + name + "</option>");
            }
        }
Example #4
0
 public AccessCode ChangeUserRole(int groupId, int userId, UserGroupStatus status, UserDTO userDTO)
 {
     using (var Data = DataFactory.Get())
     {
         var check = CheckRule(userDTO, groupId, GroupRule.CanControlUsers, Data);
         if (check.Code == AccessCode.Succsess)
         {
             var userGroup = check.Group.Users.FirstOrDefault(x => x.UserId == userId);
             if (userGroup == null)
             {
                 return(AccessCode.NotFound);
             }
             else
             {
                 userGroup.Status = status;
             }
             Data.UserGroupRepository.Edited(userGroup);
             Data.SaveChanges();
         }
         return(check.Code);
     }
 }