コード例 #1
0
 public void prepareMail(RunnerParas paras_, List <Client> clients_, string attachment_)
 {
     // Replace to-list if has 'to' input; otherwise use config file input.
     reinitReceiver(paras_.getToList());
     generateMail(paras_.getTradingDays(), clients_);
     addRarAttachment(attachment_);
 }
コード例 #2
0
        public void sendManagerReport(RunnerParas paras_, List <Client> clients_, string attachment_)
        {
            managerReportSender.prepareMail(paras_, clients_, attachment_);
            string to = managerReportSender.send();

            execReportSender.addMessage("Manager Report Sent" + to);
        }
コード例 #3
0
        public void initExecReport(RunnerParas paras_)
        {
            bool hasError = containError(paras_);

            generateSubject(paras_.parseMode(), hasError);
            generateBody(paras_);
        }
コード例 #4
0
 private bool containError(RunnerParas paras_)
 {
     if (paras_.getUnknownAccounts().Count != 0 ||
         paras_.getInvalidRoots().Count != 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
コード例 #5
0
        private void generateBody(RunnerParas paras_)
        {
            body = "AlgoTradingReporter Execution Report: " + Environment.NewLine;

            List <string> unidentifiedAccounts = StoredProcMgr.MANAGER.getNewClients();

            if (paras_.getUnknownAccounts().Count != 0)
            {
                body += "Unidentified Accounts, possibly new clients." + Environment.NewLine;
                foreach (string account in unidentifiedAccounts)
                {
                    body += account + Environment.NewLine;
                }
            }

            body += (Environment.NewLine + "Log Roots are : " + Environment.NewLine);
            foreach (string root in paras_.getLogRoots())
            {
                body += (root + Environment.NewLine);
            }

            body += Environment.NewLine + "Trading Days are : " + Environment.NewLine;
            foreach (string day in paras_.getTradingDays())
            {
                body += (day + Environment.NewLine);
            }

            if (paras_.getAccounts().Count != 0)
            {
                body += Environment.NewLine + "Accounts are : " + Environment.NewLine;
                foreach (string acct in paras_.getAccounts())
                {
                    body += (acct + Environment.NewLine);
                }
            }

            if (paras_.getInvalidRoots().Count != 0)
            {
                body += "Invalid (Non-Existing) Folders : \n";
                foreach (string root in paras_.getInvalidRoots())
                {
                    body += (root + Environment.NewLine);
                }
            }

            body += Environment.NewLine + "Detailed Execution Report " + Environment.NewLine;
        }