Пример #1
0
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                Association _association = new Association();
                _association.Name        = txtName.Text;
                _association.Extension   = txtExtension.Text;
                _association.Action      = cmbActions.Text;
                _association.Destination = txtDestination.Text;

                _bassociation.Add(_association);
                _associationManager.dgAssociations.ItemsSource = _bassociation.getListOfAssociations();

                System.Windows.MessageBox.Show("Association has been added sucessfully!¡");
            }
            catch (Exception ex)
            {
                System.Windows.MessageBox.Show(ex.Message);
            }
        }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     dgAssociations.ItemsSource = _bassociation.getListOfAssociations();
 }