private void CreateGroup(object sender, RoutedEventArgs e)
 {
     CreateAdministratorGroupImport import = new CreateAdministratorGroupImport
     {
         Name = input_Name.Text,
         CanViewUsers = input_CanViewUsers.SelectedIndex == 0,
         CanEditUsers = input_CanEditUsers.SelectedIndex == 0,
         CanViewTickets = input_CanViewTickets.SelectedIndex == 0,
         CanEditTickets = input_CanEditTickets.SelectedIndex == 0,
         CanViewActivities = input_CanViewActivities.SelectedIndex == 0,
         CanEditActivities = input_CanEditActivities.SelectedIndex == 0,
         CanViewDataReports = input_CanViewDataReports.SelectedIndex == 0,
         CanEditDataReports = input_CanEditDataReports.SelectedIndex == 0,
         CanViewSettings = input_CanViewSettings.SelectedIndex == 0,
         CanEditSettings = input_CanEditSettings.SelectedIndex == 0,
         IsCustomerService = input_IsCustomerService.SelectedIndex == 0,
         Token = DataManager.GetValue<AdministratorExport>(DataKey.IWorld_Backstage_AdministratorInfo).Token
     };
     AdministratorServiceClient client = new AdministratorServiceClient();
     client.CreateAdministratorGroupCompleted += ShowCreateGroupResult;
     client.CreateAdministratorGroupAsync(import);
 }
        //登陆
        void Login(object parameter)
        {
            if (IsBusy)
            {
                return;
            }
            IsBusy = true;

            //重置提示栏
            this.Error = "";

            #region 记住密码

            if (this.RememberMe == true)
            {
                LoginPackage package = new LoginPackage(this.Username, this.Password);
                DataManager.SetValue(DataKey.IWorld_Backstage_RememberMe, package);
            }
            else
            {
                DataManager.RemoveValue(DataKey.IWorld_Backstage_RememberMe);
            }

            #endregion

            //登陆
            AdministratorServiceClient client = new AdministratorServiceClient();
            client.LoginCompleted += ShowLoginResult;
            LoginImport import = new LoginImport
            {
                Username = this.Username,
                Password = this.Password
            };
            client.LoginAsync(import);
        }
 void EditAccount_do(object sender, EventArgs e)
 {
     IPop<ManagerViewModelBase.EditEditAccounPackage> cw = sender as IPop<ManagerViewModelBase.EditEditAccounPackage>;
     if (cw.DialogResult == true)
     {
         ManagerViewModelBase.EditEditAccounPackage package = cw.State;
         if (package.NewPassword != package.NewPassword2)
         {
             ShowError("两次输入的新密码不一致");
         }
         AdministratorExport self = DataManager.GetValue<AdministratorExport>(DataKey.IWorld_Backstage_AdministratorInfo);
         EditPasswordImport import = new EditPasswordImport
         {
             OldPassowrd = package.OldPassword,
             NewPassowrd = package.NewPassword,
             Token = self.Token
         };
         AdministratorServiceClient client = new AdministratorServiceClient();
         client.EditPasswordCompleted += ShowEditAccountResult;
         client.EditPasswordAsync(import);
     }
 }
        void Remove_do(object sender, EventArgs e)
        {
            NormalPrompt np = (NormalPrompt)sender;
            if (np.DialogResult != true) { return; }
            AdministratorExport aInfo = DataManager.GetValue<AdministratorExport>(DataKey.IWorld_Backstage_AdministratorInfo);

            RemoveAdministratorGroupImport import = new RemoveAdministratorGroupImport
            {
                Id = this.State.Id,
                Token = aInfo.Token
            };
            AdministratorServiceClient client = new AdministratorServiceClient();
            client.RemoveAdministratorGroupCompleted += ShowRemoveResult;
            client.RemoveAdministratorGroupAsync(import);
        }