Esempio n. 1
0
 private void GridViewKullanici_Click(object sender, EventArgs e)
 {
     GridViewKullanici.OptionsSelection.EnableAppearanceFocusedRow = true;
     if (GridViewKullanici.GetFocusedDataRow() != null && !Focusta)
     {
         Focus_Kullanici();
     }
     _Focusta = false;
 }
Esempio n. 2
0
        void Sil()
        {
            if (GridViewKullanici.GetFocusedDataRow() == null)
            {
                return;
            }

            if (!Genel.Yetkilerim.Contains(7))
            {
                Genel.Yetki_Uyari(7);
                return;
            }
            try
            {
                //Burada kullanıcı işlem bilgisi kontrol edilecek.
                //Eğer kullanıcı üzerinden herhangi bir işlem yapılmış ise silme yapılmayacak.
                string temp_kullanicidi = GridViewKullanici.GetFocusedDataRow()["KullaniciAd"].ToString();

                if (XtraMessageBox.Show("Seçili Kullanıcıyı Silmek İstediğinize Emin Misiniz?\n"
                                        + "Kullanıcı Adı : " + temp_kullanicidi, "Kullanıcı Sil Onay",
                                        MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                {
                    dbModel.DeleteObject(kull);
                    dbModel.SaveChanges();

                    Genel.AlertMesaj.Show(Genel.AnaEkran, "İşlem Başarılı", "Kullanıcı Başarılı Bir Şekilde Silinmiştir", null,
                                          ResOtoSis.mark_blue);

                    Ara(true);
                }
            }
            catch (Exception hata)
            {
                XtraMessageBox.Show("Kullanıcı Silme İşlemi Sırasında Bir Hata Oluştu.\n\nHata:\n" + hata.Message, "Hata",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }