示例#1
0
        private void _FillListReportOfClient()
        {
            try
            {
                using (var aimp = ServiceClientProvider.GetClientReport())
                {
                    var result = aimp.GetClientReports();

                    _banks          = result.Banks;
                    BanksColumnName = new ObservableCollection <string>(result.Banks.Select(x => x.Name));

                    List = TinyMapper.Map <List <ClientReportListItemViewModel> >(result.Items);


                    if (!_isOneLoad && result.ClientStatusesForFilter != null && result.ClientStatusesForFilter.Count() > 0)
                    {
                        _isOneLoad = true;
                        SetFilter("ClientStatusReportClient", result.ClientStatusesForFilter.ToArray());
                        KASTIL_BRASH_FOR_CLIENT_STATUS = Brushes.Orange;
                        OnPropertyChanged("KASTIL_BRASH_FOR_CLIENT_STATUS");
                    }
                    else
                    {
                        ClearFilteres();
                    }
                    if (!_isOneLoad && !string.IsNullOrEmpty(result.UserLastNameForFilter))
                    {
                        _isOneLoad = true;
                        SetFilter("ManagerReportClient", new[] { result.UserLastNameForFilter });
                        KASTIL_BRASH_FOR_MANAGER = Brushes.Orange;
                        OnPropertyChanged("KASTIL_BRASH_FOR_MANAGER");
                    }
                    else
                    {
                        ClearFilteres();
                    }
                }
            }
            catch (Exception ex)
            {
                Logger.Instance.Log("Не удалось получить список", "_FillListReportOfClient", ex);
            }
        }