|
@@ -275,12 +275,11 @@ namespace MySystem
|
|
|
int BrandId = int.Parse(function.CheckInt(BrandIdString));
|
|
int BrandId = int.Parse(function.CheckInt(BrandIdString));
|
|
|
|
|
|
|
|
//调拨时若出货仓库与填写仓库不符,则该条出货失败
|
|
//调拨时若出货仓库与填写仓库不符,则该条出货失败
|
|
|
- var posinfo = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == SnNo && m.BrandId == BrandId);
|
|
|
|
|
- var storeinfo = db.StoreForCode.FirstOrDefault(m => m.Code == OutStoreNo && m.StoreId == posinfo.StoreId);
|
|
|
|
|
- if (posinfo != null)
|
|
|
|
|
|
|
+ var posinfo = db.PosMachinesTwo.FirstOrDefault(m => m.PosSn == SnNo && m.BrandId == BrandId) ?? new PosMachinesTwo();
|
|
|
|
|
+ var storeinfo = db.StoreForCode.FirstOrDefault(m => m.Code == OutStoreNo && m.StoreId == posinfo.StoreId) ?? new StoreForCode();
|
|
|
|
|
+ if (posinfo.Id > 0)
|
|
|
{
|
|
{
|
|
|
-
|
|
|
|
|
- if (storeinfo != null)
|
|
|
|
|
|
|
+ if (storeinfo.StoreId > 0)
|
|
|
{
|
|
{
|
|
|
KqProducts kqProduct = db.KqProducts.FirstOrDefault(m => m.Id == BrandId) ?? new KqProducts();
|
|
KqProducts kqProduct = db.KqProducts.FirstOrDefault(m => m.Id == BrandId) ?? new KqProducts();
|
|
|
if (kqProduct.Id > 0)
|
|
if (kqProduct.Id > 0)
|