添加项目文件。
This commit is contained in:
53
Epost.DAL/SkuInfoDAL.cs
Normal file
53
Epost.DAL/SkuInfoDAL.cs
Normal file
@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Epost.DAL
|
||||
{
|
||||
public class SkuInfoDAL
|
||||
{
|
||||
DataBaseOpration.OprationSqlDAL db = DB_DLL.GetInstance();
|
||||
#region 根据sku查询对应主条码 location暂为上位下发的商品码,sku为对应的商品内码
|
||||
public DataTable GetSkuInfoList(string sku)
|
||||
{
|
||||
|
||||
string sql = string.Format(" SELECT * FROM skuinfo WHERE (CHARINDEX('{0}',location)>0) or sku='{1}'",
|
||||
sku, sku);
|
||||
|
||||
|
||||
return db.GetsqlForDT(sql);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 根据sku查询对应主条码 location暂为上位下发的商品码,sku为对应的商品内码
|
||||
public DataTable GetSkuInfo(string sku)
|
||||
{
|
||||
//string sql = string.Format("select * from skuinfo where sku='{0}'",
|
||||
// sku);
|
||||
//string sql = string.Format(" SELECT * FROM skuinfo WHERE (CHARINDEX('{0}',location)>0) or sku='{1}'",
|
||||
// sku, sku);
|
||||
string sql = string.Format(" SELECT * FROM skuinfo WHERE sku='{0}'",
|
||||
sku);
|
||||
|
||||
return db.GetsqlForDT(sql);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 删除skuinfo
|
||||
public bool DeleteSkuinfo()
|
||||
{
|
||||
string sql = string.Format("delete from skuinfo");
|
||||
long x= db.DeleteSql(sql);
|
||||
if (x > 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user