protected override void Initialize() { ConfigObj = Config as DataStreamRicCreationWithFileDownloadConfig; TaskResultList.Add(new TaskResultEntry("LOG File", "LOG File", Logger.FilePath)); usrName = ConfigObj.Username; passWord = ConfigObj.Password; usrName = usrName.Replace("@", "%40"); passWord = passWord.Replace("@", "%40"); accountName = ConfigObj.AccountName.Trim(); EmailAccountInfo emailAccount = EmailAccountManager.SelectEmailAccountByAccountName(ConfigObj.AccountName.Trim()); if (emailAccount != null) { accountName = emailAccount.AccountName; email_password = emailAccount.Password; domain = emailAccount.Domain; } listMailTo = ConfigObj.MailTo; listMailSignature = ConfigObj.MailSignature; service = MSAD.Common.OfficeUtility.EWSUtility.CreateService(new System.Net.NetworkCredential(accountName, email_password, domain), new Uri(@"https://apac.mail.erf.thomson.com/EWS/Exchange.asmx")); InitializeDownloadUrlDirectory(); InitializeFileDirectory(); string msg = "Initialize...OK!"; Logger.Log(msg); }
protected override void Initialize() { configObj = Config as ChinaIpoQCAfternoonConfig; emailAccount = EmailAccountManager.SelectEmailAccountByAccountName(configObj.AccountName.Trim()); if (emailAccount == null) { MessageBox.Show("email account is not exist in DB. "); return; } service = MSAD.Common.OfficeUtility.EWSUtility.CreateService(new System.Net.NetworkCredential(emailAccount.AccountName, emailAccount.Password, emailAccount.Domain), new Uri(@"https://apac.mail.erf.thomson.com/EWS/Exchange.asmx")); listMailTo = configObj.MailTo; listMailSignature = configObj.MailSignature; inputPath = Path.Combine(configObj.InputPath.Trim(), string.Format(@"output\RIC_{0}.txt", DateTime.Now.ToUniversalTime().AddHours(+8).ToString("yyyy-MM-dd"))); patternIDN = @"\r\n(?<RIC>\w{5,15}[\.|\=]\w{1,10})\s+PROD_PERM\s+"; patternTxtRic = @"(?<RIC>\w{5,15}[\.|\=]\w{1,10})"; patternNDA = @"^\b\S+(?<RIC>\w{5,15}[\.|\=]\w{1,10})"; listCodeNDA = new List <string>(); listCodeNDA.Add("0163" + DateTime.Now.ToUniversalTime().AddHours(+8).ToString("MMdd") + ".M"); listCodeNDA.Add("0179" + DateTime.Now.ToUniversalTime().AddHours(+8).ToString("MMdd") + ".M"); listCodeNDA.Add("3201" + DateTime.Now.ToUniversalTime().AddHours(+8).ToString("MMdd") + ".M"); //listCodeNDA.Add("0163" + "0408" + ".M"); //listCodeNDA.Add("0179" + "0408" + ".M"); resultFilePath = Path.Combine(configObj.OutputPath, "output"); }
protected override void Initialize() { configObj = Config as KoreaCheckIpoNdaConfig; DateTime dtChina = TimeUtil.ConvertToChina(DateTime.UtcNow); emailAccount = EmailAccountManager.SelectEmailAccountByAccountName(configObj.AccountName.Trim()); //AM if (dtChina.Hour >= 12) { isAfternoonTask = true; } string currentDate = DateTime.Today.ToString("yyyyMMdd", new CultureInfo("en-US")); if (!isAfternoonTask) { currentDate = DateTime.Today.AddDays(-1).ToString("yyyyMMdd", new CultureInfo("en-US")); } //mFileFolder = CreateFolderUnderCurrentPath( // string.Format(@"{0}\{1}\{2}", "Output", this.TaskTypeName, currentDate));//GetOutputFilePath(); mFileFolder = configObj.downloadFilePath.Trim(); InitializeMailAccount(); InitializeDseRule(); }
protected override void Initialize() { base.Initialize(); configObj = Config as CNISINupdateConfig; EmailAccountInfo emailAccount = EmailAccountManager.SelectEmailAccountByAccountName(configObj.AccountName.Trim()); accountName = emailAccount.AccountName; password = emailAccount.Password; domain = emailAccount.Domain; mailAdress = emailAccount.MailAddress; listMailTo = configObj.MailTo; listMailSignature = configObj.MailSignature; filePath = configObj.FilePath; dicSSGuoZhai.Add("010", "国债"); dicSSGuoZhai.Add("019", "国债"); dicSSGuoZhai.Add("020", "国债"); dicSSZhaiJuan.Add("12", "债券"); dicSSZhaiJuan.Add("110", "债券"); dicSSZhaiJuan.Add("113", "债券"); dicSZGuoZhai.Add("110", "国债"); dicSZGuoZhai.Add("101", "国债"); dicSZGuoZhai.Add("108", "国债"); dicSZZhaiJuan.Add("11", "债券"); dicSZZhaiJuan.Add("12", "债券"); }
protected override void Initialize() { configObj = Config as KoreaCheckIpoNdaConfig; DateTime dtChina = TimeUtil.ConvertToChina(DateTime.UtcNow); emailAccount = EmailAccountManager.SelectEmailAccountByAccountName(configObj.AccountName.Trim()); //AM if (dtChina.Hour >= 12) { isAfternoonTask = true; } string currentDate = DateTime.Today.ToString("yyyyMMdd", new CultureInfo("en-US")); if (!isAfternoonTask) { currentDate = DateTime.Today.AddDays(-1).ToString("yyyyMMdd", new CultureInfo("en-US")); } mFileFolder = configObj.DownloadFilePath.Trim(); InitializeMailAccount(); InitializeDseRule(); }
protected override void Initialize() { configObj = Config as TWIpoQCConfig; EmailAccountInfo emailAccount = EmailAccountManager.SelectEmailAccountByAccountName(configObj.AccountName.Trim()); accountName = emailAccount.AccountName; password = emailAccount.Password; domain = emailAccount.Domain; mailAdress = emailAccount.MailAddress; mailFolder = configObj.MailFolderPath.Trim(); outPutFilePath = Path.Combine(configObj.OutPutPath.Trim(), "MissingRic.txt"); listMailTo = configObj.MailTo; listMailSignature = configObj.MailSignature; emailKeyWord = "*IPO* RIC Add";//there are two email need to search emailPattern = @"For\sTQSEffective\sDate\s+\:\s+\w+\s+\:\s+(?<RIC>\w+\.TWO{0,1})"; //emailPattern = @"\s(?<RIC>\w+\.[A-Z]{2,3})Displayname"; gatsPattern = @"(?<RIC>\w+\.[A-Z]{2,3})\s+PROD_PERM\s+\d+\s+"; listFileCodeInFtp.Add("0126" + fileCodeOfToday + ".M"); listFileCodeInFtp.Add("1127" + fileCodeOfToday + ".M"); listFileCodeInFtp.Add("0645" + fileCodeOfToday + ".M"); //listFileCodeInFtp.Add("01260319.M"); //listFileCodeInFtp.Add("11270322.M"); //listFileCodeInFtp.Add("06450319.M"); ftpPattern = @"(?<RIC>\w+\.[A-Z]{2,3})\s+ENNOCONN ORD\s+"; strFileNameOnLocalToday = "EM01" + DateTime.Now.ToUniversalTime().AddHours(+8).ToString("MMdd") + ".M"; publicDownloadPath = configObj.PublicDownloadPath; }
protected override void Initialize() { base.Initialize(); configObj = Config as TWQCFutureCheckGEDARICConfig; EmailAccountInfo emailAccount = EmailAccountManager.SelectEmailAccountByAccountName(configObj.AccountName.Trim()); accountName = emailAccount.AccountName; password = emailAccount.Password; domain = emailAccount.Domain; mailAdress = emailAccount.MailAddress; mailFolder = configObj.MailFolderPath.Trim(); txtFilePath = configObj.TxtFilePath.Trim(); listMailTo = configObj.MailTo; listMailSignature = configObj.MailSignature; strRicChainPattern = @"\](?<RIC>[A-Za-z0-9]+)\b\s+\b\d{2}\-[A-Z]{3}\-\d{4}\b"; strRicChainFileName = DateTime.Now.ToUniversalTime().AddHours(+8).ToString("MMdd") + "FutRic.txt"; strRicChainMissingPattern = @"\r\n(?<RIC>[A-Za-z0-9]+)\b\s+\bOFFCL_CODE\b\s+\b(?<Value>[A-Za-z0-9]+)\b"; strRicDicPattern = @"\bLONGLINK\d{1,2}\b\s+\b(?<RIC>[A-Za-z0-9]+)\r\n\S+\b"; strRicFileName = DateTime.Now.ToUniversalTime().AddHours(+8).ToString("MMdd") + "SpdRic.txt"; strRicMTXW = "0#MTXW:"; strRicMTX = "0#MTX:"; strEmailKeyWordListRicChain = "Futures Job log file for RA(Region-HKG|Exchanges-TM|TAIFEX)"; strEmailKeyWordHKGRic = "Futures Job log file for RA(Region-HKG)"; strHKGRicPattern = @"\*\s+\*\s+\b(?<RIC>[A-Za-z0-9]+)\b"; service = MSAD.Common.OfficeUtility.EWSUtility.CreateService(new System.Net.NetworkCredential(accountName, password, domain), new Uri(@"https://apac.mail.erf.thomson.com/EWS/Exchange.asmx")); }
protected override void Initialize() { configObj = Config as HKIPONDAConfig; EmailAccountInfo emailAccount = EmailAccountManager.SelectEmailAccountByAccountName(configObj.AccountName.Trim()); accountName = emailAccount.AccountName; password = emailAccount.Password; domain = emailAccount.Domain; mailAdress = emailAccount.MailAddress; listMailTo = configObj.MailTo; listMailSignature = configObj.MailSignature; strTxtFilePath = configObj.TxtFilePath; strDownloadFilePath = configObj.FtpFilePath.Trim(); service = EWSUtility.CreateService(new System.Net.NetworkCredential(accountName, password, domain), new Uri(@"https://apac.mail.erf.thomson.com/EWS/Exchange.asmx")); strGetYesdayTxtFile = Path.Combine(strTxtFilePath, DateTime.Now.ToUniversalTime().AddHours(+8).AddDays(-1).ToString("MMdd") + "All_HK_IPO_IDN.txt"); strGeneratedTodayTxtFile = Path.Combine(strTxtFilePath, DateTime.Now.ToUniversalTime().AddHours(+8).ToString("MMdd") + "Missing_HK_IPO_NDA.txt"); strFileNameOnFtpYesterday = "EM01" + DateTime.Now.ToUniversalTime().AddDays(-1).AddHours(+8).ToString("MMdd") + ".M"; strFileNameOnFtpToday = "EM01" + DateTime.Now.ToUniversalTime().AddHours(+8).ToString("MMdd") + ".M"; strPatternFTP = @"^\S{2}(?<RIC>\S{4,10}\.(HK|HS))\b\s+"; strFileNameReadOnFtpYesterday = "0001" + DateTime.Now.ToUniversalTime().AddDays(-1).AddHours(+8).ToString("MMdd") + ".M"; strFileNameReadOnFtpToday = "0001" + DateTime.Now.ToUniversalTime().AddHours(+8).ToString("MMdd") + ".M"; strFileNameReadOnFtpYesterdayHS = "3200" + DateTime.Now.ToUniversalTime().AddDays(-1).AddHours(+8).ToString("MMdd") + ".M"; strFileNameReadOnFtpTodayHS = "3200" + DateTime.Now.ToUniversalTime().AddHours(+8).ToString("MMdd") + ".M"; }
protected override void Initialize() { configObj = Config as DownloadNDAFileConfig; strFilePath = configObj.FilePath; listNDAFileSimple = configObj.ListSimpleFileName; strDateTime = configObj.DateTime; strFtp = @"ftp://*****:*****@ds1.rds.reuters.com//"; accountName = configObj.AccountName.Trim(); EmailAccountInfo emailAccount = EmailAccountManager.SelectEmailAccountByAccountName(configObj.AccountName.Trim()); accountName = emailAccount.AccountName; password = emailAccount.Password; domain = emailAccount.Domain; listMailTo = configObj.MailTo; service = MSAD.Common.OfficeUtility.EWSUtility.CreateService(new NetworkCredential(accountName, password, domain), new Uri(@"https://apac.mail.erf.thomson.com/EWS/Exchange.asmx")); }
protected override void Initialize() { configObj = Config as JPNDATradingSymbolUpdateConfig; if (!string.IsNullOrEmpty(configObj.AccountName)) { emailAccount = EmailAccountManager.SelectEmailAccountByAccountName(configObj.AccountName.Trim()); } if (emailAccount == null) { MessageBox.Show(configObj.AccountName + "is not exist in DB."); return; } emailFolder = configObj.MailFoder.Trim(); service = MSAD.Common.OfficeUtility.EWSUtility.CreateService(new System.Net.NetworkCredential(emailAccount.AccountName, emailAccount.Password, emailAccount.Domain), new Uri(@"https://apac.mail.erf.thomson.com/EWS/Exchange.asmx")); listMailTo = configObj.MailTo; listMailSignature = configObj.MailSignature; startDate = Convert.ToDateTime(configObj.EmailDate); endDate = startDate.AddDays(+1); //keyWordIFFM = "OSEOMX IFFM - EDA Automation Report"; keyWordIFFM = "OSD_OTFC Report for SO_6 of OSD feed"; //patternIFFM = @"(?<RIC>[0-9A-Za-z]+\.OS)\s{5}\S+"; patternIFFM = @"\s+(?<RIC>[0-9A-Z]+\.OS)\s+"; listKeyWordOthersBody.Add("JNI Index Option additional strike price added"); listKeyWordOthersBody.Add("JTI Index Option additional strike price added"); patternOthersBody = @"(?<RIC>[^\\n][0-9A-Za-z]+\.OS)"; //listKeyWordOthersAttachment.Add("OSE JNI Index Options Rollover Ric List"); //listKeyWordOthersAttachment.Add("OSE JTI Index Options Rollover Ric List"); listKeyWordOthersAttachment.Add("OSE JNI/JTI Index Options Rollover Ric List"); outPutPath = configObj.OutputPath.Trim(); iffmPath = Path.Combine(outPutPath, string.Format("NDA_OSE_Stk_Opt_Ref_{0}.csv", DateTime.Now.ToString("ddMMMyyy"))); othersPath = Path.Combine(outPutPath, string.Format("NDA_OSE_Index_Opt_Ref_{0}.csv", DateTime.Now.ToString("ddMMMyyy"))); List <string> listIFFMTitle = new List <string>() { "RIC", "DERIVATIVES LAST TRADING DAY", "DERIVATIVES LOT SIZE", "TRADING SYMBOL" }; dicListIFFM.Add("title", listIFFMTitle); List <string> listIndeTitle = new List <string>() { "RIC", "TRADING SYMBOL" }; dicListOthers.Add("title", listIndeTitle); }
protected override void Initialize() { base.Initialize(); configObj = Config as TWQCOptionCheckNDARICConfig; EmailAccountInfo emailAccount = EmailAccountManager.SelectEmailAccountByAccountName(configObj.AccountName.Trim()); accountName = emailAccount.AccountName; password = emailAccount.Password; domain = emailAccount.Domain; mailAdress = emailAccount.MailAddress; listMailTo = configObj.MailTo; listMailSignature = configObj.MailSignature; filePath = configObj.FilePath; strPattern = @"^\b\w{2}(?<RIC>\w+\.[A-Z]{2,3})\b\s+?"; strRicFilePath = Path.Combine(filePath, "OptionRic.txt"); strFilePathFromFtpOfRic = "7137" + DateTime.Now.ToUniversalTime().AddHours(+8).ToString("MMdd") + ".M"; }
private bool isExistIPO = false;//IsExist ipo file in the attachement protected override void Initialize() { configObj = Config as HKIPOIDNConfig; EmailAccountInfo emailAccount = EmailAccountManager.SelectEmailAccountByAccountName(configObj.AccountName.Trim()); accountName = emailAccount.AccountName; password = emailAccount.Password; domain = emailAccount.Domain; mailAdress = emailAccount.MailAddress; mailFolder = configObj.MailFolderPath.Trim(); listMailTo = configObj.MailTo; listMailSignature = configObj.MailSignature; txtFilePath = configObj.TxtFilePath.Trim(); strEmailKeyWord = "HKFM_"; strPatternGATS = @"\r\n(?<Ric>[A-Za-z0-9#]+\.HK)\b\s+\bPROD_PERM\b\s+\b(?<Value>[0-9]+)\r\n";; //find ipo from GATS txtFileNameAllRIC = DateTime.Now.ToUniversalTime().AddHours(+8).ToString("MMdd") + "All_HK_IPO_IDN.txt";; //all ric file name txtFileNameRemovedRIC = DateTime.Now.ToUniversalTime().AddHours(+8).ToString("MMdd") + "Missing_HK_IPO_IDN.txt"; //removed ric file name }
protected override void Initialize() { configObj = Config as ChinaIpoQCMorningConfig; emailAccount = EmailAccountManager.SelectEmailAccountByAccountName(configObj.AccountName.Trim()); if (emailAccount == null) { MessageBox.Show("email account is not exist in DB. "); return; } service = MSAD.Common.OfficeUtility.EWSUtility.CreateService(new System.Net.NetworkCredential(emailAccount.AccountName, emailAccount.Password, emailAccount.Domain), new Uri(@"https://apac.mail.erf.thomson.com/EWS/Exchange.asmx")); listMailTo = configObj.MailTo; listMailSignature = configObj.MailSignature; downloadFilePath = Path.Combine(configObj.OutputPath, "downloadFile"); resultFilePath = Path.Combine(configObj.OutputPath, "output"); mailFolder = configObj.MailFolder.Trim(); }
protected override void Initialize() { base.Initialize(); configObj = Config as TWQCOptionCheckGEDARICConfig; EmailAccountInfo emailAccount = EmailAccountManager.SelectEmailAccountByAccountName(configObj.AccountName.Trim()); accountName = emailAccount.AccountName; password = emailAccount.Password; domain = emailAccount.Domain; mailAdress = emailAccount.MailAddress; mailFolder = configObj.MailFolderPath.Trim(); txtFilePath = configObj.TxtFilePath.Trim(); listMailTo = configObj.MailTo; listMailSignature = configObj.MailSignature; strRicFirstEmailPattern = @"RIC\s+\[(?<RIC>\w+\.[A-Z]{2,3})\]\s+for\s+Exch\s+symbol"; strRicSecondEmailPattern = @"\b(?<RIC>\w+[A-Z]{1}\d{1}\.TM)\b"; strRicGATSPattern = @"\r\n(?<RIC>\w+\.[A-Z]{2,3})\b\s+\bOFFCL_CODE\b\s+\b(?<Value>\w+)"; strRicFileName = "OptionRic.txt"; strFirstEmailKeyWordListRic = "TAIFO IFFM - EDA Automation Report"; strSecondEmailKeyWordListRic = "TAIFEX_OPT_IFFM Report for Weekly Option of Taifex option iffm feed"; }
protected override void Initialize() { base.Initialize(); configObj = Config as TWQCFutureCheckNDARICConfig; EmailAccountInfo emailAccount = EmailAccountManager.SelectEmailAccountByAccountName(configObj.AccountName.Trim()); accountName = emailAccount.AccountName; password = emailAccount.Password; domain = emailAccount.Domain; mailAdress = emailAccount.MailAddress; listMailTo = configObj.MailTo; listMailSignature = configObj.MailSignature; filePath = configObj.FilePath; strFutPattern = @"^\b(?<RIC>\w+)\b.+?"; strSpdPattern = @"^\b(?<RIC>\S+)\b\s+?"; strFutRicFilePath = Path.Combine(filePath, DateTime.Now.ToUniversalTime().AddHours(+8).AddDays(-1).ToString("MMdd") + "FutRic.txt"); strSpdRicFilePath = Path.Combine(filePath, DateTime.Now.ToUniversalTime().AddHours(+8).AddDays(-1).ToString("MMdd") + "SpdRic.txt"); strFilePathFromFtpOfFutRic = "5225" + DateTime.Now.ToUniversalTime().AddHours(+8).ToString("MMdd") + ".M"; strFilePathFromFtpOfSpdRic = "5673" + DateTime.Now.ToUniversalTime().AddHours(+8).ToString("MMdd") + ".M"; service = MSAD.Common.OfficeUtility.EWSUtility.CreateService(new System.Net.NetworkCredential(accountName, password, domain), new Uri(@"https://apac.mail.erf.thomson.com/EWS/Exchange.asmx")); }