示例#1
0
        private async Task ExecuteRefreshTUs()
        {
            try
            {
                TUList.Clear();
                if (SelectedSKUID != null)
                {
                    var sdl = await _dbservicewms.GetAvailableTUs(SelectedSKUID.ID);

                    TUList.Clear();
                    foreach (var s in sdl)
                    {
                        TUList.Add(new TUViewModel {
                            TUID     = s.TUID,
                            BoxID    = s.BoxID,
                            Batch    = s.Batch,
                            Qty      = s.Qty,
                            ProdDate = s.ProdDate,
                            ExpDate  = s.ExpDate,
                            Location = s.Location,
                            Status   = (EnumBlockedWMS)s.Status
                        });
                    }
                }
            }
            catch (Exception e)
            {
                _warehouse.AddEvent(Database.Event.EnumSeverity.Error, Database.Event.EnumType.Exception,
                                    string.Format("{0}.{1}: {2}", this.GetType().Name, (new StackTrace()).GetFrame(0).GetMethod().Name, e.Message));
            }
        }