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.
34 lines
895 B
34 lines
895 B
1 year ago
|
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 ReceiveDetailController
|
||
|
{
|
||
|
public static V_ReceiveDetail GetlistByBillNum(string billnum)
|
||
|
{
|
||
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
|
||
|
{
|
||
|
return db.V_ReceiveDetail.SingleOrDefault(p => p.BillNum == billnum);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static bool UpdateReceive(V_ReceiveDetail model)
|
||
|
{
|
||
|
using (ScpEntities db = EntitiesFactory.CreateScpInstance())
|
||
|
{
|
||
|
db.V_ReceiveDetail.AddOrUpdate(p => p.UID, model);
|
||
|
EntitiesFactory.SaveDb(db);
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
}
|
||
|
}
|