Beispiel #1
0
        private void VælgKunde_Click(object sender, RoutedEventArgs e)
        {
            //  sætter GetParent af type DataGridRow, og passer ind sender castet til button til vores row variable
            DataGridRow row = GetParent <DataGridRow>((Button)sender);

            //  finder den trykket pås row ID,
            FrameworkElement cellId = OversigtDataGrid.Columns[0].GetCellContent(row);

            //  konverter cellIDen til int32 for at give den til App.id fielden
            App.id = Convert.ToInt32(((TextBlock)cellId).Text);

            //  instantiere KundeOversigt klasse objekt
            KundeOversigt window = new KundeOversigt();

            //  siger denne her vindue er dens ejer
            window.Owner = this;
            //  på KundeOversigt klassens "NewDataAdded" eventhandler, der appender vi denne her metode vi selv har lavet
            window.NewDataAdded += AddNom_NewDataAdded;
            //  åbner den nye vindue
            window.ShowDialog();
        }
Beispiel #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.KundeWindow = ((OOPCaseProjekt.KundeOversigt)(target));

            #line 8 "..\..\KundeOversigt.xaml"
                this.KundeWindow.Loaded += new System.Windows.RoutedEventHandler(this.KundeWindow_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.OversigtDataGrid = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 3:
                this.Luk_Btn = ((System.Windows.Controls.Button)(target));

            #line 22 "..\..\KundeOversigt.xaml"
                this.Luk_Btn.Click += new System.Windows.RoutedEventHandler(this.Luk_Btn_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.Kunde_Konti = ((System.Windows.Controls.ComboBox)(target));

            #line 23 "..\..\KundeOversigt.xaml"
                this.Kunde_Konti.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.Kunde_Konti_SelectionChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.KundeWindow = ((OOPCaseProjekt.KundeOversigt)(target));

            #line 10 "..\..\..\View\KundeOversigt.xaml"
                this.KundeWindow.Loaded += new System.Windows.RoutedEventHandler(this.KundeWindow_Loaded);

            #line default
            #line hidden

            #line 10 "..\..\..\View\KundeOversigt.xaml"
                this.KundeWindow.Closed += new System.EventHandler(this.KundeWindow_Closed);

            #line default
            #line hidden
                return;

            case 2:
                this.OversigtDataGrid = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 3:
                this.BeløbFarve = ((System.Windows.Controls.DataGridTextColumn)(target));
                return;

            case 4:
                this.Luk_Btn = ((System.Windows.Controls.Button)(target));

            #line 37 "..\..\..\View\KundeOversigt.xaml"
                this.Luk_Btn.Click += new System.Windows.RoutedEventHandler(this.Luk_Btn_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.Label_KundeNr = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.Label_Navn = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.Label_Adresse = ((System.Windows.Controls.Label)(target));
                return;

            case 8:
                this.Label_Tlf = ((System.Windows.Controls.Label)(target));
                return;

            case 9:
                this.Label_KundeOpret = ((System.Windows.Controls.Label)(target));
                return;

            case 10:
                this.Label_KundeStatus = ((System.Windows.Controls.Label)(target));
                return;

            case 11:
                this.Kunde_Konti = ((System.Windows.Controls.ComboBox)(target));

            #line 50 "..\..\..\View\KundeOversigt.xaml"
                this.Kunde_Konti.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.Kunde_Konti_SelectionChanged);

            #line default
            #line hidden
                return;

            case 12:
                this.Postering_Btn = ((System.Windows.Controls.Button)(target));

            #line 52 "..\..\..\View\KundeOversigt.xaml"
                this.Postering_Btn.Click += new System.Windows.RoutedEventHandler(this.Postering_Btn_Click);

            #line default
            #line hidden
                return;

            case 13:
                this.ÆndreKunde_Btn = ((System.Windows.Controls.Button)(target));

            #line 54 "..\..\..\View\KundeOversigt.xaml"
                this.ÆndreKunde_Btn.Click += new System.Windows.RoutedEventHandler(this.ÆndreKunde_Btn_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.Label_KontoSaldo = ((System.Windows.Controls.Label)(target));
                return;

            case 15:
                this.Label_KontoOpret = ((System.Windows.Controls.Label)(target));
                return;

            case 16:
                this.Label_KontoStatus = ((System.Windows.Controls.Label)(target));
                return;

            case 17:
                this.ÆndreKonto_Btn = ((System.Windows.Controls.Button)(target));

            #line 60 "..\..\..\View\KundeOversigt.xaml"
                this.ÆndreKonto_Btn.Click += new System.Windows.RoutedEventHandler(this.ÆndreKonto_Btn_Click);

            #line default
            #line hidden
                return;

            case 18:
                this.Label_KontoType = ((System.Windows.Controls.Label)(target));
                return;

            case 19:
                this.Label_KontoRente = ((System.Windows.Controls.Label)(target));
                return;

            case 20:
                this.NyKonto_Btn = ((System.Windows.Controls.Button)(target));

            #line 65 "..\..\..\View\KundeOversigt.xaml"
                this.NyKonto_Btn.Click += new System.Windows.RoutedEventHandler(this.NyKonto_Btn_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }