コード例 #1
0
 public FormMusteri(Banka banka, TicariMusteri TicariM)//Bu form açıldığında giriş yapan müşteri ticari ise bu constructor çalışır.
 {
     InitializeComponent();
     this.banka   = banka;
     this.TicariM = TicariM;
     musteri      = false;
 }
コード例 #2
0
 public FormMusteri(Banka banka, TicariMusteri ticariMusteri)
 {
     InitializeComponent();
     this.banka   = banka;
     this.ticariM = ticariMusteri;
     musteri      = false;
 }
コード例 #3
0
        public void MusteriEkle(bool musteriTipi, string ad, string soyad, string ID, string sifre, DateTime tarih)
        {
            if (musteriTipi == true)
            {
                bireyselMusteri = new BireyselMusteri();

                this.bireyselMusteri.Ad          = ad;
                this.bireyselMusteri.Soyad       = soyad;
                this.bireyselMusteri.ID          = ID;
                this.bireyselMusteri.Sifre       = sifre;
                this.bireyselMusteri.Tarih       = tarih;
                this.bireyselMusteri.musteriTipi = "Bireysel";

                BireyselMusteriler.Add(bireyselMusteri);
                MessageBox.Show("Bireysel Müşteri Başarıyla Eklendi.");
            }
            else
            {
                ticariMusteri = new TicariMusteri();

                ticariMusteri.Ad          = ad;
                ticariMusteri.Soyad       = soyad;
                ticariMusteri.ID          = ID;
                ticariMusteri.Sifre       = sifre;
                ticariMusteri.Tarih       = tarih;
                ticariMusteri.musteriTipi = "Ticari";

                TicariMusteriler.Add(ticariMusteri);
                MessageBox.Show("Ticari Müşteri Başarıyla Eklendi.");
            }
        }
コード例 #4
0
 private void btnMusteriEkle_Click(object sender, EventArgs e)
 {
     if (textAd.Text == "" || textSoyad.Text == "")
     {
         MessageBox.Show("Kullanıcı Adı Ve Soyadı Boş Bırakılamaz");
     }
     else if (comboBoxTur.Text.ToString() == "Bireysel Müşteri")
     {
         BireyselMusteri brysl = new BireyselMusteri();
         brysl.Ad       = textAd.Text.ToString();
         brysl.Soyad    = textSoyad.Text.ToString();
         brysl.HesapTur = "Bireysel";
         Banka.Musteriler.Add(brysl);
         brysl.MusteriNo = Banka.Musteriler.Count + 100;
         MessageBox.Show("Müşteri başarıyla eklendi. " +
                         "Müşteri Numaranız: " + brysl.MusteriNo.ToString());
     }
     else if (comboBoxTur.Text.ToString() == "Ticari Müşteri")
     {
         TicariMusteri ticariMusteri = new TicariMusteri();
         ticariMusteri.Ad       = textAd.Text.ToString();
         ticariMusteri.Soyad    = textSoyad.Text.ToString();
         ticariMusteri.HesapTur = "Ticari";
         Banka.Musteriler.Add(ticariMusteri);
         ticariMusteri.MusteriNo = Banka.Musteriler.Count + 100;
         MessageBox.Show("Müşteri başarıyla eklendi." +
                         "Müşteri Numaranız: " + ticariMusteri.MusteriNo.ToString());
     }
     else
     {
         MessageBox.Show("Hesap Türü Boş Bıraklılamaz");
     }
 }
コード例 #5
0
ファイル: Banka.cs プロジェクト: ebrusahin/Bank-Automation
        public void MusteriEkle(bool musteriTipi, string ad, string soyad, string ID, string sifre, DateTime tarih)
        {
            if (musteriTipi == true)
            {
                bireyselmusteri = new BireyselMusteri();

                this.bireyselmusteri.Ad          = ad;
                this.bireyselmusteri.Soyad       = soyad;
                this.bireyselmusteri.ID          = ID;
                this.bireyselmusteri.Sifre       = sifre;
                this.bireyselmusteri.Tarih       = tarih;
                this.bireyselmusteri.musteriTipi = "Bireysel";

                bireyselMusteriler.Add(bireyselmusteri);
                System.Windows.Forms.MessageBox.Show("Bireysel Müşteri Başarıyla Eklendi.");

                rapor = ($"{ID} numaralı Bireysel Müşteri Başarıyla Eklendi.");
                tarih = DateTime.Today;
                RaporEkle(rapor, tarih);
            }
            else
            {
                ticariMusteri = new TicariMusteri();

                this.ticariMusteri.Ad          = ad;
                this.ticariMusteri.Soyad       = soyad;
                this.ticariMusteri.ID          = ID;
                this.ticariMusteri.Sifre       = sifre;
                this.ticariMusteri.Tarih       = tarih;
                this.ticariMusteri.musteriTipi = "Ticari";
                System.Windows.Forms.MessageBox.Show("Ticari Müşteri Başarıyla Eklendi.");
                rapor = ($"{ID} numaralı Ticari Müşteri Başarıyla Eklendi.");
                tarih = DateTime.Today;
                RaporEkle(rapor, tarih);
            }
        }