コード例 #1
0
 private void UpdateOrCreateMailboxAutoreply(int mailBoxId, int tenantId, MailAutoreply autoreply)
 {
     using (var db = GetDb())
     {
         var autoreplyDal = new AutoreplyDal(db);
         autoreplyDal.UpdateOrCreateAutoreply(mailBoxId, tenantId, autoreply);
     }
 }
コード例 #2
0
        public MailAutoreply UpdateOrCreateMailboxAutoreply(int mailboxId, string user, int tenant,
                                                            bool turnOn, bool onlyContacts, bool turnOnToDate, DateTime fromDate, DateTime toDate, string subject,
                                                            string html)
        {
            using (var db = GetDb())
            {
                CheckMailboxOwnage(mailboxId, user, tenant, db);

                var autoreply = new MailAutoreply(mailboxId, tenant, turnOn, onlyContacts, turnOnToDate, fromDate,
                                                  toDate, subject, html);
                var autoreplyDal = new AutoreplyDal(db);
                autoreplyDal.UpdateOrCreateAutoreply(mailboxId, tenant, autoreply);
                return(autoreply);
            }
        }