Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnChangePassword_Click(object sender, EventArgs e)
        {
            Rubrica.ClientProxy.UtentiServiceProxy proxy = new Rubrica.ClientProxy.UtentiServiceProxy(this._credentials, Properties.Settings.Default.ServiceRoot);

            proxy.ChangePassword(
                new Rubrica.ClientProxy.UtentiServices.ChangePwdSecurityCredentials
            {
                UserName    = this._credentials.UserName,
                Password    = this._credentials.Password,
                NewPassword = this.txtNewPassword.Text
            }
                );
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnLogin_Click(object sender, EventArgs e)
        {
            Rubrica.ClientProxy.UtentiServiceProxy proxy = new Rubrica.ClientProxy.UtentiServiceProxy(this.Credentials, Rubrica.WinClient.Properties.Settings.Default.ServiceRoot);

            bool amministratore;

            Rubrica.ClientProxy.UtentiServices.SecurityCredentialsResult result = proxy.ValidateCredentials();

            if (result != null)
            {
                this.Amministratore = result.Amministratore;

                this.DialogResult = DialogResult.OK;
            }
            else
            {
                MessageBox.Show(Properties.Resources.AuthenticationFailedException);
            }
        }