public ChangeInfo GetAllBrokerChangeInfo(Worksheet worksheet, int lastRowContainInfo)
        {
            ChangeInfo ChangedBrokerInfo = new ChangeInfo();

            ChangedBrokerInfo.AllChangedBrokerList = new List <BrokerChangeInfo>();
            for (int rowNum = 2; rowNum <= lastRowContainInfo; rowNum++)
            {
                BrokerChangeInfo brokerChangeInfo = new BrokerChangeInfo();
                brokerChangeInfo.Name = ExcelUtil.GetRange(rowNum, 1, worksheet).Value2.ToString();
                brokerChangeInfo.Ric  = ExcelUtil.GetRange(rowNum, 2, worksheet).Value2.ToString();
                brokerChangeInfo.Type = ExcelUtil.GetRange(rowNum, 3, worksheet).Value2.ToString();
                brokerChangeInfo.Date = ExcelUtil.GetRange(rowNum, 4, worksheet).Value2.ToString();
                ChangedBrokerInfo.AllChangedBrokerList.Add(brokerChangeInfo);
            }
            ChangedBrokerInfo.DifDayChangeInfo = ChangedBrokerInfo.GetDifDayChangeInfo();
            //ChangedBrokerInfo.AllChangedBrokerList.Sort();
            return(ChangedBrokerInfo);
        }
        public List <SameDayChangeInfo> GetDifDayChangeInfo()
        {
            List <SameDayChangeInfo> sameDayChangeList = new List <SameDayChangeInfo>();
            SameDayChangeInfo        sameDayChangeInfo = null;
            string date = string.Empty;

            for (int i = 0; i < AllChangedBrokerList.Count; i++)
            {
                BrokerChangeInfo broker = AllChangedBrokerList[i];
                if (broker.Date == date)
                {
                    if (broker.Type.ToLower() == "new")
                    {
                        sameDayChangeInfo.NewBrokerList.Add(broker);
                    }

                    else if (broker.Type.ToLower() == "delete")
                    {
                        sameDayChangeInfo.DeleteBrokerList.Add(broker);
                    }
                    else if (broker.Type.ToLower() == "change")
                    {
                        sameDayChangeInfo.BordLotSizeChangeList.Add(broker);
                    }

                    else if (broker.Type.ToLower() == "name chg to")
                    {
                        sameDayChangeInfo.NameChangeToList.Add(broker);
                    }
                }

                else
                {
                    if (i != 0)
                    {
                        sameDayChangeList.Add(sameDayChangeInfo);
                        sameDayChangeInfo.RicChangeToList = sameDayChangeInfo.GetChangeToList();
                    }
                    sameDayChangeInfo      = new SameDayChangeInfo();
                    sameDayChangeInfo.Date = broker.Date;
                    date = broker.Date;
                    sameDayChangeInfo.NewBrokerList         = new List <BrokerChangeInfo>();
                    sameDayChangeInfo.DeleteBrokerList      = new List <BrokerChangeInfo>();
                    sameDayChangeInfo.NameChangeToList      = new List <BrokerChangeInfo>();
                    sameDayChangeInfo.RicChangeToList       = new List <StockNameRicChange>();
                    sameDayChangeInfo.BordLotSizeChangeList = new List <BrokerChangeInfo>();
                    if (broker.Type.ToLower() == "new")
                    {
                        sameDayChangeInfo.NewBrokerList.Add(broker);
                    }

                    else if (broker.Type.ToLower() == "delete")
                    {
                        sameDayChangeInfo.DeleteBrokerList.Add(broker);
                    }
                    else if (broker.Type.ToLower() == "change")
                    {
                        sameDayChangeInfo.BordLotSizeChangeList.Add(broker);
                    }
                    else if (broker.Type.ToLower() == "name chg to")
                    {
                        sameDayChangeInfo.NameChangeToList.Add(broker);
                    }
                }
            }
            sameDayChangeList.Add(sameDayChangeInfo);
            return(sameDayChangeList);
        }