private void aircraftConfigDataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e) { DataGrid acDataGrid = sender as DataGrid; if (acDataGrid.SelectedIndex > -1) { AircraftConfiguration selectedItem = acDataGrid.SelectedItem as AircraftConfiguration; NewEditAircraftConfigurationWindow editACWindow = new NewEditAircraftConfigurationWindow(selectedItem.AircraftConfigurationId); editACWindow.ShowDialog(); if (editACWindow.DialogResult.HasValue && editACWindow.DialogResult.Value) { DoSearch(); } } }
private async void Page_Loaded(object sender, RoutedEventArgs e) { NewEditAircraftConfigurationWindow window = this.window as NewEditAircraftConfigurationWindow; window.Top = SystemParameters.PrimaryScreenHeight / 2 - window.ActualHeight / 2; if (window.mainFrame.CanGoBack) { backBtn.Visibility = Visibility.Visible; backBtn.IsEnabled = true; } if (Status == STATUS.EDIT && AircraftConfiguration.SeatMapImagePath == null) { DataRow seatMapImageData = await dbCon.GetDataRow("AircraftConfiguration", new DataRow("AircraftConfigurationId", AircraftConfiguration.AircraftConfigurationId)); if (seatMapImageData.HasData && seatMapImageData.Error == ERROR.NoError) { if (seatMapImageData.Get("SeatMapImage") != DBNull.Value) { seatMapImage.Source = seatMapImageData.Get("SeatMapImage").BlobToSource(); nextBtn.IsEnabled = true; } } } }