small things

This commit is contained in:
2021-03-03 23:47:29 +01:00
parent 234cdbf9e8
commit 3959943607
7 changed files with 10 additions and 10 deletions

View File

@ -9,9 +9,9 @@ namespace DataDomain
public class Person public class Person
{ {
public int Id { get; set; } public int Id { get; set; }
public string? FirstName { get; set; } public string FirstName { get; set; }
public string? LastName { get; set; } public string LastName { get; set; }
public string? NickName { get; set; } public string NickName { get; set; }
public DateTime? Born { get; set; } public DateTime? Born { get; set; }
} }
} }

View File

@ -143,7 +143,7 @@ namespace StockDal
{ {
StockMarketList.Add(SaveRow.StockName, SaveRow); StockMarketList.Add(SaveRow.StockName, SaveRow);
} }
catch (ArgumentException ae) catch (ArgumentException )
{ {
try try
{ {

View File

@ -44,7 +44,7 @@ namespace StockDAL
{ {
using var context = new StockContext(); using var context = new StockContext();
var output = (from stk in context.Stocks var output = (from stk in context.Stocks
where stk.SoldDate == null where stk.SoldDate == null || stk.ActValue > 0
select stk).ToList(); select stk).ToList();
return output; return output;
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -76,6 +76,11 @@ namespace StockInfo
CalcNumberAndValue(); CalcNumberAndValue();
} }
private void txtSoldAmount_TextChanged(object sender, EventArgs e)
{
CalcNumberAndValue();
}
private void CalcNumberAndValue() private void CalcNumberAndValue()
{ {
if (txtSoldPrice.Text.IsNumeric() && txtSoldAmount.Text.IsNumeric()) if (txtSoldPrice.Text.IsNumeric() && txtSoldAmount.Text.IsNumeric())
@ -84,10 +89,5 @@ namespace StockInfo
txtRemainingNo.Text = stkMemSelected.ActAmount > 0 ? (stkMemSelected.PostAmount - long.Parse(txtSoldAmount.Text)).ToString() : 0.ToString(); txtRemainingNo.Text = stkMemSelected.ActAmount > 0 ? (stkMemSelected.PostAmount - long.Parse(txtSoldAmount.Text)).ToString() : 0.ToString();
} }
} }
private void txtSoldAmount_TextChanged(object sender, EventArgs e)
{
CalcNumberAndValue();
}
} }
} }