/// <summary> /// 发送邮件 /// </summary> /// <param name="sStatus"></param> void SendNoticeMail(string sStatus) { WorkflowDataFields fields = WorkflowContext.Current.DataFields; AcceleratorComm comm = new AcceleratorComm(); try { comm.SendMail(WorkFlowUtil.GetApplicantAccount(fields["Applicant"].ToString()), sStatus, fields["Title"].ToString(), CurrentEmployee.UserAccount); } catch (Exception e) { CommonUtil.logError(e.ToString()); } }
/// <summary> /// 发送邮件 /// </summary> /// <param name="sStatus"></param> void SendNoticeMail(string sStatus) { try { string sName=CurrentEmployee.DisplayName; WorkflowDataFields fields = WorkflowContext.Current.DataFields; AcceleratorComm comm = new AcceleratorComm(); string sApprovers = fields["Approvers"].AsString(); comm.SendMail(sApprovers, sStatus, fields["Title"].ToString(), sName); } catch (Exception e) { CommonUtil.logError("Accelerator sent mail failed:"+e.ToString()); } }
/// <summary> /// 发送邮件给MMC组里的用户, /// </summary> /// <param name="sStatus"></param> void SendMMCNoticeMail() { try { string sName = CurrentEmployee.DisplayName; WorkflowDataFields fields = WorkflowContext.Current.DataFields; AcceleratorComm comm = new AcceleratorComm(); string sApplicant = fields["Applicant"].AsString(); string sMMCUsers = GetMMCUsers();//MMC组的人不需要参与审批,但是能够收到一个邮件能够查看记录 comm.SendMMCMail(sMMCUsers, sApplicant.Split('(')[0], fields["ID"].ToString(), sName);//, sStatus, fields["Title"].ToString(), sName); } catch (Exception e) { CommonUtil.logError("AcceleratorMMC sent mail failed:" + e.ToString()); } }