public AssociationsManager()
        {
            _association = null;

            InitializeComponent();
            //
            _bassociation = new BAssociation();
        }
        public AssociationWindow(AssociationsManager form)
        {
            //Communicating two windows for updating datagrid.
            _associationManager = null;
            _associationManager = form as AssociationsManager;

            InitializeComponent();

            //
            _bassociation = new BAssociation();
        }
        public AssociationWindow(AssociationsManager form,Association association)
        {
             
            _bassociation = new BAssociation();

            InitializeComponent();

            //Communicating two windows for updating datagrid.
            _associationManager = null;
            _associationManager = form as AssociationsManager;

            //Set values to textboxes.
            this.id = association.Id;
            txtName.Text = association.Name;
            txtExtension.Text = association.Extension;
            txtDestination.Text = association.Destination;
            cmbActions.SelectedValue = association.Action;
             
            //We are going to change the event for the button to update.
            btnSave.Click -= btnSave_Click;
            btnSave.Click += btnUpdate_Click;
        }