private void retrieveBut_Click(object sender, RoutedEventArgs e) { string message = null; bool success = false; if (Disable) { message = "If you want to retrieve the car, you should manually enable the slot."; System.Windows.MessageBox.Show(message, "Confirmaton", MessageBoxButton.OK, MessageBoxImage.Information); } else { message = "Do you want to retrieve the car?"; } if (!Disable && System.Windows.MessageBox.Show(message, "Confirmaton", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes) { if (objGeneralDba.InsertQueue(objCarData.CardId, 0)) { this.retrieveEventHandler(sender, new EventArgs()); } else { System.Windows.MessageBox.Show("Error when sending retrieval request"); } } }
private void retrive_but_Click(object sender, RoutedEventArgs e) { if (objGeneralDba == null) objGeneralDba = new GeneralDba(); if (RequestType != 0) { MessageBoxResult messageBoxResult = System.Windows.MessageBox.Show("Do you want to Retrieve?", "Retrieve Confirmation", System.Windows.MessageBoxButton.YesNo); if (messageBoxResult == MessageBoxResult.Yes) { //4: for transfer objGeneralDba.InsertQueue(this.CardId, 0); this.Close(); } } }