Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            var durum = string.IsNullOrEmpty(textBox1.Text) ||
                        string.IsNullOrWhiteSpace(textBox2.Text) ||
                        string.IsNullOrWhiteSpace(textBox3.Text) ||
                        string.IsNullOrWhiteSpace(textBox4.Text) ||
                        string.IsNullOrWhiteSpace(textBox5.Text) ||
                        string.IsNullOrWhiteSpace(textBox6.Text) ||
                        comboBox1.SelectedIndex == -1 ||
                        comboBox2.SelectedIndex == -1;

            if (durum)
            {
                MessageBox.Show("Tüm Alanları Doldurun !");
            }
            else
            {
                if (textBox1.Text.Length < 11)
                {
                    MessageBox.Show("Geçerli Bir TC Giriniz !");
                }
                else
                {
                    AbonelerModel ab = new AbonelerModel();
                    ab.AbonelikDurumu = Convert.ToBoolean(comboBox2.SelectedIndex);
                    ab.AboneID        = musteriID;
                    ab.TC             = textBox1.Text;
                    ab.Ad             = textBox2.Text;
                    ab.Soyad          = textBox3.Text;
                    ab.Telefon        = textBox4.Text;
                    ab.Email          = textBox5.Text;
                    ab.PlakaNo        = textBox6.Text;
                    ab.AracTipiID     = (comboBox1.SelectedIndex + 1);

                    Aboneler k = new Aboneler();

                    k.AbonelikDurumu = ab.AbonelikDurumu;
                    k.AboneID        = ab.AboneID;
                    k.TC             = ab.TC;
                    k.Ad             = ab.Ad;
                    k.Soyad          = ab.Soyad;
                    k.Telefon        = ab.Telefon;
                    k.Email          = ab.Email;
                    k.PlakaNo        = ab.PlakaNo;
                    k.AracTipiID     = ab.AracTipiID;
                    AboneİslemHelper.MusteriAptade(k);
                    MusteriKayıt mk = new MusteriKayıt();
                    mk.Refresh();
                    Hide();
                }
            }
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            var durum = string.IsNullOrEmpty(textBox1.Text) ||
                        string.IsNullOrWhiteSpace(textBox2.Text) ||
                        string.IsNullOrWhiteSpace(textBox3.Text) ||
                        string.IsNullOrWhiteSpace(textBox4.Text) ||
                        string.IsNullOrWhiteSpace(textBox5.Text) ||
                        string.IsNullOrWhiteSpace(textBox6.Text) ||
                        comboBox1.SelectedIndex == -1;

            if (durum)
            {
                MessageBox.Show("Tüm Alanları Doldurun !");
            }
            else
            {
                if (textBox1.Text.Length < 11)
                {
                    MessageBox.Show("Geçerli Bir Tc Giriniz !");
                }
                else
                {
                    Aboneler ab = new Aboneler();


                    ab.AbonelikDurumu = true;

                    ab.TC         = textBox1.Text;
                    ab.Ad         = textBox2.Text;
                    ab.Soyad      = textBox3.Text;
                    ab.Telefon    = textBox4.Text;
                    ab.Email      = textBox5.Text;
                    ab.PlakaNo    = textBox6.Text;
                    ab.AracTipiID = comboBox1.SelectedIndex + 1;


                    AboneİslemHelper.AboneKayıt(ab);
                    dataGridView1.DataSource = AboneİslemHelper.AboneleriGetir();
                    textBox1.Clear();
                    textBox2.Clear();
                    textBox3.Clear();
                    textBox4.Clear();
                    textBox5.Clear();
                    textBox6.Clear();
                }
            }
        }
Exemplo n.º 3
0
        private void button2_Click(object sender, EventArgs e)
        {
            int    aboneID        = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value);
            string tc             = dataGridView1.CurrentRow.Cells[1].Value.ToString();
            string ad             = dataGridView1.CurrentRow.Cells[2].Value.ToString();
            string soyad          = dataGridView1.CurrentRow.Cells[3].Value.ToString();
            string tel            = dataGridView1.CurrentRow.Cells[4].Value.ToString();
            string email          = dataGridView1.CurrentRow.Cells[5].Value.ToString();
            string plaka          = dataGridView1.CurrentRow.Cells[6].Value.ToString();
            int    aractipID      = Convert.ToInt32(dataGridView1.CurrentRow.Cells[7].Value);
            bool   AbonelikDurumu = Convert.ToBoolean(dataGridView1.CurrentRow.Cells[8].Value);

            MusteriGuncelle mg = new MusteriGuncelle(aboneID, tc, ad, soyad, tel, email, plaka, aractipID, AbonelikDurumu);

            mg.Show();
            dataGridView1.DataSource = AboneİslemHelper.AboneleriGetir();
        }
Exemplo n.º 4
0
        private void button3_Click(object sender, EventArgs e)
        {
            var id         = Convert.ToInt32(textBox1.Text);
            var abonedurum = AboneİslemHelper.AboneVarMI(id);

            if (abonedurum)
            {
                var durum = BosParkHelper.ParkDurumuGetByAboneID(id);
                if (durum)
                {
                    var abone = AboneİslemHelper.AboneGetirID(id);
                    park = BosParkHelper.ParkBilgiGetirID(id);


                    textBox3.Text = park.ParkYeriID.ToString();
                    textBox5.Text = abone.PlakaNo;

                    textBox6.Text = abone.TC;
                    textBox7.Text = abone.Ad;
                    textBox8.Text = abone.Soyad;
                    label7.Text   = park.TarihGiriş.ToString();
                    label8.Text   = DateTime.Now.ToString();
                    var tarih = DateTime.Now - park.TarihGiriş;
                    süre            = tarih.Value.TotalHours;
                    aractipi        = (int)abone.AracTipiID;
                    button1.Enabled = true;
                }
                else
                {
                    MessageBox.Show("Müşterinin Otoparkta Aracı Bulunmamaktadır !");
                }
            }
            else
            {
                MessageBox.Show("Böyle Bir Abone Yoktur !");
            }
        }
Exemplo n.º 5
0
 private void button3_Click(object sender, EventArgs e)
 {
     dataGridView1.DataSource = AboneİslemHelper.AboneleriGetir();
 }
Exemplo n.º 6
0
 private void MusteriKayıt_Load(object sender, EventArgs e)
 {
     dataGridView1.DataSource = AboneİslemHelper.AboneleriGetir();
 }