private void addNewRepairActionBtn_MouseDown(object sender, MouseButtonEventArgs e) { try { mSelectedAction = new LotRepairAction(mRepair.GetRepairID()); LotRepairActionWindow actionWindow = new LotRepairActionWindow(mSelectedAction, true); actionWindow.ObjectModified += new RoutedEventHandler(actionWindow_ObjectModified); actionWindow.ShowDialog(); } catch (Exception ex) { MessageBox.Show("Loading New Lot Repair Action - " + msgCodes.GetString("M2102") + ex.Message, "Error - 2102", MessageBoxButton.OK, MessageBoxImage.Error); } }
private void lotGridView_MouseDown(object sender, MouseButtonEventArgs e) { if (e.ClickCount == 2 && cmdSaveEdit.Content.Equals(saveBtnTxt)) { if (dgRepairActions.SelectedIndex > -1) { LotRepairActionBinding obj = (LotRepairActionBinding)dgRepairActions.SelectedCells[0].Item; dataGridData.SeekToPrimaryKey(obj.actionID); mSelectedAction = new LotRepairAction(dataGridData.GetRecordDataSet()); LotRepairActionWindow actionWindow = new LotRepairActionWindow(mSelectedAction, false); actionWindow.ObjectModified += new RoutedEventHandler(actionWindow_ObjectModified); actionWindow.ShowDialog(); } } }