Example #1
0
 private void SetRollen()
 {
     rollen = new List<Rolle>();
       var lehrerRolleTA = new LehrerRolleTableAdapter();
       foreach (var rolle in lehrerRolleTA.GetDataByLehrerId(this.Id))
       {
     this.rollen.Add((Rolle)rolle.RolleId);
       }
 }
Example #2
0
 public void AddRolle(Rolle aRolle)
 {
     LehrerRolleTableAdapter ada = new LehrerRolleTableAdapter();
       if (!this.HatRolle(aRolle))
       {
     ada.Insert(this.Id, (int)aRolle);
     this.rollen.Add(aRolle);
       }
 }
Example #3
0
 public void RemoveRolle(Rolle aRolle)
 {
     LehrerRolleTableAdapter ada = new LehrerRolleTableAdapter();
       if (this.HatRolle(aRolle))
       {
     ada.Delete(this.Id, (int)aRolle);
     this.rollen.Remove(aRolle);
       }
 }