Esempio n. 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (checkBox4.Checked == true)
            {
                cek           = "a";
                textBox5.Text = text5;
                yazdir();
            }
            else
            {
                cek = "b";

                yazdir();
            }
            if (textBox5.Text == kul && textBox6.Text == sif)
            {
                MessageBox.Show("Giriş Başarılı");
                ucus_kayit frm = new ucus_kayit();
                frm.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Kullanıcı adı veya Şifre yanlış");
            }
        }
 private void timer2_Tick(object sender, EventArgs e)
 {
     aaa2 += 1;
     if (aaa2 >= 2)
     {
         timer2.Stop();
         duzelt();
         baglan.Close();
         baglan.Open();
         sorgu.Connection  = baglan;
         sorgu.CommandText = "update tablo set tarih='" + dateTimePicker1.Text + "',ucus_tipi='" + comboBox1.Text + "',parasut_tipi='" + comboBox2.Text + "',yp='" + text1.Text + "',typ='" + text2.Text + "',myp='" + text3.Text + "',yp_vk='" + text4.Text + "',yp_2='" + text5.Text + "',typ_2='" + text6.Text + "',myp_2='" + text7.Text + "',yp_vk_2='" + text8.Text + "',kalkis_yeri='" + textBox9.Text + "',yuksekligi='" + textBox10.Text + "',inis_yeri='" + textBox11.Text + "',cikis_turu='" + comboBox3.Text + "',irtifa_kazanma='" + textBox12.Text + "',ucus_mesafesi='" + textBox13.Text + "',hava_durumu='" + textBox14.Text + "',ruzgar_yonu='" + comboBox4.Text + "',ruzgar_hizi='" + comboBox5.Text + "',dusunceler='" + textBox15.Text + "' where ucus_no='" + ucus_kayıt_no + "'";
         sorgu.ExecuteNonQuery();
         baglan.Close();
         baglan.Open();
         sorgu.Connection  = baglan;
         sorgu.CommandText = "update tablo2 set yp_saat='" + yp_yaz + "',typ_saat='" + typ_yaz + "',myp_saat='" + myp_yaz + "',yp_vk_saat='" + yp_vk_yaz + "' where ucus_no='" + ucus_kayıt_no + "'";
         sorgu.ExecuteNonQuery();
         MessageBox.Show("Kayıt Güncellendi");
         this.Hide();
         ucus_kayıt_no = 0;
         guncelle      = 0;
         ucus_kayit frm = new ucus_kayit();
         frm.Show();
     }
 }
        private void timer1_Tick(object sender, EventArgs e)
        {
            aaa1 += 1;
            if (aaa1 >= 2)
            {
                timer1.Stop();
                duzelt();
                baglan.Close();
                baglan.Open();
                sorgu.Connection  = baglan;
                sorgu.CommandText = "insert into tablo2(ucus_no,yp_saat,typ_saat,myp_saat,yp_vk_saat) values('" + ucus + "','" + yp_yaz + "','" + typ_yaz + "','" + myp_yaz + "','" + yp_vk_yaz + "')";
                sorgu.ExecuteNonQuery();
                baglan.Close();

                baglan.Open();
                sorgu.Connection  = baglan;
                sorgu.CommandText = "insert into tablo(ucus_no,tarih,ucus_tipi,parasut_tipi,yp,typ,myp,yp_vk,yp_2,typ_2,myp_2,yp_vk_2,kalkis_yeri,yuksekligi,inis_yeri,cikis_turu,irtifa_kazanma,ucus_mesafesi,hava_durumu,ruzgar_yonu,ruzgar_hizi,dusunceler) values('" + ucus + "','" + dateTimePicker1.Text + "','" + comboBox1.Text + "','" + comboBox2.Text + "','" + text1.Text + "','" + text2.Text + "','" + text3.Text + "','" + text4.Text + "','" + text5.Text + "','" + text6.Text + "','" + text7.Text + "','" + text8.Text + "','" + textBox9.Text + "','" + textBox10.Text + " " + label14.Text + "','" + textBox11.Text + "','" + comboBox3.Text + "','" + textBox12.Text + " " + label17.Text + "','" + textBox13.Text + " " + label19.Text + "','" + textBox14.Text + "','" + comboBox4.Text + "','" + comboBox5.Text + "','" + textBox15.Text + "')";
                sorgu.ExecuteNonQuery();
                baglan.Close();
                MessageBox.Show("Kayıt Başarılı");
                this.Hide();
                ucus_kayit frm = new ucus_kayit();
                frm.Show();
            }
        }
        private void kayitEkle_FormClosed(object sender, FormClosedEventArgs e)
        {
            ucus_kayit frm = new ucus_kayit();

            frm.Show();
            this.Hide();
        }
Esempio n. 5
0
 private void button4_Click(object sender, EventArgs e)
 {
     textBox7.Text = textBox7.Text.Trim();
     textBox8.Text = textBox8.Text.Trim();
     textBox9.Text = textBox9.Text.Trim();
     for (j = 0; j < textBox7.Text.Length; j++)
     {
         sayac2 += 1;
     }
     if (sayac2 < 5)
     {
         MessageBox.Show("Lütfen Kullanıcı adını en az 5 harftan oluşacak şekilde yazınız");
         sayac2 = 0;
     }
     else
     {
         if (textBox8.Text != textBox9.Text)
         {
             MessageBox.Show("Şifreler Uyuşmuyor");
         }
         else
         {
             if (textBox9.Text == "" || textBox8.Text == "")
             {
                 MessageBox.Show("Lütfen Şifrenizi Giriniz");
             }
             else
             {
                 MessageBox.Show("Kullanıcı Yenilendi");
                 baglan.Open();
                 sorgu.Connection  = baglan;
                 sorgu.CommandText = "update giriskismi set kullanici='" + textBox7.Text + "',sifre='" + textBox8.Text + "'";
                 sorgu.ExecuteNonQuery();
                 baglan.Close();
                 ucus_kayit frm = new ucus_kayit();
                 frm.Show();
                 this.Hide();
             }
         }
     }
 }
Esempio n. 6
0
 private void button1_Click(object sender, EventArgs e)
 {
     textBox10.Text = textBox10.Text.ToUpper();
     textBox11.Text = textBox11.Text.ToUpper();
     textBox1.Text  = textBox1.Text.Trim();
     textBox2.Text  = textBox2.Text.Trim();
     textBox3.Text  = textBox3.Text.Trim();
     for (int i = 0; i < textBox1.Text.Length; i++)
     {
         sayac += 1;
     }
     if (sayac < 5)
     {
         MessageBox.Show("Lütfen Kullanıcı adını en az 5 harftan oluşacak şekilde yazınız");
         sayac = 0;
     }
     else if (textBox2.Text == "" || textBox3.Text == "" || textBox10.Text == "" || textBox11.Text == "")
     {
         MessageBox.Show("Lütfen bütün alanları doldurunuz");
     }
     else if (textBox2.Text != textBox3.Text)
     {
         MessageBox.Show("Şifreler Uyuşmuyor");
     }
     else
     {
         MessageBox.Show("Kullanıcı Oluşturuldu");
         sifreGirildimi = "a";
         baglan.Close();
         baglan.Open();
         sorgu.Connection  = baglan;
         sorgu.CommandText = "insert into giriskismi(sifre_girildi,kullanici,sifre,ad,soyad,d_t) values('" + sifreGirildimi + "','" + textBox1.Text + "','" + textBox2.Text + "','" + textBox10.Text + "','" + textBox11.Text + "','" + dateTimePicker1.Text + "')";
         sorgu.ExecuteNonQuery();
         baglan.Close();
         ucus_kayit frm = new ucus_kayit();
         frm.Show();
         this.Hide();
     }
 }
 private void timer3_Tick(object sender, EventArgs e)
 {
     aaa3 += 1;
     if (aaa3 >= 2)
     {
         timer3.Stop();
         baglan.Close();
         baglan.Open();
         sorgu.Connection  = baglan;
         sorgu.CommandText = "delete * from tablo where ucus_no='" + ucus_kayıt_no + "'";
         sorgu.ExecuteNonQuery();
         baglan.Close();
         baglan.Open();
         sorgu.Connection  = baglan;
         sorgu.CommandText = "delete * from tablo2 where ucus_no='" + ucus_kayıt_no + "'";
         sorgu.ExecuteNonQuery();
         MessageBox.Show("Kayıt Silindi");
         this.Hide();
         ucus_kayıt_no = 0;
         guncelle      = 0;
         ucus_kayit frm = new ucus_kayit();
         frm.Show();
     }
 }