Files
T-DAS/Epost.DAL/SkuInfoDAL.cs
2023-01-13 15:30:20 +08:00

54 lines
1.6 KiB
C#
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
}
}