Exemplo n.º 1
0
        public void TestContacts()
        {
            var contacts = ContactActiveRecordSet.GetContactsByAhsId("6036343", "FNSP");

            Assert.IsTrue(contacts.Count == 2, contacts.LastError);
            foreach (ContactActiveRecord contact in contacts)
            {
                Console.WriteLine("Contact: {0} Title: {1}", contact.ContactName, contact.Title);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets the contacts by ahs id.
        /// </summary>
        /// <param name="ahsId">The ahs id.</param>
        /// <param name="instance">The instance.</param>
        /// <returns></returns>
        static public ContactActiveRecordSet GetContactsByAhsId(string ahsId, string instance)
        {
            var contacts = new ContactActiveRecordSet
            {
                Instance = instance,
                Query    =
                    "select * from CONTACT where CONTACT_ID IN (select CONTACT_ID from AHS_CONTACT where ACCNT_HRCY_STEP_ID = :ahsId)"
            };

            contacts.AddParameter("ahsId", ahsId);
            contacts.Execute();
            return(contacts);
        }