Exemple #1
0
        /// <summary>
        /// 添加证券成份
        /// </summary>
        public void AddSecurities()
        {
            List <GridRow> selectedCategoryRows = m_gridCategory.SelectedRows;
            int            rowsSize             = selectedCategoryRows.Count;

            if (rowsSize > 0)
            {
                UserSecurityCategory category = new UserSecurityCategory();
                m_userSecurityService.GetCategory(selectedCategoryRows[0].GetCell(0).GetString(), ref category);
                SecurityList securityList = new SecurityList(m_native);
                securityList.Show();
                WindowEx window = securityList.Window;
                window.IsChildWindow = true;
                window.Tag           = securityList;
                if (category.m_codes != null && category.m_codes.Length > 0)
                {
                    List <Security> securities = new List <Security>();
                    m_securityService.GetSecuritiesByCodes(category.m_codes, securities);
                    securityList.AddSecuritiesToSecuritiesGrid(securities);
                }
                WindowClosingEvent windowClosingEvent = new WindowClosingEvent(SecurityListWindowClosed);
                window.RegisterEvent(windowClosingEvent, EVENTID.WINDOWCLOSING);
                m_native.Invalidate();
            }
        }
Exemple #2
0
        /// <summary>
        /// 选择股票
        /// </summary>
        public void SelectSecurities()
        {
            SecurityList securityList = new SecurityList(m_native);

            securityList.Show();
            WindowEx window = securityList.Window;

            window.IsChildWindow = true;
            window.Tag           = securityList;
            if (m_codes != null && m_codes.Length > 0)
            {
                List <Security> securities = new List <Security>();
                m_securityService.GetSecuritiesByCodes(m_codes, securities);
                securityList.AddSecuritiesToSecuritiesGrid(securities);
            }
            WindowClosingEvent windowClosingEvent = new WindowClosingEvent(SecurityListWindowClosed);

            window.RegisterEvent(windowClosingEvent, EVENTID.WINDOWCLOSING);
            m_native.Invalidate();
        }