public static void Begin() { List <Application> applications = ApplicationDAO.Get(); List <Communication> communications = CommunicationDAO.Get(); List <CommunicationType> communicationTypes = CommunicationTypeDAO.Get(); List <DirectionType> directionTypes = DirectionTypeDAO.Get(); foreach (Application app in applications) { // for each application, initalize inbound interface connections } }
public static void Begin(CommunicationType communicationType) { int beforeCount = 0; int afterCount = 0; // CommunicationType API List <CommunicationType> communicationTypes; // Get exsisting beforeCount = CommunicationTypeDAO.Get().Count; // Insert and Updating: if ID is included, it will update communicationType = CommunicationTypeDAO.PostUpdate(communicationType); // Reading: Use GetCommunicationTypes() to retrieve a list of communicationTypelications communicationTypes = CommunicationTypeDAO.Get(); // get master item count afterCount = communicationTypes.Count; // write CommunicationTypeTest.Write(communicationTypes, "INSERT", beforeCount, afterCount, true); Console.Read(); // re-assign the before count beforeCount = afterCount; // Insert and Updating: if ID is included, it will update communicationType = CommunicationTypeDAO.PostUpdate(communicationType); // Reading: Use GetCommunicationTypes() to retrieve a list of communicationTypelications communicationTypes = CommunicationTypeDAO.Get(); // Get exsisting afterCount = CommunicationTypeDAO.Get().Count; // write CommunicationTypeTest.Write(communicationTypes, "UPDATE", beforeCount, afterCount); Console.Read(); // get a single communicationTypelication (returns a list) communicationTypes = CommunicationTypeDAO.Get(communicationType); // get count afterCount = communicationTypes.Count; // reassign count beforeCount = afterCount; // write CommunicationTypeTest.Write(communicationTypes, "Single", afterCount, 1); Console.Read(); // Deleting - Send in the communicationTypelication w/ at minimal the ID populated CommunicationTypeDAO.Delete(communicationType); // Reading: Use GetCommunicationTypes() to retreieve a list of communicationTypelications communicationTypes = CommunicationTypeDAO.Get(); // get count afterCount = communicationTypes.Count; // write CommunicationTypeTest.Write(communicationTypes, "Removed", beforeCount, afterCount, true); Console.Read(); }