Пример #1
0
        private async void buttonEditUser_Click(object sender, EventArgs e)
        {
            ClearErrorProvidres();
            BuildUser();
            try
            {
                AuthenticationServiceClient client = new AuthenticationServiceClient();
                Form frm = new ProgressForm();
                frm.Show();

                OperationResult serviceResult = await client.UpdateUserAsync(user);

                frm.Close();
                if (CheckServiceResult(serviceResult))
                {
                    DialogResult = DialogResult.OK;
                    Close();
                }
            }
            catch (FaultException <Models.Faults.InvalidRoleFault> exc)
            {
                MessageBox.Show(exc.Message);
            }
            catch (FaultException exc)
            {
                MessageBox.Show(exc.Message);
            }
        }