Esempio n. 1
0
        private void listView_weighting_SelectedIndexChanged(object sender, EventArgs e)
        {
            ListView.SelectedListViewItemCollection selected_stocks = listView_weighting.SelectedItems;

            if (selected_stocks.Count > 0)
            {
                CompanyProfilePage cpp          = new CompanyProfilePage();
                ListViewItem       select_stock = selected_stocks[0];
                juristic_stock_idx        = select_stock.Text;
                label_StockName.Text      = cpp.GetStockChineseName(db_manager.getConnection(), juristic_stock_idx);
                match_juristic_trade_info = new ArrayList();
                juristic_max_vol          = 0;
                juristic_min_vol          = 0;
                foreach (JuristicTradeInfo trade_info in jti)
                {
                    if (trade_info.stock_index.Equals(juristic_stock_idx))
                    {
                        match_juristic_trade_info.Add(trade_info);
                        if (trade_info.total_volume > juristic_max_vol)
                        {
                            juristic_max_vol = trade_info.total_volume;
                        }
                        if (trade_info.total_volume < juristic_min_vol)
                        {
                            juristic_min_vol = trade_info.total_volume;
                        }
                    }
                }
                y_height             = Math.Max(juristic_max_vol, Math.Abs(juristic_min_vol));
                label_StockName.Text = cpp.GetStockChineseName(db_manager.getConnection(), juristic_stock_idx);

                UpdateJuristicGraph = true;
                panel_juristic.Invalidate();
            }
        }
Esempio n. 2
0
        private void button_QueryProfile_Click(object sender, EventArgs e)
        {
            db_manager.DBConnect();
            CompanyProfilePage cpp = new CompanyProfilePage();
            String             res = cpp.GetStockChineseName(db_manager.getConnection(), "1101");

            label_company_profile_result.Text = res;
        }