/// <summary> /// This method will be invoked by the class for which /// validation is performed /// </summary> /// <param name="message">Some message about validation</param> /// <param name="isValid">Is the worksheet is valid and error free</param> public void ValidationCompleted(string message, bool isValid) { btnCancel.IsEnabled = true; btnBrowseFile.IsEnabled = true; txtOut.Cursor = Cursors.Arrow; this.Cursor = Cursors.Arrow; lblTitle.Content = "Validation completed"; if (isValid) { if (MessageBox.Show(message, "Validation Result", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes) { btnBrowseFile.IsEnabled = false; btnCancel.IsEnabled = false; txtOut.Cursor = Cursors.Wait; this.Cursor = Cursors.Wait; lblTitle.Content = "Pushing information to database."; //perferom database update prgsbar.Value = 0; cat.PushToDatabase(fileName); } } else { MessageBox.Show(message, "Validation Result", MessageBoxButton.OK, MessageBoxImage.Exclamation); } }