private void btnSearchBankruptcyCases_Click(object sender, RoutedEventArgs e) { Mouse.OverrideCursor = Cursors.Wait; try { List <BankruptcyCase> _bankruptcyCases; if (cboCourt.SelectedIndex > -1) { _bankruptcyCases = BankruptcyCaseService.GetFiltered(txtPacerImportTransactionID.Text, txtCaseNumber.Text, txtDebtorFirstName.Text, txtDebtorLastName.Text, ((Court)cboCourt.SelectedValue).ID, txtPostalCode.Text, (bool)rdoUnsoldOnly.IsChecked); } else { _bankruptcyCases = BankruptcyCaseService.GetFiltered(txtPacerImportTransactionID.Text, txtCaseNumber.Text, txtDebtorFirstName.Text, txtDebtorLastName.Text, 0, txtPostalCode.Text, (bool)rdoUnsoldOnly.IsChecked); } GridViewBankruptcyCases.ItemsSource = _bankruptcyCases; } catch (Exception ex) { } //foreach (BankruptcyCase _BankruptcyCase in _BankruptcyCases) //{ // if (_BankruptcyCase.Latitude == null) // { // BingGeoCoder.GeocodeCase(_BankruptcyCase); // BankruptcyCaseService.Save(_BankruptcyCase); // } //} Mouse.OverrideCursor = Cursors.Arrow; }
public RawDataWindow(PacerImportTransaction _transaction) { InitializeComponent(); if (_transaction != null) { this._pITransaction = _transaction; txtCourtName.Text = _pITransaction.CourtName; txtBillablePages.Text = _pITransaction.BillablePages.ToString(); txtCost.Text = _pITransaction.Cost.ToString("c"); txtTimestamp.Text = _pITransaction.DownloadTimeStamp.ToLongTimeString(); txtStartDate.Text = _pITransaction.StartDate.ToShortDateString(); txtEndDate.Text = _pITransaction.EndDate.ToShortDateString(); txtLines.Text = _pITransaction.LineCount.ToString(); txtUniqueCases.Text = _pITransaction.TotalCases.ToString(); txtImportStatus.Text = _pITransaction.ImportStatus; try { // Read the file as one string. System.IO.StreamReader myFile = new System.IO.StreamReader(_pITransaction.FilePath); txtRawData.Text = myFile.ReadToEnd(); myFile.Close(); } catch (IOException e) { // Let the user know what went wrong. txtRawData.Text = "The original raw data file was not found and may have been moved/removed from the directory!"; } GridViewLineItems.ItemsSource = PacerImportDataService.GetForImportTransaction(_pITransaction.ID); GridViewBankruptcyCases.ItemsSource = BankruptcyCaseService.GetFiltered(_pITransaction.ID.ToString(), string.Empty, string.Empty, string.Empty, 0, string.Empty, false); Mouse.OverrideCursor = Cursors.Arrow; } }