private void UpdateMastets()
        {
            var selectedMaster = SelectedMaster?.Id;

            MasterList.Clear();
            if (_showAllMasters)
            {
                foreach (var master in _requestService.GetMasters(null))
                {
                    MasterList.Add(master);
                }
                SelectedMaster = MasterList.FirstOrDefault(m => m.Id == selectedMaster);
            }
            else
            {
                if (_selectedHouseId.HasValue)
                {
                    foreach (var master in _requestService.GetWorkersByHouseAndService(_selectedHouseId.Value, SelectedParentService.Id))
                    {
                        MasterList.Add(master);
                    }
                    SelectedMaster = MasterList.FirstOrDefault();
                }
            }
        }
示例#2
0
 void SyncTrade(string tradeId)
 {
     syncTradeCount++;
     try {
         var trade = MasterList.FirstOrDefault(t => t.Id == tradeId);
         if (trade != null)
         {
             SyncTrade(trade);
         }
     } catch (Exception exc) { Log = exc; } finally {
         syncTradeCount--;
     }
 }