// return a list of records for the chosen search county and year public List <ListObject> GetLists() { List <ListObject> list = new List <ListObject>(); string doc_id = ""; DBRecord test = null; if (County.Equals("Dublin")) { if (Dates.Equals("All Year")) { doc_id = County + Year + "_1"; test = DatabaseConnect2.ReadDocument(doc_id); list = test.records; test = null; doc_id = County + Year + "_2"; test = DatabaseConnect2.ReadDocument(doc_id); list.AddRange(test.records); test = null; doc_id = County + Year + "_3"; test = DatabaseConnect2.ReadDocument(doc_id); list.AddRange(test.records); test = null; doc_id = County + Year + "_4"; test = DatabaseConnect2.ReadDocument(doc_id); list.AddRange(test.records); test = null; doc_id = County + Year + "_5"; test = DatabaseConnect2.ReadDocument(doc_id); list.AddRange(test.records); test = null; doc_id = County + Year + "_6"; test = DatabaseConnect2.ReadDocument(doc_id); list.AddRange(test.records); test = null; doc_id = County + Year + "_7"; test = DatabaseConnect2.ReadDocument(doc_id); list.AddRange(test.records); test = null; doc_id = County + Year + "_8"; test = DatabaseConnect2.ReadDocument(doc_id); list.AddRange(test.records); test = null; doc_id = County + Year + "_9"; test = DatabaseConnect2.ReadDocument(doc_id); list.AddRange(test.records); test = null; doc_id = County + Year + "_10"; test = DatabaseConnect2.ReadDocument(doc_id); list.AddRange(test.records); test = null; doc_id = County + Year + "_11"; test = DatabaseConnect2.ReadDocument(doc_id); list.AddRange(test.records); test = null; doc_id = County + Year + "_12"; test = DatabaseConnect2.ReadDocument(doc_id); list.AddRange(test.records); test = null; } else if (Dates.Equals("January")) { doc_id = County + Year + "_1"; test = DatabaseConnect2.ReadDocument(doc_id); list = test.records; } else if (Dates.Equals("February")) { doc_id = County + Year + "_2"; test = DatabaseConnect2.ReadDocument(doc_id); list = test.records; } else if (Dates.Equals("March")) { doc_id = County + Year + "_3"; test = DatabaseConnect2.ReadDocument(doc_id); list = test.records; } else if (Dates.Equals("April")) { doc_id = County + Year + "_4"; test = DatabaseConnect2.ReadDocument(doc_id); list = test.records; } else if (Dates.Equals("May")) { doc_id = County + Year + "_5"; test = DatabaseConnect2.ReadDocument(doc_id); list = test.records; } else if (Dates.Equals("June")) { doc_id = County + Year + "_6"; test = DatabaseConnect2.ReadDocument(doc_id); list = test.records; } else if (Dates.Equals("July")) { doc_id = County + Year + "_7"; test = DatabaseConnect2.ReadDocument(doc_id); list = test.records; } else if (Dates.Equals("August")) { doc_id = County + Year + "_8"; test = DatabaseConnect2.ReadDocument(doc_id); list = test.records; } else if (Dates.Equals("September")) { doc_id = County + Year + "_9"; test = DatabaseConnect2.ReadDocument(doc_id); list = test.records; } else if (Dates.Equals("October")) { doc_id = County + Year + "_10"; test = DatabaseConnect2.ReadDocument(doc_id); list = test.records; } else if (Dates.Equals("November")) { doc_id = County + Year + "_11"; test = DatabaseConnect2.ReadDocument(doc_id); list = test.records; } else // december { doc_id = County + Year + "_12"; test = DatabaseConnect2.ReadDocument(doc_id); list = test.records; } } else // rest of ireland (not dublin) { if (Dates.Equals("All Year")) { doc_id = County + Year + "_A"; // first part of year test = DatabaseConnect2.ReadDocument(doc_id); list = test.records; test = null; doc_id = County + Year + "_B"; // second part of year test = DatabaseConnect2.ReadDocument(doc_id); list.AddRange(test.records); } else if (Dates.Equals("First 6 Months")) { doc_id = County + Year + "_A"; test = DatabaseConnect2.ReadDocument(doc_id); list = test.records; } else // last 6 months { doc_id = County + Year + "_B"; test = DatabaseConnect2.ReadDocument(doc_id); list = test.records; } } return(list); }