private void btnDuzenle_Click(object sender, EventArgs e) { sifreTut btnDEleman = (sifreTut)((sender as Button).Tag); FrmSifreGuncelle frmSifreGuncelle = new FrmSifreGuncelle(btnDEleman); frmSifreGuncelle.ShowDialog(); panel.Controls.Clear(); FrmAnasayfa frmAnasayfa = (FrmAnasayfa)Application.OpenForms["FrmAnasayfa"]; frmAnasayfa.listele(); }
private void btnSil_Click(object sender, EventArgs e) { Baglanti baglanti = new Baglanti(); int id = Convert.ToInt32((sender as Button).Tag); try { if (MessageBox.Show("emin misin", "silme", MessageBoxButtons.YesNo) == DialogResult.Yes) { db.Delete(new sifreTut { id = id }); } } catch (Exception exception) { MessageBox.Show(exception.Message); } panel.Controls.Clear(); FrmAnasayfa frmAnasayfa = (FrmAnasayfa)Application.OpenForms["FrmAnasayfa"]; frmAnasayfa.listele(); }