コード例 #1
0
ファイル: Form1.cs プロジェクト: zlkjj/StockAssistant
        private void historyNetValueToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //add record if this is of new day
            AssetDS.NetValueDTDataTable dt  = NetAssetdataset.NetValueDT;
            AssetDS.NetValueDTRow       row = dt.NewNetValueDTRow();
            row.Date     = DateTime.Now.ToString("yyyy-MM-dd");
            row.NetAsset = m_statData.TotalAsset;
            row.NetCount = m_statData.curNetCount;
            row.NetValue = m_statData.curNetValue;

            DataRow findrow = dt.Rows.Find(row.Date);

            if (findrow == null)
            {
                dt.Rows.Add(row);
            }

            NetValue chartform = new NetValue();

            chartform.chart1.DataSource              = NetAssetdataset.NetValueDT;
            chartform.chart1.Series[0].XValueMember  = "Date";
            chartform.chart1.Series[0].YValueMembers = "NetValue";
            chartform.chart1.DataBind();
            chartform.Show();
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: zlkjj/StockAssistant
        private void historyNetValueToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //add record if this is of new day
            AssetDS.NetValueDTDataTable dt = NetAssetdataset.NetValueDT;
            AssetDS.NetValueDTRow row = dt.NewNetValueDTRow();
            row.Date = DateTime.Now.ToString("yyyy-MM-dd");
            row.NetAsset = m_statData.TotalAsset;
            row.NetCount = m_statData.curNetCount;
            row.NetValue = m_statData.curNetValue;

            DataRow findrow = dt.Rows.Find(row.Date);
            if (findrow == null)
                dt.Rows.Add(row);

            NetValue chartform = new NetValue();
            chartform.chart1.DataSource = NetAssetdataset.NetValueDT;
            chartform.chart1.Series[0].XValueMember = "Date";
            chartform.chart1.Series[0].YValueMembers = "NetValue";
            chartform.chart1.DataBind();
            chartform.Show();
        }