旧版报表、仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

50 lines
1.8 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Warehouse.Models;
using Warehouse.Models.whMS;
namespace Warehouse.DAL.InspectionShipment
{
public class InspectionShipmentMSDal
{
public bool InspectionShipment(string Container, Models.whMS.tcontainer Shipmentinfo, List<int> StockId)
{
using (var context = new whMSModel())
{
var container = context.tcontainers.Where(a => a.containerno == Container);
if (container == null)
{
return false;
}
Models.whMS.tcontainer t1 = container.FirstOrDefault();
t1.customno = Shipmentinfo.customno;
t1.driver = Shipmentinfo.driver;
t1.driverphone = Shipmentinfo.driverphone;
t1.drivertype = Shipmentinfo.drivertype;
t1.materialcompany = Shipmentinfo.materialcompany;
t1.plateno = Shipmentinfo.plateno;
t1.shipmentuser = Shipmentinfo.shipmentuser;
t1.driveno = Shipmentinfo.driveno;
t1.shipmenttime = System.DateTime.Now;
//发货箱号和提单号 add by xue lei on 2019-9-10
t1.billlading = Shipmentinfo.billlading;
t1.shipmentcarton = Shipmentinfo.shipmentcarton;
string stockids = "";
foreach (var item in StockId)
{
stockids += item + ",";
}
stockids = stockids.Remove(stockids.Length - 1, 1);
string sql = "update wh.dbo.tstockinlog set status =4 where id in(" + stockids + ")";
context.Database.ExecuteSqlCommand(sql);
context.SaveChanges();
return true;
}
}
}
}