示例#1
0
        public async Task LoadBinValues(AsyncCancelationDispatcher acd)
        {
            try
            {
                List <BinValues> binvalues = await NAV.GetBinValuesByRackID(RackID, acd.Default).ConfigureAwait(true);

                if (NotDisposed)
                {
                    foreach (BinValues bv in binvalues)
                    {
                        BinViewModel bvm = BinViewModels.Find(x => x.Code == bv.Code);
                        if (bvm is BinViewModel)
                        {
                            bvm.BottomRightValue = bv.RightValue;
                            bvm.BottomLeftValue  = bv.LeftValue;
                        }
                    }
                }
            }
            catch (OperationCanceledException e)
            {
                System.Diagnostics.Debug.WriteLine(e.Message);
                throw e;
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine(e.Message);
                throw e;
            }
        }