private void btn_MusEkle_Click(object sender, EventArgs e)
        {
            if (HelperLayer.Helper.AlanKontrol(this))
            {
                MusterilerRepository repo = new MusterilerRepository();
                Musteriler           b    = new Musteriler()
                {
                    MusteriAd        = txt_MusAd.Text,
                    MusteriSoyad     = txt_MusSoyAd.Text,
                    MusteriEhliyetNo = Convert.ToInt32(txt_MusEhliyetNo.Text),
                    MusteriTCKNo     = Convert.ToInt32(txt_TcNo.Text),
                    MusteriTelNo     = txt_MusTel.Text.ToString(),
                    MusteriEmail     = txt_MusEmail.Text,
                    SilindiMi        = false
                };
                if (repo.Ekle(b))
                {
                    MessageBox.Show("Eklendi");
                }

                else
                {
                    MessageBox.Show("Eklenemedi");
                }
            }
            else
            {
                MessageBox.Show("Alanlar boş geçilemez");
            }
        }
Beispiel #2
0
        private void btn_MusteridekiKiralikAraclar_Click(object sender, EventArgs e)
        {
            //sor sor sor
            MusterilerRepository arac = new MusterilerRepository();
            Musteriler           m    = new Musteriler();

            m.MusteriId = musteriler.Find(x => x.MusteriAd == cmb_MusteriSec.SelectedItem.ToString()).MusteriId;
            dt_MusteridekiKiralikAraclar.DataSource = arac.MusteridekiAraclar(m.MusteriId);
        }
        private void btn_MusteriListele_Click(object sender, EventArgs e)
        {
            MusterilerRepository musteri = new MusterilerRepository();

            musteriler = musteri.TumVeriyiGetir();
            for (int i = 0; i < musteriler.Count; i++)
            {
                dt_MusteriListele.DataSource = musteriler;
            }
        }
Beispiel #4
0
        private void YoneticiAracKiralayanlar_Load(object sender, EventArgs e)
        {
            MusterilerRepository b = new MusterilerRepository();

            musteriler = b.TumVeriyiGetir();
            for (int i = 0; i < musteriler.Count; i++)
            {
                cmb_MusteriSec.Items.Add(musteriler[i].MusteriAd);
            }
        }
        private void YoneticiKiralamayiBitir_Load(object sender, EventArgs e)
        {
            araclar = arac.KiralananlariGetir();
            dataGridView1.DataSource = araclar;
            MusterilerRepository a = new MusterilerRepository();

            musteriler = a.TumVeriyiGetir();
            for (int i = 0; i < musteriler.Count; i++)
            {
                comboBox1.Items.Add(musteriler[i].MusteriAd);
            }
        }
        private void YoneticiAracKiralama_Load(object sender, EventArgs e)
        {
            araclar = arac.KiralanmayanlariGetir();
            dt_AracListele.DataSource = araclar;
            FirmalarRepository b = new FirmalarRepository();

            firmalar = b.TumVeriyiGetir();
            for (int i = 0; i < firmalar.Count; i++)
            {
                cmb_FirmaSec.Items.Add(firmalar[i].FirmaAdi);
            }
            MusterilerRepository a = new MusterilerRepository();

            musteriler = a.TumVeriyiGetir();
            for (int i = 0; i < musteriler.Count; i++)
            {
                cmb_MusSec.Items.Add(musteriler[i].MusteriAd);
            }
        }