private static void CallWebServiceAllIDs() { Console.WriteLine("Press Enter to call Server"); string enteredString = Console.ReadLine(); Service1Client client = new Service1Client(); ACATestDAL.DAL dal = new ACATestDAL.DAL(); IEnumerable<int> ids = dal.getTransmissionIDs("2015"); foreach (int id in ids) { Transmission trans = dal.getTransmissionByID(id); Console.WriteLine(string.Format("Processing transmission ID {0}.", trans.TransmissionIdentifier)); Submission s = trans.Submissions.FirstOrDefault(); Record1094C record = s.Record1094C.translate(); string receiptID = client.SubmitData(record); trans.ReceiptID = receiptID; dal.saveTransmissionReceiptID(trans); Console.WriteLine(String.Format(">>> Received Receipt ID {0}.", receiptID)); } Console.ReadLine(); }
private static void CallWebServiceSingleID() { Console.WriteLine("Press Enter to call Server"); string enteredString = Console.ReadLine(); Service1Client client = new Service1Client(); ACATestDAL.DAL dal = new ACATestDAL.DAL(); Record1094C record = dal.getRecord1094CByID(5).translate(); string message = client.SubmitData(record); Console.WriteLine(message); Console.ReadLine(); }