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.
44 lines
1.4 KiB
44 lines
1.4 KiB
4 years ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
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 ASNController
|
||
|
{
|
||
|
public static TF_ASN GetDetaillistByuid(int uid)
|
||
|
{
|
||
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
|
||
|
{
|
||
|
return db.TF_ASN.SingleOrDefault(p => p.UID == uid);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static TF_ASN GetASNlist(string billnum, string vendid)
|
||
|
{
|
||
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
|
||
|
{
|
||
|
return db.TF_ASN.SingleOrDefault(p => p.PoBillNum == billnum && p.VendId == vendid);
|
||
|
}
|
||
|
}
|
||
|
public static TF_ASN_DETAIL GetASNlistDetail(string billnum)
|
||
|
{
|
||
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
|
||
|
{
|
||
|
return db.TF_ASN_DETAIL.SingleOrDefault(p => p.PoBillNum == billnum);
|
||
|
}
|
||
|
}
|
||
|
public static TF_ASN_DETAIL GetASNlistDetailByLine(string billnum, int linenum)
|
||
|
{
|
||
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
|
||
|
{
|
||
|
return db.TF_ASN_DETAIL.SingleOrDefault(p => p.BillNum == billnum && p.PoLineNum == linenum);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|