コード例 #1
0
        private void button4_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);
            var    parkdurum      = BosParkHelper.ParkDurumuGetByAboneID(aboneID);

            if (AbonelikDurumu == false || parkdurum == true)
            {
                MessageBox.Show("Bu Araç Park Edilemez !!!");
            }
            else
            {
                Form2 frm2 = new Form2(aboneID, tc, ad, soyad, tel, email, plaka, aractipID, AbonelikDurumu, parkdurum);
                frm2.Show();
            }
        }
コード例 #2
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 !");
            }
        }