消除部分warning

This commit is contained in:
alex
2023-07-19 16:05:44 +08:00
parent addc9c19e2
commit 9f7c61b0b0
2 changed files with 15 additions and 8 deletions

View File

@@ -76,7 +76,7 @@ namespace Tnb.WarehouseMgr
}
if (carry != null)
{
if (carry!.location_id!.IsNotEmptyOrNull())
if (carry?.location_id?.IsNotEmptyOrNull() ?? false)
{
var loc = await _db.Queryable<BasLocation>().SingleAsync(it => it.id == carry.location_id);
loc.is_use = ((int)EnumCarryStatus.).ToString();
@@ -139,7 +139,7 @@ namespace Tnb.WarehouseMgr
}
catch (Exception)
{
isSuccessFul= false;
isSuccessFul = false;
}
return isSuccessFul;
}