private String createPost(CaseSearchOptions options) { String toPost = ""; toPost += crawler.multipartField("office", options.office); if (options.case_type != null) { foreach (CaseSearchOptions.case_types t in options.case_type) { toPost += crawler.multipartField("case_type", t.ToString()); } } if (options.chapter != null) { foreach (CaseSearchOptions.chapters t in options.chapter) { toPost += crawler.multipartField("chapter", ((int)t).ToString()); } } toPost += crawler.multipartField("trustee", "All"); toPost += crawler.multipartField("aty_saved", ""); toPost += crawler.multipartField("aty_orig", ""); toPost += crawler.multipartField("filer", ""); toPost += crawler.multipartField("txtclue", options.txtclue); toPost += crawler.multipartField("DateType", options.date_type.ToString()); toPost += crawler.multipartField("StartDate", options.start.ToString("M/d/yy")); toPost += crawler.multipartField("EndDate", options.end.ToString("M/d/yy")); if (options.open_cases) { toPost += crawler.multipartField("open_cases", "on"); } if (options.closed_cases) { toPost += crawler.multipartField("closed_cases", "on"); } if (options.party_information) { toPost += crawler.multipartField("party_information", "on"); } if (options.proseonly) { toPost += crawler.multipartField("proseonly", "on"); } toPost += crawler.multipartField("EndDate", ""); toPost += crawler.multipartField("sort1", "case number"); toPost += crawler.multipartField("sort2", ""); toPost += crawler.multipartField("sort3", ""); toPost += crawler.multipartField("data_format", "data only"); toPost += crawler.multipartEnd(); return(toPost); }
///<summary> ///Office - Indicates the divisional office in which the case was filed. ///Case type - “ap” for Adversary Proceeding, “bk” for Bankruptcy, or “mp” for Miscellaneous Proceeding. ///Chapter - You may choose any or all chapters to be included in the report. Use the control button on the keyboard when clicking on non-consecutive items in the list to highlight specific items. ///Trustee - You may choose to sort reports for cases assigned to a trustee. ///Date Type - You may choose to display the report according to Filed Date, Entered Date, Discharged Date, Dismissed Date, Closed Date, or Converted Date. ///From/to - Choose a beginning and ending date to display all cases between the dates entered. Cases displayed will be representative of the sort ///NOTE: Do not enter a date range that is too broad. Doing so can result in difficulty receiving the data in addition to accruing charges for a large report. ///June 2010 74 ///option (Date Type) above. Enter dates in MM/DD/YYYY format. ///Open cases/Closed cases - Click these boxes to produce a report containing open cases, closed cases, or both (if both boxes are checked) filed within the date range selected. ///Party information - Click this box to display addresses for all parties listed on the report. ///Sort By - Multiple sort options are provided within this report. They are Sort by Filed Date, Entered Date, Case Number, Case Type, (Divisional) Office, and Trustee. ///</summary> ///<remarks> ///</remarks> public FindCasesResult FindCases(CaseSearchOptions options) { //navigate to the search page String formAction = baseUrl() + crawler.GetFormAction(caseSearchUrl()); //remove the .. (alabama north version 5.0) formAction = formAction.Replace("..", ""); String response = crawler.Post(formAction, createPost(options), true); return(parseResponse(response)); }
public bool QueryNewCases() { o = new CaseSearchOptions(); string user = System.Configuration.ConfigurationManager.AppSettings.Get("PACERuser"); string pass = System.Configuration.ConfigurationManager.AppSettings.Get("PACERPassword"); _court = CourtService.GetByID(_courtID); _bankruptcyParser = new BankruptcyParser(_court.URLAbbrv, user, pass); // Login to the system if (!_bankruptcyParser.Login()) { _importMessage = "Could Not Login: "******"FAILURE"; _court = CourtService.GetByID(_courtID); _bankruptcyParser = new BankruptcyParser(_court.URLAbbrv, user, pass); if (!_bankruptcyParser.NextGenLogin()) { return(false); } else { return(true); } } // setup the search paramters o.open_cases = true; o.closed_cases = true; o.party_information = true; //set the chapters and discharged/filed o.chapter = new List <CaseSearchOptions.chapters>(); if (_dischargedCases == true) { o.date_type = CaseSearchOptions.date_types.discharged; o.chapter.Add(CaseSearchOptions.chapters.seven); o.chapter.Add(CaseSearchOptions.chapters.thirteen); } else { o.date_type = CaseSearchOptions.date_types.filed; o.chapter.Add(CaseSearchOptions.chapters.seven); } //set the case type o.case_type = new List <CaseSearchOptions.case_types>(); o.case_type.Add(CaseSearchOptions.case_types.bk); //Set the start and end dates. o.start = DateTime.Parse(_startDate.ToString()); o.end = DateTime.Parse(_endDate.ToString()); _result = _bankruptcyParser.FindCases(o); if (_result == null) { _importMessage = "Could Not Find Cases:" + _bankruptcyParser.lastError; _importStatus = "FAILURE"; PacerImportTransactionService.Save(this); return(false); } else { this.BillablePages = _result.billable_pages; this.Cost = Decimal.Parse(_result.cost.ToString()); SearchCriteria = _result.criteria; DownloadTimeStamp = DateTime.Now; PacerImportTransactionService.Save(this); //don't set the status and message yet as we still have to import... return(true); } }