Exemple #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.UpdateWindow = ((View.UpdateView)(target));
                return;

            case 2:
                this.txtFirstName = ((System.Windows.Controls.TextBox)(target));
                return;

            case 3:
                this.txtLastName = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.txtPhoneNumber = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.txtEmail = ((System.Windows.Controls.TextBox)(target));
                return;

            case 6:
                this.dtStart = ((System.Windows.Controls.DatePicker)(target));
                return;

            case 7:
                this.dtEnd = ((System.Windows.Controls.DatePicker)(target));
                return;
            }
            this._contentLoaded = true;
        }
 private void btn_Update(object sender, RoutedEventArgs e)
 {
     if (viewModel.SelectedItem != null)
     {
         UpdateView childUpdateView = new UpdateView();
         childUpdateView.Owner       = this;
         childUpdateView.DataContext = viewModel;
         childUpdateView.ShowDialog();
     }
 }