Exemplo n.º 1
0
        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
            }
        }
Exemplo n.º 2
0
        public static void Begin(Communication communication)
        {
            int beforeCount = 0;
            int afterCount  = 0;

            // Communication API
            List <Communication> communications;

            // Get exsisting
            beforeCount = CommunicationDAO.Get().Count;

            // Insert and Updating: if ID is included, it will update
            communication = CommunicationDAO.PostUpdate(communication);

            // Reading: Use GetCommunications() to retrieve a list of communicationlications
            communications = CommunicationDAO.Get();

            // get master item count
            afterCount = communications.Count;

            // write
            CommunicationTest.Write(communications, "INSERT", beforeCount, afterCount, true);
            Console.Read();

            // make a soft update to some property
            communication.applicationId = 1;

            // re-assign the before count
            beforeCount = afterCount;

            // Insert and Updating: if ID is included, it will update
            communication = CommunicationDAO.PostUpdate(communication);

            // Reading: Use GetCommunications() to retrieve a list of communicationlications
            communications = CommunicationDAO.Get();

            // Get exsisting
            afterCount = CommunicationDAO.Get().Count;

            // write
            CommunicationTest.Write(communications, "UPDATE", beforeCount, afterCount);
            Console.Read();

            // get a single communicationlication (returns a list)
            communications = CommunicationDAO.Get(communication);

            // get count
            afterCount = communications.Count;

            // reassign count
            beforeCount = afterCount;

            // write
            CommunicationTest.Write(communications, "Single", afterCount, 1);
            Console.Read();

            // Deleting - Send in the communicationlication w/ at minimal the ID populated
            CommunicationDAO.Delete(communication);

            // Reading: Use GetCommunications() to retreieve a list of communicationlications
            communications = CommunicationDAO.Get();

            // get count
            afterCount = communications.Count;

            // write
            CommunicationTest.Write(communications, "Removed", beforeCount, afterCount, true);
            Console.Read();
        }