예제 #1
0
        public static Item KrogerItemFromGroceryItem(this GroceryItem groceryItem)
        {
            Item kitem = new Item()
            {
                UID   = groceryItem.UID,
                Count = groceryItem.Count
            };

            return(kitem);
        }
예제 #2
0
        public List <Action> LoadGetItemAction(GroceryItem item, string pathToCheckoutScript)
        {
            var contents = System.IO.File.ReadAllText(pathToCheckoutScript);
            var actions  = Newtonsoft.Json.JsonConvert.DeserializeObject <List <Action> >(contents);

            foreach (var action in actions)
            {
                if (action.ActionType == ActionType.InputText)
                {
                    action.InputData = item.UID;
                }
            }

            return(actions);
        }