private void Delete_record_from_list_of_matches() { string input = _input_output.Get_input(ReconConsts.EnterDeletionIndex, Reconciliator.Current_source_description()); if (!string.IsNullOrEmpty(input) && Char.IsDigit(input[0])) { Reconciliator.Delete_specific_owned_record_from_list_of_matches(Convert.ToInt16(input)); if (Reconciliator.Num_potential_matches() == 0) { _input_output.Output_line(ReconConsts.NoMatchesLeft); } else { // Update the display. if (_doing_semi_automatic_matching) { Show_current_record_and_semi_auto_matches(); } else { Show_current_record_and_manual_matches(); } Get_and_record_choice_of_matching(); } } }
private void Get_and_record_choice_of_matching() { string input = _input_output.Get_input(ReconConsts.EnterNumberOfMatch, Reconciliator.Current_source_description()); if (!string.IsNullOrEmpty(input)) { try { if (Char.IsDigit(input[0])) { Mark_the_match(input); } else if (input.ToUpper() == "D") { Process_deletion(); } } catch (Exception exception) { _input_output.Output_line(exception.Message); Get_and_record_choice_of_matching(); } } }
private void Process_deletion() { string input = _input_output.Get_input(ReconConsts.WhetherToDeleteThirdParty, Reconciliator.Current_source_description()); try { if (!string.IsNullOrEmpty(input) && input.ToUpper() == "Y") { Reconciliator.Delete_current_third_party_record(); } else { Delete_record_from_list_of_matches(); } } catch (Exception e) { _input_output.Output_line(e.Message); Get_and_record_choice_of_matching(); } }