Esempio n. 1
0
        private void _FillListCashTransaction()
        {
            try
            {
                using (var service = ServiceClientProvider.GetCashTransaction())
                {
                    var response = service.GetCashTransactions();

                    List =
                        new List <CashTransactionListItemViewModel>(
                            response.Select(x => new CashTransactionListItemViewModel()
                    {
                        Id = x.Id,
                        DocumentBuyerId   = x.DocumentBuyerId,
                        DocumentSellerId  = x.DocumentSellerId,
                        PtsId             = x.PtsId,
                        BuyerFullName     = x.BuyerFullName,
                        Date              = x.Date.ToString(AimpDataFormats.DateFormat),
                        TrancportFullName = x.TrancportFullName,
                        Number            = x.Number,
                        NumberProxy       = x.NumberProxy,
                        SellerFullName    = x.SellerFullName
                    }));
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Не удалось получить список");
            }
        }