Beispiel #1
0
        /// <summary>
        /// 发送审核结束邮件
        /// </summary>
        public void ConfirmOverMail()
        {
            bool val = true;

            foreach (OutApplicationItem item in _OutApplication.Item)
            {
                val &= item.Status == RequestStatus.ApproveCancelFail ||
                       item.Status == RequestStatus.ApproveCancelPass ||
                       item.Status == RequestStatus.ApproveFail ||
                       item.Status == RequestStatus.ApprovePass;
            }
            if (val)
            {
                MailBody mailBody = new MailBody();
                mailBody.Subject = string.Format("审核完毕{0}的外出单", _OutApplication.Account.Name);
                StringBuilder body = new StringBuilder();
                body.AppendFormat(OutApplicationMail.BuildBody(_OutApplication));
                mailBody.Body       = body.ToString();
                mailBody.IsHtmlBody = true;
                mailBody.MailTo     = RequestUtility.GetMail(_OutApplication.Account);
                foreach (OutApplicationItem item in _OutApplication.Item)
                {
                    if (item.Status == RequestStatus.ApprovePass || item.Status == RequestStatus.ApproveCancelFail)
                    {
                        mailBody.MailCc = SendMailToMailCC();
                        break;
                    }
                }
                _MailGateWay.Send(mailBody);
            }
        }
Beispiel #2
0
        /// <summary>
        /// 发送审核结束邮件
        /// </summary>
        public void Send()
        {
            MailBody mailBody = new MailBody();

            mailBody.Subject = string.Format("{0}的外出申请由于无法找到审批人而异常中断", _OutApplication.Account.Name);
            mailBody.Body    = OutApplicationMail.BuildBody(_OutApplication);
            mailBody.MailTo  = SendMailTo();
            _MailGateWay.Send(mailBody);
        }
        private void BuildSubmitMailBody(MailBody mailBody, Account to)
        {
            string        subject     = string.Format("{0}取消外出申请,请审批", _OutApplication.Account.Name);
            StringBuilder mailContent = new StringBuilder();

            mailContent.Append(OutApplicationMail.BuildBody(_OutApplication));
            OutApplicationMail.BulidConfirmAddress(mailContent, to, _OutApplication.PKID);
            mailBody.Body       = mailContent.ToString();
            mailBody.Subject    = subject;
            mailBody.IsHtmlBody = true;
        }
Beispiel #4
0
        private void BuildSubmitMailBody(MailBody mailBody, Account to, bool addConfirmAddress)
        {
            string        subject     = string.Format("请审批{0}的外出申请,", _OutApplication.Account.Name);
            StringBuilder mailContent = new StringBuilder();

            mailContent.Append(OutApplicationMail.BuildBody(_OutApplication));
            if (addConfirmAddress)
            {
                OutApplicationMail.BulidConfirmAddress(mailContent, to, _OutApplication.PKID);
            }
            mailBody.MailTo     = RequestUtility.GetMail(to);
            mailBody.Body       = mailContent.ToString();
            mailBody.Subject    = subject;
            mailBody.IsHtmlBody = true;
        }