public bool Unloaded(long pickMarks)
        {
            bool result = false;

            for (int i = _inventoryList.Count - 1; i >= 0; i--)
            {
                IcCustomerInventory item = _inventoryList[i];
                if (item.PickMarks == pickMarks)
                {
                    _inventoryList.Remove(item);
                    result = true;
                }
            }

            return(result);
        }
        public async Task Load(string brand, string cardNumber, string transportNumber, int weight,
                               string locationArea, string locationAlley, string locationOrdinal)
        {
            string              location      = AppConfig.FormatLocation(locationArea, locationAlley, locationOrdinal);
            ILocationGrain      locationGrain = ClusterClient.Default.GetGrain <ILocationGrain>(location);
            IcCustomerInventory inventory     = IcCustomerInventory.New(Database.Default,
                                                                        IcCustomerInventory.Set(p => p.CustomerId, Owner.Owner.Owner.Id).
                                                                        Set(p => p.Brand, brand).
                                                                        Set(p => p.CardNumber, cardNumber).
                                                                        Set(p => p.TransportNumber, transportNumber).
                                                                        Set(p => p.Weight, weight).
                                                                        Set(p => p.LocationArea, locationArea).
                                                                        Set(p => p.LocationAlley, locationAlley).
                                                                        Set(p => p.LocationOrdinal, locationOrdinal).
                                                                        Set(p => p.StackOrdinal, await locationGrain.GetStackOrdinal()));

            inventory.InsertSelf();
            await locationGrain.Refresh();

            Add(inventory);
        }
Exemple #3
0
 public void Add(IcCustomerInventory inventory)
 {
     FetchAlley(inventory.LocationAlley).Add(inventory);
 }
 public void Add(IcCustomerInventory inventory)
 {
     _inventoryList.Add(inventory);
 }
Exemple #5
0
 public void Add(IcCustomerInventory inventory)
 {
     FetchLocation(inventory.LocationOrdinal).Add(inventory);
 }