private bool ItemColumnEvaluate(int row, string itemName) { OperationDetail detail = selectedDetails [row]; if (detail.ItemId >= 0 && detail.ItemName == itemName) { return(true); } double currentQuantity = detail.Quantity; string codeLot; long lotId; Item item = Item.GetByAny(itemName, out barcodeUsed, out codeQtty, out codeLot, out lotId); bool result = selectedDetails [row].ItemEvaluate(item, PriceGroup.RegularPrice); // no quantity from the barcode scanner if (codeQtty.IsZero()) { codeQtty = currentQuantity; } return(result); }
private bool ProdItemEvaluate(int row, string itemName) { ComplexRecipeDetail detail = recipe.DetailsProd [row]; if (detail.ItemId >= 0 && detail.ItemName == itemName) { return(true); } double currentQuantity = detail.Quantity; string codeLot; long lotId; Item item = Item.GetByAny(itemName, out barcodeUsed, out codeQtty, out codeLot, out lotId); if (!ProdItemEvaluate(row, item, true)) { return(false); } // no quantity from the barcode scanner if (codeQtty.IsZero()) { codeQtty = currentQuantity; } return(true); }
private static void RemoveQuickItem(string key, Dictionary <string, AccelKey> shortcuts) { string quickItem = BusinessDomain.QuickItems [key]; BusinessDomain.QuickItems.Remove(key); Item item = Item.GetByAny(quickItem); if (item != null) { shortcuts.Add(KeyShortcuts.GetAccelPath(item.Id.ToString(CultureInfo.InvariantCulture)), AccelKey.Zero); } }
private static void RemoveQuickItem(string key) { string quickItem = BusinessDomain.QuickItems [key]; BusinessDomain.QuickItems.Remove(key); Item item = Item.GetByAny(quickItem); if (item != null) { AccelMap.ChangeEntry(KeyShortcuts.GetAccelPath(item.Id.ToString(CultureInfo.InvariantCulture)), (uint)Key.VoidSymbol, 0, true); } }
private bool ItemColumnEvaluate(int row, string value) { Item item = Item.GetByAny(value); return(item != null && itemShortcuts [row].ItemEvaluate(item, PriceGroup.RegularPrice)); }