Example #1
0
 /**
  * Bankada Yapılacak işlemlerin başarılı olması için
  * yapılan kurucu/başlatıcı işlemler.
  **/
 private void btnKurulumuTamamla_Click(object sender, EventArgs e)
 {
     if (cbOnay.Checked == false || txtBankaAdi.Text == "" || txtBankaKodu.Text == "" || txtKaynakPara.Text == "" || txtCeoAdi.Text == "" || txtKurucuSoyad.Text == "" || txtTCKNO.Text == "" || txtSifre.Text == "")
     {
         lblKurUyarisi.Visible = true;
     }
     else
     {
         CMG.BilgileriDuzenle(txtBankaAdi.Text, txtBankaKodu.Text, Convert.ToDecimal(txtKaynakPara.Text));
         Ceo  _CEO       = new Ceo(txtCeoAdi.Text, txtKurucuSoyad.Text, Convert.ToInt64(txtTCKNO.Text), 7500, txtSifre.Text);
         Sube MerkezSube = new Sube("Cebeci", "Ankara");
         TRY  SubeHesabi = new TRY();
         Kur  TRYKur     = new Kur("Türk Lirası", "TRY", "₺", 1);
         CMG.SubeEkle(MerkezSube);
         CMG.SubeIndeksi(MerkezSube.SubeKodu);
         CMG.SeciliSube().HesapEkle(SubeHesabi);
         CMG.KurEkle(TRYKur);
         CMG.SubeIndeksi(SubeHesabi.HesapNo);
         SubeHesabi.IslemYap(new Yatir(SubeHesabi.HesapNo, Convert.ToDecimal(txtKaynakPara.Text)));
         CMG.SeciliSube().PersonelEkle(_CEO);
         Giris_Ekrani frmGirisEkrani = new Giris_Ekrani();
         frmGirisEkrani.ShowDialog();
         this.Close();
     }
 }
Example #2
0
 private void btnKurEkle_Click(object sender, EventArgs e)
 {
     if (txtKurAdi.Text == "" || txtKurKodu.Text == "" || txtKurSembol.Text == "" || txtKurOrani.Text == "")
     {
         lblOlumluSonuc.Visible  = false;
         lblOlumsuzSonuc.Visible = true;
     }
     else
     {
         Kur yeniKur = new Kur(txtKurAdi.Text, txtKurKodu.Text, txtKurSembol.Text, Convert.ToDecimal(txtKurOrani.Text));
         CMG.KurEkle(yeniKur);
         lblOlumsuzSonuc.Visible = false;
         lblOlumluSonuc.Visible  = true;
     }
 }
Example #3
0
        private void btnGuncelle_Click(object sender, EventArgs e)
        {
            Kur _Kur = CMG.KurListesi().ElementAt(indeks);

            if (txtGuncelleIsim.Text == "" || txtGuncelleKod.Text == "" || txtGuncelleSembol.Text == "" || txtGuncelleOran.Text == "")
            {
                lblOlumluSonuc.Visible  = false;
                lblOlumsuzSonuc.Visible = true;
            }
            else
            {
                _Kur.Guncelle(txtGuncelleIsim.Text, txtGuncelleKod.Text, txtGuncelleSembol.Text, Convert.ToDecimal(txtGuncelleOran.Text));
                lblOlumsuzSonuc.Visible = false;
                lblOlumluSonuc.Visible  = true;
            }
        }
Example #4
0
        private void btnGiris_Click(object sender, EventArgs e)
        {
            Kur dolar = new Kur("Dolar", "USD", "$", 3.85545M);
            Kur pound = new Kur("Pound", "GBP", "£", 4.53245M);

            CMG.KurEkle(dolar);
            CMG.KurEkle(pound);
            A1.HesapIndeksi(A1.Hesaplarim().ElementAt(0).HesapNo);
            //A1.SeciliHesap().IslemYap(new Yatir(A1.Hesaplarim().ElementAt(0).HesapNo, 1000));
            A1.SeciliHesap().IslemYap(new Havale(A1.SeciliHesap().HesapNo, 100, A2.Hesaplarim().ElementAt(0)));
            MessageBox.Show(A2.Hesaplarim().ElementAt(0).Bakiye.ToString());
            CMG.SubeIndeksi(txtGizli.Text);
            MessageBox.Show(CMG.SeciliSube().SeciliHesap().Bakiye.ToString());
            MessageBox.Show(CMG.Gelir.ToString());
            Giris_Ekrani frm = new Giris_Ekrani();

            frm.ShowDialog(this);
            this.Close();
        }
Example #5
0
        /// <summary>
        /// Kur Ekleme işlemi daha önce aynı Birim Kodu (Örn: "USD", "TRY" vs.) ile
        /// bir Kur Eklenmemiş ise ekleme işlemini gerçekleştiren metottur.
        /// </summary>
        /// <param name="K">K</param>
        /// <returns>true</returns>
        public bool KurEkle(Kur K)
        {
            int kurIndeksi = 0;

            foreach (Kur _Kur in Kurlar)
            {
                if (_Kur.BirimKodu == K.BirimKodu)
                {
                    break;
                }
                kurIndeksi++;
            }
            if (kurIndeksi != Kurlar.Count)
            {
                return(false);
            }
            Kurlar.Add(K);
            return(true);
        }