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(); }
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(); }