Ejemplo n.º 1
0
            public static void Discipline(DisciplineInfo disp, string newValue)
            {
                var d = Db.Disciplines.Single(a => a.ID_Discipline == disp.ID_Discipline);

                d.Name = newValue;
                Db.AcceptChanges();
            }
Ejemplo n.º 2
0
 public static void Discipline(DisciplineInfo dis)
 {
     foreach (var row in Db.DiscipTeachers.Where(a => a.DisciplinesRow.Name == dis.Name).ToArray())
     {
         Db.DiscipTeachers.RemoveDiscipTeachersRow(row);
     }
     foreach (var row in Db.Schedule.Where(a => a.DisciplinesRow.Name == dis.Name).ToArray())
     {
         Db.Schedule.RemoveScheduleRow(row);
     }
     foreach (var row in Db.ScheduleException.Where(a => a.DisciplinesRow.Name == dis.Name).ToArray())
     {
         Db.ScheduleException.RemoveScheduleExceptionRow(row);
     }
     Db.Disciplines.RemoveDisciplinesRow(Db.Disciplines.Single(a => a.ID_Discipline == dis.ID_Discipline));
     Db.AcceptChanges();
 }
Ejemplo n.º 3
0
 public int Compare(DisciplineInfo a, DisciplineInfo b)
 {
     return(a.Name.CompareTo(b.Name));
 }