Example #1
0
 /// <summary>
 /// UpdateNodes method implementation
 /// </summary>
 private void DeleteNodes(MMCRegistrationList registrations)
 {
     this.SelectionData.BeginUpdates();
     try
     {
         List <ResultNode> nds = new List <ResultNode>();
         RemoteAdminService.DeleteUser(registrations);
         foreach (MMCRegistration reg in registrations)
         {
             foreach (ResultNode res in this.ResultNodes)
             {
                 MMCRegistration xres = res;
                 if (reg.ID == xres.ID)
                 {
                     nds.Add(res);
                 }
             }
         }
         foreach (ResultNode res in nds)
         {
             ResultNodes.Remove(res);
         }
     }
     finally
     {
         this.SelectionData.EndUpdates();
     }
 }
Example #2
0
        /// <summary>
        /// Handle the selected action.
        /// </summary>
        protected override void OnSelectionAction(Microsoft.ManagementConsole.Action action, AsyncStatus status)
        {
            this.SelectionData.BeginUpdates();
            try
            {
                switch ((string)action.Tag)
                {
                case "EnableUser":
                {
                    MMCRegistrationList reg = (MMCRegistrationList)SelectionData.SelectionObject;
                    reg = RemoteAdminService.EnableUser(reg);
                    UpdateNodes(reg);
                    break;
                }

                case "DisableUser":
                {
                    MMCRegistrationList reg = (MMCRegistrationList)SelectionData.SelectionObject;
                    reg = RemoteAdminService.DisableUser(reg);
                    UpdateNodes(reg);
                    break;
                }
                }
            }
            finally
            {
                this.SelectionData.EndUpdates();
            }
        }
Example #3
0
        internal void AddUserStoreData(object obj)
        {
            MMCRegistrationList reg = null;

            if (obj is MMCRegistrationList)
            {
                reg = (MMCRegistrationList)obj;
                reg = RemoteAdminService.AddUser(reg);
                AddNodes(reg);
            }
        }
Example #4
0
        /// <summary>
        /// SetData method implmentation
        /// </summary>
        internal void SetUserStoreData(object obj)
        {
            MMCRegistrationList reg = null;

            if (obj is MMCRegistrationList)
            {
                reg = (MMCRegistrationList)obj;
                RemoteAdminService.SetUser(reg);
                UpdateNodes(reg);
            }
        }
Example #5
0
 public async Task DeletePersonAsync(Person person)
 {
     await RemoteAdminService.DeletePersonAsync(person.GetPersonDC());
 }
Example #6
0
 public async Task UpdateNaturalPersonAsync(LegalPerson legalPerson)
 {
     await RemoteAdminService.UpdateLegalPersonAsync(legalPerson.GetLegalPersonDC());
 }
Example #7
0
 public async Task RegisterLegalPersonAsync(LegalPerson legalPerson)
 {
     await RemoteAdminService.RegisterLegalPersonAsync(legalPerson.GetLegalPersonDC());
 }
Example #8
0
 public async Task UpdateNaturalPersonAsync(NaturalPerson naturalPerson)
 {
     await RemoteAdminService.UpdateNaturalPersonAsync(naturalPerson.GetNaturalPersonDC());
 }
Example #9
0
 public async Task RegisterNaturalPersonAsync(NaturalPerson naturalPerson)
 {
     await RemoteAdminService.RegisterNaturalPersonAsync(naturalPerson.GetNaturalPersonDC());
 }
Example #10
0
 public async Task <IEnumerable <Person> > GetUsersAsync(PagingParameters pagingParameters)
 {
     return((await RemoteAdminService.GetUsersAsync(pagingParameters.GetPagingParametersDC()))
            .Select(personDataContract => personDataContract.GetPerson()));
 }
Example #11
0
 public async Task <AuthenticationResult> SignInAsync(string email, string password)
 {
     return((await RemoteAdminService.SignInAsync(email, password)).GetAuthenticationResult());
 }
Example #12
0
 /// <summary>
 /// Refresh method implmentation
 /// </summary>
 public void Refresh()
 {
     RefreshData(RemoteAdminService.GetUsers());
 }