/// <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(); } }
/// <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(); } }
internal void AddUserStoreData(object obj) { MMCRegistrationList reg = null; if (obj is MMCRegistrationList) { reg = (MMCRegistrationList)obj; reg = RemoteAdminService.AddUser(reg); AddNodes(reg); } }
/// <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); } }
public async Task DeletePersonAsync(Person person) { await RemoteAdminService.DeletePersonAsync(person.GetPersonDC()); }
public async Task UpdateNaturalPersonAsync(LegalPerson legalPerson) { await RemoteAdminService.UpdateLegalPersonAsync(legalPerson.GetLegalPersonDC()); }
public async Task RegisterLegalPersonAsync(LegalPerson legalPerson) { await RemoteAdminService.RegisterLegalPersonAsync(legalPerson.GetLegalPersonDC()); }
public async Task UpdateNaturalPersonAsync(NaturalPerson naturalPerson) { await RemoteAdminService.UpdateNaturalPersonAsync(naturalPerson.GetNaturalPersonDC()); }
public async Task RegisterNaturalPersonAsync(NaturalPerson naturalPerson) { await RemoteAdminService.RegisterNaturalPersonAsync(naturalPerson.GetNaturalPersonDC()); }
public async Task <IEnumerable <Person> > GetUsersAsync(PagingParameters pagingParameters) { return((await RemoteAdminService.GetUsersAsync(pagingParameters.GetPagingParametersDC())) .Select(personDataContract => personDataContract.GetPerson())); }
public async Task <AuthenticationResult> SignInAsync(string email, string password) { return((await RemoteAdminService.SignInAsync(email, password)).GetAuthenticationResult()); }
/// <summary> /// Refresh method implmentation /// </summary> public void Refresh() { RefreshData(RemoteAdminService.GetUsers()); }