Ejemplo n.º 1
0
        private void BacklogReport_Load(object sender, EventArgs e)
        {
            string       ReportName   = "BackLogReport";
            GetDataEmail getDataEmail = new GetDataEmail();
            List <ScheduleReportItems> scheduleReportItems = getDataEmail.GetScheduleReportCommon(ReportName);
            List <EmailNeedSend>       emailNeedSends      = getDataEmail.GetEmailNeedSends(ReportName);
            string PathFoler = @"C:\ERP_Temp\";

            if (scheduleReportItems != null && scheduleReportItems.Count == 1)
            {
                if (emailNeedSends != null && emailNeedSends.Count > 0)
                {
                    SendMailFunction sendmail = new SendMailFunction();
                    var isOK = sendmail.SendMailwithExportExcelbyCompanyMail(scheduleReportItems[0], emailNeedSends, ref dtgr, PathFoler, "");
                    if (isOK)
                    {
                        Log.Logfile.Output(Log.StatusLog.Normal, "Send mail BackLogReport OK");
                    }
                    else
                    {
                        Log.Logfile.Output(Log.StatusLog.Normal, "Send mail BackLogReport fail ");
                    }
                }
            }
            this.Close();
        }
Ejemplo n.º 2
0
        private void ReliabilityReportMonthly_Load(object sender, EventArgs e)
        {
            string       ReportName   = "Reliability_Report";
            GetDataEmail getDataEmail = new GetDataEmail();
            List <ScheduleReportItems> scheduleReportItems = getDataEmail.GetScheduleReportCommon(ReportName);
            List <EmailNeedSend>       emailNeedSends      = getDataEmail.GetEmailNeedSends(ReportName);

            if (scheduleReportItems != null && scheduleReportItems.Count == 1)
            {
                if (emailNeedSends != null && emailNeedSends.Count > 0)
                {
                    SendMailFunction sendmail = new SendMailFunction();
                    sendmail.SendMailwithExportExceReliabilitybyCompanyMailForMonthly(scheduleReportItems[0], emailNeedSends);
                }
            }
            this.Close();
        }