54 lines
1.6 KiB
C#
54 lines
1.6 KiB
C#
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
|
||
|
||
|
||
|
||
}
|
||
}
|