public GuideRatingAdmin(Schueler _currentS, Window _parent)
        {
            InitializeComponent();
            currentSchueler = _currentS;
            myParent = _parent;
            
            gridRatings.IsReadOnly = true;

        }
 public EditSchueler(Schueler _schueler, Window _parent)
 {
     InitializeComponent();
     schueler = _schueler;
     myParent = _parent;
     txtVorname.Text = schueler.vorname;
     txtNachname.Text = schueler.nachname;
     txtKlasse.Text = schueler.klasse;
     checkBoxIsGuide.IsChecked = schueler.guide;
 }
        private void btnSave_Click(object sender, RoutedEventArgs e)
        {

            Schueler toAdd = new Schueler(1, txtVorname.Text, txtNachname.Text, txtKlasse.Text, ((checkBoxIsGuide.IsChecked.HasValue)?(bool)checkBoxIsGuide.IsChecked:false));
            bw_addSchueler.DoWork += new DoWorkEventHandler(bw_DoWorkAddSchueler);
            bw_addSchueler.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompletedSchueler);
            bw_addSchueler.RunWorkerAsync(toAdd);

            
        }
        private void btnSave_Click(object sender, RoutedEventArgs e){
        
            //TODO
            //Post Schueler to database

            Schueler toAdd = new Schueler(schueler.s_id, txtVorname.Text, txtNachname.Text, txtKlasse.Text, ((checkBoxIsGuide.IsChecked.HasValue) ? (bool)checkBoxIsGuide.IsChecked : false));
            bw_editSchueler.DoWork += new DoWorkEventHandler(bw_DoWorkAddSchueler);
            bw_editSchueler.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompletedSchueler);
            bw_editSchueler.RunWorkerAsync(toAdd);

            lblMessage.Content = "Schueler changed";
        }