void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.WindowStadium = ((ReservationFootballStadiums.Stadium)(target)); return; case 2: this.LblEntry = ((System.Windows.Controls.Label)(target)); return; case 3: this.lblAddStadium = ((System.Windows.Controls.Label)(target)); return; case 4: this.TxtStadium = ((System.Windows.Controls.TextBox)(target)); return; case 5: this.BtnAdd = ((System.Windows.Controls.Button)(target)); #line 20 "..\..\Stadium.xaml" this.BtnAdd.Click += new System.Windows.RoutedEventHandler(this.BtnAdd_Click); #line default #line hidden return; case 6: this.CmbStadiums = ((System.Windows.Controls.ComboBox)(target)); return; case 7: this.BtnUpdate = ((System.Windows.Controls.Button)(target)); #line 27 "..\..\Stadium.xaml" this.BtnUpdate.Click += new System.Windows.RoutedEventHandler(this.BtnUpdate_Click); #line default #line hidden return; case 8: this.BtnDelete = ((System.Windows.Controls.Button)(target)); #line 28 "..\..\Stadium.xaml" this.BtnDelete.Click += new System.Windows.RoutedEventHandler(this.BtnDelete_Click); #line default #line hidden return; } this._contentLoaded = true; }
private void BtnUpdate_Delete_Stad_Click(object sender, RoutedEventArgs e) { if (CmbStadiums.SelectedItem == null) { MessageBox.Show("sehv var"); LblStadium.Foreground = Brushes.Red; return; } Stadiums vwReservs = CmbStadiums.SelectedItem as Stadiums; Stadium updateStadium = new Stadium(this); updateStadium.ShowDialog(); LblStadium.Foreground = Brushes.White; updateStadium.Title = "Yenilə və ya Sil"; updateStadium.LblEntry.Content = "Meydanca yenilə və ya sil"; updateStadium.ForUpdate(); updateStadium.Meydanca = db.Stadiums.Find(vwReservs.Id); updateStadium.FillAllFields(); }
private void BtnAddStadium_Click(object sender, RoutedEventArgs e) { Stadium add = new Stadium(this); add.ShowDialog(); }