Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     TxtYoneticiId.Clear();
     TxtKullaniciAdi.Clear();
     TxtKulaniciSifre.Clear();
     TxtKullaniciAdi.Focus();
 }
Exemplo n.º 2
0
 private void BtnSil_Click(object sender, EventArgs e)
 {
     try
     {
         SqlCommand command = new SqlCommand("delete from Admin where YoneticiId=@p1", conn.connect());
         command.Parameters.AddWithValue("@p1", TxtYoneticiId.Text);
         command.ExecuteNonQuery();
         conn.connect().Close();
         MessageBox.Show("Silme İşlemi Gerçekleştirildi.");
         this.adminTableAdapter.Fill(this.yurtOtomasyonuDataSet5.Admin);
         TxtYoneticiId.Clear();
         TxtKullaniciAdi.Clear();
         TxtSifre.Clear();
     }
     catch (Exception)
     {
         MessageBox.Show("Silme İşlemi Yapılırken Hata Oluştu Lütfen Tekrar Deneyiniz.");
     }
 }
Exemplo n.º 3
0
 private void BtnKaydet_Click(object sender, EventArgs e)
 {
     // Yönetici Ekleme
     try
     {
         SqlCommand komut = new SqlCommand("insert into Admin (YöneticiAd,YöneticiŞifre) values (@p1,@p2)", bgl.baglanti());
         komut.Parameters.AddWithValue("@p1", TxtKullaniciAdi.Text);
         komut.Parameters.AddWithValue("@P2", TxtKulaniciSifre.Text);
         komut.ExecuteNonQuery();
         TxtYoneticiId.Clear();
         TxtKullaniciAdi.Clear();
         TxtKulaniciSifre.Clear();
         TxtKullaniciAdi.Focus();
         bgl.baglanti().Close();
         YoneticiGetir();
         MessageBox.Show("Yönetici Kaydedildi");
     }
     catch (Exception)
     {
         MessageBox.Show("Hatalı Kaydetme İşlemi");
     }
 }