Exemplo n.º 1
0
        private void OnSuccess(AvialableCreditResponce avialableCreditResponce)
        {
            var better = avialableCreditResponce.AvialableCredits
                         .Where(w => w.MaxAmount >= _credit.Amount && w.MaxDuration >= _credit.DurationInMonth && w.Percent < _credit.Procent)
                         .OrderBy(w => w.Percent).ToList();

            if (better.Any() != true)
            {
                RunOnUiThread(() =>
                {
                    ShowError(new Error("code", "Более лучшего кредита не найдено"));
                });
            }
            else
            {
                RunOnUiThread(() =>
                {
                    var intent = new Intent(this, typeof(CompareActivity));
                    intent.PutExtra("credit", JsonConvert.SerializeObject(_credit));
                    intent.PutExtra("AvialableCredit", JsonConvert.SerializeObject(better));
                    StartActivity(intent);
                });
            }
        }
Exemplo n.º 2
0
 private void OnSuccess(AvialableCreditResponce avialableCreditResponce)
 {
     _avialableCredits = avialableCreditResponce.AvialableCredits;
 }