Exemple #1
0
        private void Btn_uyeKaydet_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txt_uyeAdi.Text.Trim()) || string.IsNullOrEmpty(txt_uyeSoyadi.Text.Trim()) ||
                string.IsNullOrEmpty(txt_ogrenciNo.Text.Trim()) || lbl_gelenRfid.Text == "Kart okutulmadı")
            {
                MessageBox.Show("Hata: Lütfen bilgileri girdiğinizden emin olun!");
            }
            else
            {
                con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=etkinlikdb.mdb");
                cmd = new OleDbCommand();
                con.Open();
                cmd.Connection  = con;
                cmd.CommandText = "insert into uye (adi, soyadi, ogrenci_no, rfid) values ('" + txt_uyeAdi.Text.Trim() + "','" + txt_uyeSoyadi.Text.Trim() + "','" + txt_ogrenciNo.Text.Trim() + "','" + lbl_gelenRfid.Text.Trim() + "')";
                cmd.ExecuteNonQuery();
                con.Close();
                serialPortUyeKayit.Close();

                Kayit_yap kayit_yp = new Kayit_yap();
                kayit_yp.serialPort1.PortName = comName;
                kayit_yp.serialPort1.Open();
                kayit_yp.comName = comName;
                kayit_yp.Show();
                this.Close();
            }
        }
Exemple #2
0
        private void Btn_uyeKayitVazgec_Click(object sender, EventArgs e)
        {
            serialPortUyeKayit.Close();
            Kayit_yap kayit_Yap = new Kayit_yap();

            kayit_Yap.serialPort1.PortName = comName;
            kayit_Yap.comName = comName;
            kayit_Yap.serialPort1.Open();
            kayit_Yap.Show();
            this.Close();
        }
Exemple #3
0
 private void Kayit_baslat_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(comList.Text))
     {
         MessageBox.Show("Hata: Lütfen bağlantı portunu seçiniz!");
     }
     else
     {
         //MessageBox.Show("Item Selected is:" + comList.Text);
         Kayit_yap kayit_yp = new Kayit_yap();
         kayit_yp.serialPort1.PortName = comList.Text;
         kayit_yp.serialPort1.Open();
         kayit_yp.comName = comList.Text;
         kayit_yp.Show();
         this.Close();
     }
 }