Beispiel #1
0
 public ContactSendingOption(IContact contact, SendableDocumentCategories sendableDocumentCategory, 
                               SendingOptions sendingOption, bool value)
 {
     Contact = contact;
     SendableDocumentCategory = sendableDocumentCategory;
     SendingOption = sendingOption;
     Value = value;
 }
Beispiel #2
0
        // 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);
        }
Beispiel #3
0
 public bool NeedsSendByPost(SendableDocumentCategories documentCategory)
 {
     return ContactSendingOptions.GetValueOrDefault(documentCategory, SendingOptions.ByPost);
 }