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.
57 lines
1.7 KiB
57 lines
1.7 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Data.Entity.Migrations;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using CK.SCP.Models;
|
|
using CK.SCP.Models.ScpEntity;
|
|
|
|
|
|
namespace CK.SCP.Controller
|
|
{
|
|
public class ShipDetailController
|
|
{
|
|
public static V_BillShipDetail GetlistByBillNum(string billnum)
|
|
{
|
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
|
|
{
|
|
return db.V_BillShipDetail.SingleOrDefault(p => p.BillNum == billnum);
|
|
}
|
|
}
|
|
|
|
public static V_BillShip GetBillShiplistByBillNo(string billnum)
|
|
{
|
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
|
|
{
|
|
return db.V_BillShip.SingleOrDefault(p => p.Bill == billnum);
|
|
}
|
|
}
|
|
|
|
public static TF_ASN GetlistByBillNo(string billnum)
|
|
{
|
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
|
|
{
|
|
return db.TF_ASN.SingleOrDefault(p => p.BillNum == billnum);
|
|
}
|
|
}
|
|
public static TF_ASN_DETAIL GetDeatillistByBillNo(string billnum)
|
|
{
|
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
|
|
{
|
|
return db.TF_ASN_DETAIL.SingleOrDefault(p => p.BillNum == billnum);
|
|
}
|
|
}
|
|
public static bool UpdateShip(TF_ASN model)
|
|
{
|
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
|
|
{
|
|
db.TF_ASN.AddOrUpdate(p => p.UID, model);
|
|
|
|
EntitiesFactory.SaveDb(db);
|
|
}
|
|
return true;
|
|
|
|
}
|
|
}
|
|
}
|
|
|