public bool Delete(string generalIdList) { string[] strArray = generalIdList.Split(new char[] { ',' }); ContentManage manage = new ContentManage(); ProductCommon common = new ProductCommon(); ProductData data = new ProductData(); ProductPrice price = new ProductPrice(); for (int i = 0; i < strArray.Length; i++) { CommonModelInfo commonModelInfoById = manage.GetCommonModelInfoById(DataConverter.CLng(strArray[i])); if (!commonModelInfoById.IsNull && (DataConverter.CLng(commonModelInfoById.LinkType) == 0)) { manage.DeleteVirtualContent(DataConverter.CLng(strArray[i])); DBHelper.ExecuteSql("DELETE FROM " + DBHelper.FilterBadChar(commonModelInfoById.TableName) + " WHERE ID = " + commonModelInfoById.ItemId.ToString()); common.DeleteById(commonModelInfoById.ItemId, commonModelInfoById.TableName); data.DeleteByProduct(commonModelInfoById.ItemId, commonModelInfoById.TableName); price.Delete(commonModelInfoById.ItemId, commonModelInfoById.TableName); } } return(DBHelper.ExecuteSql("DELETE FROM PE_CommonModel WHERE GeneralId IN(" + DBHelper.ToValidId(generalIdList) + ")")); }