Ejemplo n.º 1
0
 private void gridTanim_ValidateRow(object sender, DevExpress.XtraGrid.Views.Base.ValidateRowEventArgs e)
 {
     Entities.Tables.Kod row = (Entities.Tables.Kod)e.Row;
     if (context.Kodlar.Local.Any(c => c.OnEki == row.OnEki))
     {
         MessageBox.Show("Aynı Ön Ekle Kod Kaydedilemez. ");
         gridTanim.CancelUpdateCurrentRow();
     }
 }
Ejemplo n.º 2
0
        private void gridKod_ValidateRow(object sender, DevExpress.XtraGrid.Views.Base.ValidateRowEventArgs e)
        {
            Entities.Tables.Kod row = (Entities.Tables.Kod)e.Row;

            if (context.Kodlar.Local.Any(c => c.KullaniciID == RoleTool.kullaniciEntity.KullaniciID && c.OnEki == row.OnEki && c.Tablo == _tablo))
            {
                XtraMessageBox.Show("Aynı Ön Ekle Kod Kaydedilemez");
                gridKod.CancelUpdateCurrentRow();
            }
        }