Esempio n. 1
0
        public static StitchDatabaseFileRecord FindManagerInStitch(string managerName, StitchDatabaseFile stitchFile)
        {
            StitchDatabaseFileRecord rtn = null;

            List <StitchDatabaseFileRecord> recs = stitchFile.StitchRecords();

            foreach (StitchDatabaseFileRecord rec in recs)
            {
                if (rec.ManagerName == managerName)
                {
                    rtn = rec;
                    break;
                }
            }

            return(rtn);
        }
Esempio n. 2
0
        public UIManager(AliasNamesRecord aliasNamesRecord, StitchDatabaseFileRecord stitchDatabaseFileRecord, StatsRecord dbStats, StatsRecord citiStats, StatsRecord jlsStats)
        {
            // create a new manager file record
            // in the UI for comparison with
            // disk file data
            m_managerFileRecord = new ManagerFileRecord();

            // alias names
            m_managerFileRecord.ManagerName              = aliasNamesRecord.ManagerName;
            m_managerFileRecord.DBManagerName            = aliasNamesRecord.DBManagerName;
            m_managerFileRecord.CITIManagerName          = aliasNamesRecord.CITIManagerName;
            m_managerFileRecord.MorganStanleyManagerName = aliasNamesRecord.MorganStanleyManagerName;
            m_managerFileRecord.JLSName     = aliasNamesRecord.JLS_Has_Data_Sent_directly_from_Mgr;
            m_managerFileRecord.FirmCode    = aliasNamesRecord.FirmCode;
            m_managerFileRecord.ProgramCode = aliasNamesRecord.ProgramCode;

            // stitch database
            if (stitchDatabaseFileRecord != null)
            {
                m_managerFileRecord.Strategy  = stitchDatabaseFileRecord.Strategy;
                m_managerFileRecord.SubStrat  = stitchDatabaseFileRecord.SubStrat;
                m_managerFileRecord.MktsFocus = stitchDatabaseFileRecord.MktsFocus;
                m_existsInStitch = true;
            }
            else
            {
                m_managerFileRecord.Strategy  = String.Empty;
                m_managerFileRecord.SubStrat  = String.Empty;
                m_managerFileRecord.MktsFocus = String.Empty;
                m_existsInStitch = false;
            }

            // these only exist in manager.csv file
            m_managerFileRecord.Location     = "";
            m_managerFileRecord.ContactName  = "";
            m_managerFileRecord.ContactPhone = "";


            //m_aliasNamesRecord = aliasNamesRecord;
            m_dbStats   = dbStats;
            m_citiStats = citiStats;
            m_jlsStats  = jlsStats;
        }
Esempio n. 3
0
        private void CreateManagerObjects_FromAliasNamesAndStitch()
        {
            m_managers = new List <UIManager>();
            UIManager   manager   = null;
            StatsRecord dbStats   = null;
            StatsRecord citiStats = null;
            StatsRecord jlsStats  = null;
            StitchDatabaseFileRecord stitchRec = null;

            foreach (AliasNamesRecord aliasNamesRecord in m_aliasNamesFile.GetList())
            {
                dbStats   = Utility.FindManagerInStats(aliasNamesRecord.ManagerName, m_dbStatsFile);
                citiStats = Utility.FindManagerInStats(aliasNamesRecord.ManagerName, m_citiStatsFile);
                jlsStats  = Utility.FindManagerInStats(aliasNamesRecord.ManagerName, m_jlsStatsFile);
                stitchRec = Utility.FindManagerInStitch(aliasNamesRecord.ManagerName, m_stitchDatabaseFile);
                manager   = new UIManager(aliasNamesRecord, stitchRec, dbStats, citiStats, jlsStats);
                m_managers.Add(manager);
            }
        }
Esempio n. 4
0
        public List <StitchDatabaseFileRecord> StitchRecords()
        {
            List <StitchDatabaseFileRecord> recs = new List <StitchDatabaseFileRecord>();

            string line;

            string[] fields    = null;
            int      CODE_FIRM = 0;
            string   field     = string.Empty;

            for (int i = 1; i < m_lines.Length; i++)
            {
                line = m_lines[i];

                // skip blank lines
                if (line.Trim().Length == 0)
                {
                    continue;
                }

                fields = line.Split(',');

                // create new record object
                StitchDatabaseFileRecord rec = new StitchDatabaseFileRecord();

                field      = fields[Number_Idx];
                field      = field.Replace("\"", "");
                rec.Number = field;

                field           = fields[ManagerName_Idx];
                field           = field.Replace("\"", "");
                rec.ManagerName = field;

                field       = fields[MgrCode_Idx];
                field       = field.Replace("\"", "");
                rec.MgrCode = field;

                field           = fields[ProgramCode_Idx];
                field           = field.Replace("\"", "");
                rec.ProgramCode = field;

                field        = fields[Strategy_Idx];
                field        = field.Replace("\"", "");
                rec.Strategy = field;

                field        = fields[SubStrat_Idx];
                field        = field.Replace("\"", "");
                rec.SubStrat = field;

                field         = fields[MktsFocus_Idx];
                field         = field.Replace("\"", "");
                rec.MktsFocus = field;

                field      = fields[Switch_Idx];
                field      = field.Replace("\"", "");
                rec.Switch = field;

                if (fields.Length < 14)
                {
                    continue;
                }

                field   = fields[DB1_Idx];
                field   = field.Replace("\"", "");
                rec.DB1 = field;

                field = fields[StDt1_Idx];
                field = field.Replace("\"", "");
                if (field.Trim() != String.Empty)
                {
                    rec.StDt1 = DateTime.Parse(field);
                }

                field = fields[EnDt1_Idx];
                field = field.Replace("\"", "");
                if (field.Trim() != String.Empty)
                {
                    rec.EnDt1 = DateTime.Parse(field);
                }

                field   = fields[DB2_Idx];
                field   = field.Replace("\"", "");
                rec.DB2 = field;

                field = fields[StDt2_Idx];
                field = field.Replace("\"", "");
                if (field.Trim() != String.Empty)
                {
                    rec.StDt2 = DateTime.Parse(field);
                }

                field = fields[EnDt2_Idx];
                field = field.Replace("\"", "");
                if (field.Trim() != String.Empty)
                {
                    rec.EnDt2 = DateTime.Parse(field);
                }
                recs.Add(rec);
            }

            return(recs);
        }