Ejemplo n.º 1
0
        private void dgvClass_UserDeletingRow(object sender, DataGridViewRowCancelEventArgs e)
        {
            int id = 0;

            if (int.TryParse(e.Row.Cells[0].Value.ToString(), out id))
            {
                var db = new LINQDataContext();
                db.Priority_ProfessorDeleteClass(id);
                db.Classroom_TimeDeleteClass(id);
                db.Group_ID_ListDeleteClass(id);
                db.ClassDelete(id);
                db.Dispose();
            }
        }
 private void dgvClass_UserDeletingRow(object sender, DataGridViewRowCancelEventArgs e)
 {
     int id = 0;
     if (int.TryParse(e.Row.Cells[0].Value.ToString(), out id))
     {
         var db = new LINQDataContext();
         db.Priority_ProfessorDeleteClass(id);
         db.Classroom_TimeDeleteClass(id);
         db.Group_ID_ListDeleteClass(id);
         db.ClassDelete(id);
         db.Dispose();
     }
 }