Dasturiy injiniring nazariy savollarga javoblar


Download 33.78 Kb.
bet1/8
Sana05.01.2022
Hajmi33.78 Kb.
#219707
  1   2   3   4   5   6   7   8
Bog'liq
Dasturiy injiniring nazariy savollarga Javoblar tayyor


Dasturiy injiniring nazariy savollarga javoblar

1-savol Ma’lumotlar ustid asosiy amallar CRUD da Delete(o’chirish) amali

Ko’pgina ma’lumotlar ustida CRUD (create,read, update va delete)

Ya’ni yaratish, o’qish, yangilash va o’chirish amallari. Entity framework orqali buni amalga oshirish oson.



try

{

if (dataGridView1.SelectedRows.Count > 0)

{

int index = dataGridView1.SelectedRows[0].Index;

int id = 0;

bool convert=Int32.TryParse(dataGridView1[0,index].Value.ToString(),out id);

if(convert==false)

return;

program p=db.program.Find(id);

db.program.Remove(p);

db.SaveChanges();

MessageBox.Show("ma'lumot o'chirildi");

}

}

catch(Exception ex)

{

MessageBox.Show(ex.Message);

}


Download 33.78 Kb.

Do'stlaringiz bilan baham:
  1   2   3   4   5   6   7   8




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling