|
@@ -360,7 +360,15 @@ namespace MySystem
|
|
decimal deposit = decimal.Parse(function.CheckNum(pos.SeoKeyword));
|
|
decimal deposit = decimal.Parse(function.CheckNum(pos.SeoKeyword));
|
|
if (deposit > 0)
|
|
if (deposit > 0)
|
|
{
|
|
{
|
|
- TradeAmount -= deposit;
|
|
|
|
|
|
+ PxcModels.TradeRecord chk = db.TradeRecord.FirstOrDefault(m => m.SnNo == pos.PosSn);
|
|
|
|
+ if(chk == null)
|
|
|
|
+ {
|
|
|
|
+ TradeAmount -= deposit;
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ chk.TradeAmount -= deposit;
|
|
|
|
+ }
|
|
pos.Sort = 1;
|
|
pos.Sort = 1;
|
|
}
|
|
}
|
|
}
|
|
}
|