Beispiel #1
0
        public static AutoMail FromTypeOrganizationAndGeography(AutoMailType type, Organization org, Geography geo)
        {
            BasicAutoMail basic = SwarmDb.GetDatabaseForReading().GetAutoMail(type, org.Identity, geo.Identity);

            if (basic == null)
            {
                return(null);
            }

            if (basic.Body.Trim().Length < 3)
            {
                return(null); // If there is no body, there is no mail
            }

            return(FromBasic(basic));
        }
Beispiel #2
0
        } // Private constructor

        private AutoMail(BasicAutoMail basic) : base(basic)
        {
        }
Beispiel #3
0
 internal static AutoMail FromBasic(BasicAutoMail basic)
 {
     return(new AutoMail(basic));
 }
Beispiel #4
0
 public int SetAutoMail(BasicAutoMail autoMail)
 {
     return(SetAutoMail(autoMail.Type, autoMail.OrganizationId, autoMail.GeographyId,
                        autoMail.AuthorPersonId, autoMail.Title, autoMail.Body));
 }