Exemplo n.º 1
0
        private void btn_Edit_Click(object sender, RoutedEventArgs e)
        {
            if (this.IsEditState && this.IsValid())
            {
                ESBackupServerAdminServiceClient client = new ESBackupServerAdminServiceClient();

                this.Admin.FirstName = this.textBox_FirstName.Text;
                this.Admin.LastName  = this.textBox_LastName.Text;
                this.Admin.Emails    = new List <Email>(this._gridEmailsList);

                client.UpdateAdministrator(this.Admin);

                this.DisableComponents();
                this.IsEditState = false;

                client.Close();
            }
            else
            {
                this.EnableComponents();
                this.IsEditState = true;
            }
        }