Ejemplo n.º 1
0
        /// <summary>
        /// Clears this instance.
        /// </summary>
        public static void Clear()
        {
            using (DbTransaction tran = DbTransaction.Begin())
            {
                EMailMessageLogRow.Clear();

                tran.Commit();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Lists this instance.
        /// </summary>
        /// <returns></returns>
        public static EMailMessageLog[] List()
        {
            ArrayList retVal = new ArrayList();

            foreach (EMailMessageLogRow row in EMailMessageLogRow.List())
            {
                retVal.Add(new EMailMessageLog(row));
            }

            return((EMailMessageLog[])retVal.ToArray(typeof(EMailMessageLog)));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Adds the specified from.
        /// </summary>
        /// <param name="From">From.</param>
        /// <param name="To">To.</param>
        /// <param name="Subject">The subject.</param>
        internal static void Add(string From, string To, string Subject)
        {
            using (DbTransaction tran = DbTransaction.Begin())
            {
                EMailMessageLogRow row = new EMailMessageLogRow();

                row.Incoming = false;
                row.Created  = DateTime.UtcNow;

                row.From           = From;
                row.To             = To;
                row.Subject        = Subject;
                row.AntiSpamResult = (int)EMailMessageAntiSpamRuleRusult.Accept;
                row.EMailBoxId     = -1;

                row.Update();
                tran.Commit();
            }
        }
Ejemplo n.º 4
0
 private EMailMessageLog(EMailMessageLogRow row)
 {
     _srcRow = row;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Cleans the up.
 /// </summary>
 /// <param name="Period">The period.</param>
 public static void CleanUp(int Period)
 {
     EMailMessageLogRow.CleanUp(Period);
 }