Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     i           = 0;
     SinavSayisi = db.Exams.Count();
     DataListExams.DataSource = db.Exams.ToList();
     DataListExams.DataBind();
 }
Ejemplo n.º 2
0
 protected void DataListExams_ItemCommand(object source, DataListCommandEventArgs e)
 {
     if (e.CommandName == "delete")
     {
         int  ıd             = Convert.ToInt32(e.CommandArgument.ToString());
         Exam silinecekSinav = db.Exams.First(p => p.ExamID == ıd);
         db.Exams.DeleteOnSubmit(silinecekSinav);
         db.SubmitChanges();
         DataListExams.DataSource = db.Exams.ToList();
         DataListExams.DataBind();
     }
 }