small things
This commit is contained in:
@ -9,9 +9,9 @@ namespace DataDomain
|
||||
public class Person
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string? FirstName { get; set; }
|
||||
public string? LastName { get; set; }
|
||||
public string? NickName { get; set; }
|
||||
public string FirstName { get; set; }
|
||||
public string LastName { get; set; }
|
||||
public string NickName { get; set; }
|
||||
public DateTime? Born { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ namespace StockDal
|
||||
{
|
||||
StockMarketList.Add(SaveRow.StockName, SaveRow);
|
||||
}
|
||||
catch (ArgumentException ae)
|
||||
catch (ArgumentException )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@ -44,7 +44,7 @@ namespace StockDAL
|
||||
{
|
||||
using var context = new StockContext();
|
||||
var output = (from stk in context.Stocks
|
||||
where stk.SoldDate == null
|
||||
where stk.SoldDate == null || stk.ActValue > 0
|
||||
select stk).ToList();
|
||||
return output;
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -76,6 +76,11 @@ namespace StockInfo
|
||||
CalcNumberAndValue();
|
||||
}
|
||||
|
||||
private void txtSoldAmount_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
CalcNumberAndValue();
|
||||
}
|
||||
|
||||
private void CalcNumberAndValue()
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
private void txtSoldAmount_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
CalcNumberAndValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user