2023-01-13 15:30:20 +08:00
|
|
|
|
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);
|
2024-11-29 11:19:47 +08:00
|
|
|
|
string sql = string.Format(" SELECT * FROM skuinfo WHERE (CHARINDEX('{0}',location)>0) or sku='{1}'",
|
|
|
|
|
sku, sku);
|
2023-01-13 15:30:20 +08:00
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|