Exemple #1
0
        private void OnButtonAddTenantClick(object sender, RoutedEventArgs e)
        {
            SelectObjectWindow window = new SelectObjectWindow(MainWindow.Context.Tenants);

            window.ShowDialog();

            if (!(window.SelectedObject is Tenant))
            {
                return;
            }

            Tenant tenant = (Tenant)window.SelectedObject;

            _contract.Tenant = tenant.DNI;

            DataContext = null;
            DataContext = _contract;
        }
Exemple #2
0
        private void OnButtonAddGuarantorClick(object sender, RoutedEventArgs e)
        {
            SelectObjectWindow window = new SelectObjectWindow(MainWindow.Context.Guarantors);

            window.ShowDialog();

            if (!(window.SelectedObject is Guarantor))
            {
                return;
            }

            Guarantor guarantor = (Guarantor)window.SelectedObject;

            _contract.Guarantor = guarantor.DNI;

            DataContext = null;
            DataContext = _contract;
        }
Exemple #3
0
        private void OnButtonAddPropertyClick(object sender, RoutedEventArgs e)
        {
            SelectObjectWindow window = new SelectObjectWindow(MainWindow.Context.Properties);

            window.ShowDialog();

            if (!(window.SelectedObject is Property))
            {
                return;
            }

            Property property = (Property)window.SelectedObject;

            _contract.Property = property.ID;

            DataContext = null;
            DataContext = _contract;
        }