日期:2014-05-20 浏览次数:21509 次
List<ItemProp> itemProps = this.GetItemProps(dir);
List<ItemProp> newProps = new List<ItemProp>();
DataTable dtPid = DB.GetDataSet("select AttributeId,CategoryId from erp.dbo.Category2Attributes", DB.DataBase.ERPDBSlave).Tables[0];
foreach (DataRow row in dtPid.Rows)
{
long pid = long.Parse(row["AttributeId"].ToString());
long cid = long.Parse(row["CategoryId"].ToString());
ItemProp itemProp = (from a in itemProps
where a.Cid == cid && a.Pid == pid
select a).FirstOrDefault();
newProps.Add(itemProp);
}
newProps = itemProps.Except(newProps).ToList();