Application is working, register and calculate
This commit is contained in:
@ -13,7 +13,7 @@ namespace RepositoryPattern
|
||||
{
|
||||
public partial class frmRegisterStock : Form
|
||||
{
|
||||
|
||||
Color hdr = Color.Red;
|
||||
public Dictionary<string, DiTraderStockRow> Stocks { get; set; }
|
||||
public List<StockMember> RegisteredStocks { get; set; } = new List<StockMember>();
|
||||
|
||||
@ -73,6 +73,7 @@ namespace RepositoryPattern
|
||||
lv.SubItems.Add(currStock.BuyValue.ToString());
|
||||
lv.SubItems.Add(currStock.PostAmount.ToString());
|
||||
lv.SubItems.Add(currStock.Comment);
|
||||
//lv.BackColor = Color.Aquamarine;
|
||||
}
|
||||
|
||||
private void AddValidateData()
|
||||
@ -83,7 +84,7 @@ namespace RepositoryPattern
|
||||
currentStock.BuyValue = decimal.Parse(string.IsNullOrEmpty(txtBuyPrice.Text) ? "0" : txtBuyPrice.Text);
|
||||
currentStock.PostAmount = long.Parse(string.IsNullOrEmpty(txtBoughtAmount.Text) ? "0" : txtBoughtAmount.Text);
|
||||
currentStock.ActDate = DateTime.Parse(txtActDate.Text);
|
||||
currentStock.BuyDate = DateTime.Today;
|
||||
currentStock.BuyDate = string.IsNullOrWhiteSpace(txtBuyDate.Text) ? DateTime.Today : DateTime.Parse(txtBuyDate.Text);
|
||||
currentStock.ActValue = decimal.Parse(string.IsNullOrEmpty(txtActValue.Text) ? "0" : txtActValue.Text);
|
||||
currentStock.SoldDate = null; //DateTime.MaxValue;
|
||||
currentStock.SoldValue = decimal.Parse("0");
|
||||
@ -115,5 +116,14 @@ namespace RepositoryPattern
|
||||
{
|
||||
txtActAmount.Text = txtBoughtAmount.Text;
|
||||
}
|
||||
|
||||
private void lwRegBuffer_DrawColumnHeader(object sender, DrawListViewColumnHeaderEventArgs e)
|
||||
{
|
||||
using (Brush hBr = new SolidBrush(hdr))
|
||||
{
|
||||
e.Graphics.FillRectangle(hBr, e.Bounds);
|
||||
e.DrawText();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user