private void btnDuzenle_Click(object sender, EventArgs e) { if (GridViewKullanici.RowCount.Equals(0)) { XtraMessageBox.Show("Düzenlenecek Kayıt Bulunamadı."); } else { secilen = GridViewKullanici.GetFocusedRowCellValue(colKullaniciAdi).ToString(); FrmKullaniciIslem form = new FrmKullaniciIslem(kullaniciDal.GetByFilter(context, c => c.KullaniciAdi == secilen)); form.ShowDialog(); if (form.saved) { Guncelle(); } } }
private void simpleButton1_Click(object sender, EventArgs e) { try { connectionStringBuilder.InitialCatalog = cmbDonem.Text; connectionStringBuilder.IntegratedSecurity = true; context = new BenimSalonumContext(connectionStringBuilder.ConnectionString); if (context.Kullanicilar.Any(c => c.KullaniciAdi == txtKullaniciAdi.Text && c.Parola == txtParola.Text)) { RoleTool.kullaniciEntity = context.Kullanicilar.SingleOrDefault(c => c.KullaniciAdi == txtKullaniciAdi.Text); context = new BenimSalonumContext(); FrmKullaniciIslem frmKullanicilar = new FrmKullaniciIslem(context.Kullanicilar.SingleOrDefault(c => c.KullaniciAdi == txtKullaniciAdi.Text)); frmKullanicilar.ShowDialog(); } } catch (Exception) { } }
private void btnEkle_Click(object sender, EventArgs e) { FrmKullaniciIslem form = new FrmKullaniciIslem(new Kullanici()); form.ShowDialog(); }