コード例 #1
0
ファイル: Gelir.xaml.cs プロジェクト: ieeebaunsb/ieeeparagoz
 private async void Button_Clicked(object sender, EventArgs e)
 {
     try
     {
         Revenues rev = new Revenues();
         Wallets  w   = new Wallets();
         foreach (var item in wall)
         {
             if (cuzdan.SelectedItem.ToString() == item.CuzdanAdi)
             {
                 w = item;
             }
         }
         rev.Miktar    = Convert.ToDouble(gelirmiktar.Text);
         rev.Tarih     = takvim.Date;
         rev.CuzdanKey = w.CuzdanKey;
         if (Duzen.IsToggled)
         {
             rev.DuzenliMi = true;
         }
         else
         {
             rev.DuzenliMi = false;
         }
         rev.KullaniciKey = "-M0grWhIKpvum7ECwK2H";
         fb.CalculateRev(rev, w, "-M0grWhIKpvum7ECwK2H");
         await fb.AddRevenues(rev, "-M0grWhIKpvum7ECwK2H");
         await DisplayAlert("Bilgi", "Gelir Başarıyla Kaydedildi!", "Tamam");
     }
     catch (Exception s)
     {
         await  DisplayAlert("Hata", s.Message, "Tamam");
     }
 }
コード例 #2
0
        private async void Button_Clicked_Gelir(object sender, EventArgs e)
        {
            try
            {
                Revenues rev = new Revenues();
                Wallets  w   = new Wallets();
                foreach (var item in wall)
                {
                    if (cuzdangelir.SelectedItem.ToString() == item.CuzdanAdi)
                    {
                        w = item;
                    }
                }
                if (gelirmiktar.Text.Trim() != null && gelirmiktar.Text.Trim() != "")
                {
                    rev.Miktar = Convert.ToDouble(gelirmiktar.Text.Trim());
                    // rev.Tarih = takvimgelir.Date;
                    rev.CuzdanKey = w.CuzdanKey;
                    //if (Duzen.IsToggled)
                    //    rev.DuzenliMi = true;
                    //else
                    //    rev.DuzenliMi = false;
                    rev.KullaniciKey = kul.KullaniciKey;
                    fb.CalculateRev(rev, w, kul.KullaniciKey);
                    await fb.AddRevenues(rev, kul.KullaniciKey);
                    await DisplayAlert("Bilgi", "Gelir Başarıyla Kaydedildi!", "Tamam");

                    gelirmiktar.Text = "";
                }
                else
                {
                    await DisplayAlert("Hata", "Tüm Bilgileri Eksiksiz Girdiğinizden Emin Olun!", "Tamam");
                }
            }
            catch (Exception s)
            {
                await DisplayAlert("Hata", s.Message, "Tamam");
            }
        }