示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
 public void Add(IcCustomerInventory inventory)
 {
     FetchAlley(inventory.LocationAlley).Add(inventory);
 }
示例#4
0
 public void Add(IcCustomerInventory inventory)
 {
     _inventoryList.Add(inventory);
 }
示例#5
0
 public void Add(IcCustomerInventory inventory)
 {
     FetchLocation(inventory.LocationOrdinal).Add(inventory);
 }