public void SendEmailToOverDueDate() { IList <FixedAdvanceOverDue> voList = ScgeAccountingQueryProvider.SCGDocumentQuery.GetFixedAdvanceOverdueList(); foreach (FixedAdvanceOverDue item in voList) { SCGEmailService.SendEmailEM15(item.CacheWorkflowID, item.RequesterID); } }
protected void ctlSend_Click(object sender, ImageClickEventArgs e) { //เรียก service สำหรับส่ง email SS.Standard.WorkFlow.DTO.WorkFlow workFlow = new SS.Standard.WorkFlow.DTO.WorkFlow(); long workFlowID = 0; if (this.RequesterID != 0) { workFlow = WorkFlowQueryProvider.WorkFlowQuery.GetWorkFlowByDocumentID(this.DocumentID); if (workFlow != null) { try { workFlowID = workFlow.WorkFlowID; if (this.EmailType.Equals("EM09")) { SCGEmailService.SendEmailEM09(workFlow.Document.DocumentID, ctlCC.Text, ctlRemark.Text, string.Empty); } else if (this.EmailType.Equals("EM10")) { SCGEmailService.SendEmailEM10(this.AdvanceDocumentID, UIHelper.ParseLong(ctlUserID.Text), ctlCC.Text, ctlRemark.Text, false); } else if (this.EmailType.Equals("EM15")) { SCGEmailService.SendEmailEM15(workFlowID, UIHelper.ParseLong(ctlUserID.Text)); } ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "SendEmailSuccess", "alert('" + GetMessage("Send Complete") + "');", true); Hide(); } catch (Exception ex) { throw ex; } } } }