Beispiel #1
0
        private void _FillListCards()
        {
            try
            {
                using (var service = ServiceClientProvider.GetTrancportCard())
                {
                    var response = service.GetCardsTrancport();

                    List = response.Items.Select(x => new CardTrancportListItemViewModel()
                    {
                        Id                 = x.Id,
                        ColorTrancport     = x.ColorTrancport,
                        DateSale           = x.DateSale?.ToString(AimpDataFormats.DateFormat),
                        DateStart          = x.DateStart.ToString(AimpDataFormats.DateFormat),
                        MakeModelTrancport = x.MakeModelTrancport,
                        Manager            = x.Manager,
                        Number             = x.Number,
                        NumberT            = x.NumberT,
                        Price              = x.Price,
                        Status             = x.Status,
                        Source             = x.Source,
                        User               = x.User,
                        YearTrancport      = x.YearTrancport
                    });
                    if (!_isOneLoad && response.StatusesCardForFilerStart != null && response.StatusesCardForFilerStart.Count() > 0)
                    {
                        _isOneLoad = true;
                        SetFilter("Status", response.StatusesCardForFilerStart);
                        KASTIL_BRASH_FOR_STATUS_CARDTRANCPORT = Brushes.Orange;
                        OnPropertyChanged("KASTIL_BRASH_FOR_STATUS_CARDTRANCPORT");
                    }
                    else
                    {
                        ClearFilteres();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, @"Не удалось получить список а\м");
            }
        }