コード例 #1
0
        private void dgvList_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            stockId    = Convert.ToInt32(dgvList[1, dgvList.SelectedCells[0].RowIndex].Value);
            txtId.Text = stockId.ToString();
            if (chkPriceHistory.Checked)
            {
                frmPriceHistory frm = new frmPriceHistory();
                frm.days  = 10;
                frm.lstId = new List <int>();
                frm.lstId.Add(stockId);
                frm.RefreshAction(true);
                frm.Show();
            }

            if (chkStockInfo.Checked)
            {
                Process.Start("chrome.exe", db.StockInfoUrl(stockId));
            }

            if (chkStockHolder.Checked)
            {
                frmStockHolder frm = new frmStockHolder();
                frm.stockId = stockId;
                frm.Show();
            }
        }
コード例 #2
0
 private void History(int id)
 {
     if (chkPriceHistory.Checked)
     {
         frmPriceHistory frm = new frmPriceHistory();
         frm.days  = Convert.ToInt32(txtSub.Text);
         frm.lstId = new List <int>();
         frm.lstId.Add(id);
         frm.RefreshAction(true);
         frm.Show();
     }
 }
コード例 #3
0
        private void dgvList_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (compare)
                {
                    return;
                }
                stockId = Convert.ToInt32(dgvList.Rows[e.RowIndex].Cells["StockId"].Value);
                iId     = Convert.ToInt32(dgvList.Rows[e.RowIndex].Cells["Id"].Value);
                cboStock.SelectedValue = stockId;
                if (dgvList.Rows[e.RowIndex].Cells["BuyPrice"].Value != null)
                {
                    txtBuyPrice.Text      = Convert.ToString(dgvList.Rows[e.RowIndex].Cells["BuyPrice"].Value);
                    txtRealBuyPrice.Text  = Convert.ToString(dgvList.Rows[e.RowIndex].Cells["BuyRealPrice"].Value);
                    dtRealBuyDate.Value   = Convert.ToDateTime(dgvList.Rows[e.RowIndex].Cells["BuyRealDate"].Value);
                    txtSalePrice.Text     = Convert.ToString(dgvList.Rows[e.RowIndex].Cells["SalePrice"].Value);
                    txtRealSalePrice.Text = Convert.ToString(dgvList.Rows[e.RowIndex].Cells["SaleRealPrice"].Value);
                    dtRealSaleDate.Value  = Convert.ToDateTime(dgvList.Rows[e.RowIndex].Cells["SaleRealDate"].Value);
                }
                if (chkPriceHistory.Checked)
                {
                    frmPriceHistory frm = new frmPriceHistory();
                    frm.days  = 10;
                    frm.lstId = new List <int>();
                    frm.lstId.Add(stockId);
                    frm.RefreshAction(true);
                    frm.Show();
                }

                if (chkStockHolder.Checked)
                {
                    frmStockHolder frm = new frmStockHolder();
                    frm.stockId = stockId;
                    frm.Show();
                }
            }
            catch (Exception) { }
        }