Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void PostLatLong(string fileType, string fileNumber, List<LatLongDEntry> latLongList, DateTime? transactionDate = null, string commentText1 = null, string commentText2 = null, string username = null, string password = null)
- {
- string transactionCode = "LATLONGS";
- List<List<LatLongEntry>> splitList = new List<List<LatLongEntry>>();
- try
- {
- while (latLongList.Any())
- {
- splitList.Add(latLongList.Take(5).ToList());
- latLongList = latLongList.Skip(5).ToList();
- }
- foreach (List<LatLongEntry> list in splitList)
- {
- SetupCaseFileUpdateTransaction(transactionCode, fileType, fileNumber, commentText1, commentText2, transactionDate, username, password);
- SetCode(1, list[0].Latitude);
- SetCode(2, list[0].Longitude);
- if (list.Count > 1)
- {
- SetCode(4, list[1].Latitude);
- SetCode(5, list[1].Longitude);
- }
- if (list.Count > 2)
- {
- SetCode(6, list[2].Latitude);
- SetCode(7, list[2].Longitude);
- }
- if (list.Count > 3)
- {
- SetMisc(1, list[3].Latitude);
- SetMisc(2, list[3].Longitude);
- }
- if (list.Count > 4)
- {
- SetMisc(3, list[4].Latitude);
- SetMisc(4, list[4].Longitude);
- }
- CallWebService();
- }
- }
- catch (Exception e)
- {
- LogTransactionException(transactionCode, e);
- throw;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement