public ContactSendingOption(IContact contact, SendableDocumentCategories sendableDocumentCategory, SendingOptions sendingOption, bool value) { Contact = contact; SendableDocumentCategory = sendableDocumentCategory; SendingOption = sendingOption; Value = value; }
// Used only for testing (for now) public static List<IContact> GetContacts(IDalSession session, SendableDocumentCategories category, SendingOptions sendingOption, bool value) { Hashtable parameters = new Hashtable(); parameters.Add("Category", (int)category); parameters.Add("SendingOption", (int)sendingOption); parameters.Add("Value", value); string hql = @"from Contact C left join fetch C.contactSendingOptions SO where SO.SendableDocumentCategory = :Category and SO.SendingOption = :SendingOption and SO.Value = :Value order by C.CurrentNAW.Name"; return session.GetTypedListByHQL<IContact>(hql, parameters); }
public bool NeedsSendByPost(SendableDocumentCategories documentCategory) { return ContactSendingOptions.GetValueOrDefault(documentCategory, SendingOptions.ByPost); }