public IEnumerable copy(PXAdapter adapter) { Buffer.Cache.Clear(); foreach (INItemCategory pxResult in PXSelect <INItemCategory, Where <INItemCategory.categoryID, Equal <Required <INItemCategory.categoryID> > > > . Select(this, Folders.Current.CategoryID)) { if (pxResult.CategorySelected == true) { INItemCategoryBuffer insertnode = Buffer.Cache.CreateInstance() as INItemCategoryBuffer; insertnode.InventoryID = pxResult.InventoryID; Buffer.Cache.Insert(insertnode); } } return(adapter.Get()); }
internal IEnumerable cut(PXAdapter adapter) { Buffer.Cache.Clear(); var delbuffer = new List <INItemCategory>(); foreach (INItemCategory pxResult in PXSelect <INItemCategory, Where <INItemCategory.categoryID, Equal <Required <INItemCategory.categoryID> > >, OrderBy <Asc <InventoryItem.inventoryCD> > > .Select(this, Folders.Current.CategoryID)) { if (pxResult.CategorySelected == true) { INItemCategoryBuffer insertnode = Buffer.Cache.CreateInstance() as INItemCategoryBuffer; insertnode.InventoryID = pxResult.InventoryID; Buffer.Cache.Insert(insertnode); delbuffer.Add(pxResult); } } foreach (INItemCategory pxResult in delbuffer) { Members.Cache.Delete(pxResult); } return(adapter.Get()); }