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(); }
private void Initialize1(KoreaCheckIpoNdaConfig obj, bool _isAfternoonTask) { configObj = obj;//Config as KoreaCheckIpoNdaConfig; isAfternoonTask = _isAfternoonTask; string currentDate = DateTime.Today.ToString("yyyyMMdd", new CultureInfo("en-US")); if (!isAfternoonTask) { currentDate = DateTime.Today.AddDays(-1).ToString("yyyyMMdd", new CultureInfo("en-US")); } InitializeMailAccount(); InitializeDseRule(); }
public void StartJob(KoreaCheckIpoNdaConfig obj, bool _isAfternoonTask) { //Sourcing Initialize1(obj, _isAfternoonTask); GetIpo(); GetDseData(); CompareIpo(); if (changedIpo != null && changedIpo.Count > 0) { GenerateFile(); } SendEmail(); }