示例#1
0
 private string GetSedol(string isin)
 {
     if (string.IsNullOrEmpty(isin))
     {
         return("");
     }
     try
     {
         if (!loginSuccess)
         {
             DataStreamCommon.LoginToWebsite(ConfigObj.Username, ConfigObj.Password, cookies, jSessionId, Logger);
             loginSuccess = true;
         }
         string response = DataStreamCommon.QuerySedol(isin, jSessionId, cookies, Logger);
         return(DataStreamCommon.ParseSedol(response, isin, Logger));
     }
     catch (Exception ex)
     {
         string msg = string.Format("At GetSedol(). Error found in getting SEDOL for ISIN:{0}. Error Message: {1}. ", isin, ex.Message);
         Logger.Log(msg, Logger.LogType.Error);
         return("");
     }
 }
示例#2
0
        private void StartJob()
        {
            DownloadFtpFiles();
            List <DseRecord> records = GetRecords();

            if (records == null || records.Count == 0)
            {
                Logger.Log("No RIC Creation today.");
                return;
            }
            List <DataStreamRicCreationInfo> ricCreations = FormatRecords(records);

            if (ifDownNameRule)
            {
                namesAbbs = DataStreamCommon.DownloadNameRules(Logger);
            }

            string lineToFile = FormatOutputLine(ricCreations);

            if (!string.IsNullOrEmpty(lineToFile))
            {
                GenerateFile(lineToFile);
            }
        }