Example #1
0
        public UIManager(ManagerFileRecord managerFileRecord, 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();

            m_managerFileRecord.ManagerName              = managerFileRecord.ManagerName;
            m_managerFileRecord.DBManagerName            = managerFileRecord.DBManagerName;
            m_managerFileRecord.CITIManagerName          = managerFileRecord.CITIManagerName;
            m_managerFileRecord.MorganStanleyManagerName = managerFileRecord.MorganStanleyManagerName;
            m_managerFileRecord.JLSName      = managerFileRecord.JLSName;
            m_managerFileRecord.Location     = managerFileRecord.Location;
            m_managerFileRecord.ContactName  = managerFileRecord.ContactName;
            m_managerFileRecord.ContactPhone = managerFileRecord.ContactPhone;
            m_managerFileRecord.FirmCode     = managerFileRecord.FirmCode;
            m_managerFileRecord.ProgramCode  = managerFileRecord.ProgramCode;
            m_managerFileRecord.Strategy     = managerFileRecord.Strategy;
            m_managerFileRecord.SubStrat     = managerFileRecord.SubStrat;
            m_managerFileRecord.MktsFocus    = managerFileRecord.MktsFocus;

            if (Utility.FindManagerInStitch(managerFileRecord.ManagerName, frmMain.MainForm.StitchDatabaseFile) != null)
            {
                m_existsInStitch = true;
            }
            else
            {
                m_existsInStitch = false;
            }


            m_dbStats   = dbStats;
            m_citiStats = citiStats;
            m_jlsStats  = jlsStats;
        }
Example #2
0
        private void WriteManagerFile_FromInputGrid()
        {
            this.dgvManagersNew.EndEdit();
            // save UI to ManagerFileObject
            int managerCount = 0;
            List <ManagerFileRecord> recs = new List <ManagerFileRecord>();

            for (int i = 0; i < this.dgvManagersNew.Rows.Count - 1; i++)
            {
                ManagerFileRecord rec = new ManagerFileRecord();
                managerCount++;

                rec.ManagerName     = dgvManagersNew.Rows[i].Cells[(int)ManagerCols.Manager].Value.ToString();
                rec.DBManagerName   = dgvManagersNew.Rows[i].Cells[(int)ManagerCols.DBManagerName].Value.ToString();
                rec.CITIManagerName = dgvManagersNew.Rows[i].Cells[(int)ManagerCols.CITIManagerName].Value.ToString();
                rec.JLSName         = dgvManagersNew.Rows[i].Cells[(int)ManagerCols.JLSName].Value.ToString();
                rec.Location        = dgvManagersNew.Rows[i].Cells[(int)ManagerCols.Location].Value.ToString();
                rec.ContactName     = dgvManagersNew.Rows[i].Cells[(int)ManagerCols.ContactName].Value.ToString();
                rec.ContactPhone    = dgvManagersNew.Rows[i].Cells[(int)ManagerCols.ContactPhone].Value.ToString();
                rec.FirmCode        = dgvManagersNew.Rows[i].Cells[(int)ManagerCols.ManagerCode].Value.ToString();
                rec.ProgramCode     = dgvManagersNew.Rows[i].Cells[(int)ManagerCols.ProgramCode].Value.ToString();
                rec.Strategy        = dgvManagersNew.Rows[i].Cells[(int)ManagerCols.Strategy].Value.ToString();
                rec.SubStrat        = dgvManagersNew.Rows[i].Cells[(int)ManagerCols.SubStrategy].Value.ToString();
                rec.MktsFocus       = dgvManagersNew.Rows[i].Cells[(int)ManagerCols.MarketFocus].Value.ToString();
                recs.Add(rec);
            }
            // now update the file object and write to file
            m_managerFile.WriteToFile(recs, tbInputDir.Text.Trim());
        }
Example #3
0
        public List <ManagerFileRecord> GetList()
        {
            List <ManagerFileRecord> recs = new List <ManagerFileRecord>();

            string line;

            string[] fields    = null;
            int      CODE_FIRM = 0;

            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
                ManagerFileRecord rec = new ManagerFileRecord();

                // alias names
                rec.ManagerName              = fields[Proprietary_Manager_Names_Idx];
                rec.DBManagerName            = fields[DB_Consolidated_Manager_Names_Idx];
                rec.CITIManagerName          = fields[Alias_for_Citi_Managers_Idx];
                rec.MorganStanleyManagerName = fields[Alias_for_Morgan_Stanley_Idx];
                rec.JLSName = fields[JLSName_Idx];

                rec.Location     = fields[Location_Idx];
                rec.ContactName  = fields[ContactName_Idx];
                rec.ContactPhone = fields[ContactPhone_Idx];

                rec.FirmCode    = fields[CODE_FIRM_Idx];
                rec.ProgramCode = fields[CODE_PROG_Idx];

                // stitch
                rec.Strategy  = fields[Strategy_Idx];
                rec.SubStrat  = fields[SubStrat_Idx];
                rec.MktsFocus = fields[MktsFocus_Idx];

                recs.Add(rec);
            }

            return(recs);
        }
Example #4
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;
        }