Exemple #1
0
 /// <summary>
 /// Przycisk potwierdzający edycję rekordu w tabeli Opiekun
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonUpdate_Click(object sender, EventArgs e)
 {
     if (textBoxUpdateID.Text == "" || textBoxUpdateName.Text == "" || textBoxUpdateSurname.Text == "" || textBoxUpdatePESEL.Text == "")
     {
         MessageBox.Show("Wszystkie pola muszą być uzupełnione!");
         return;
     }
     DataBaseQueries.UpdateKeeper(sqlConnection, dataGridView, textBoxUpdateID.Text,
                                  textBoxUpdateName.Text, textBoxUpdateSurname.Text, textBoxUpdatePESEL.Text);
     this.Dispose();
 }
Exemple #2
0
        /// <summary>
        /// Ustala który panel do edycji opiekuna ma być dostępny
        /// </summary>
        /// <param name="panelType"></param>
        private void ShowAdequatePanel(string panelType)
        {
            switch (panelType)
            {
            case "Add":
                panelAdd.Enabled = true;
                this.Text        = "Add Keeper";
                break;

            case "Update":
                panelUpdateKeeper.Enabled = true;
                this.Text = "Update Keeper";
                DataBaseQueries.SelectAll(sqlConnection, dataGridViewUpdateKeeper, "Opiekun");
                break;

            default:
                panelDeleteKeeper.Enabled = true;
                this.Text = "Delete Keeper";
                DataBaseQueries.SelectAll(sqlConnection, dataGridViewDeleteKeeper, "Opiekun");
                break;
            }
        }
Exemple #3
0
 /// <summary>
 /// Przycisk wyświetląjacy zawartość tabeli Plan_lekcji
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonLessonPlan_Click(object sender, EventArgs e)
 {
     DataBaseQueries.SelectAll(sqlConnection, dataGridViewSchoolDiary, "Plan_lekcji");
 }
Exemple #4
0
 /// <summary>
 /// Przycisk wyświetląjacy zawartość tabeli Opiekun
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonKeepers_Click(object sender, EventArgs e)
 {
     DataBaseQueries.SelectAll(sqlConnection, dataGridViewSchoolDiary, "Opiekun");
 }
Exemple #5
0
 /// <summary>
 /// Przycisk wyświetląjacy zawartość tabeli Ocena
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonGrades_Click(object sender, EventArgs e)
 {
     DataBaseQueries.SelectAll(sqlConnection, dataGridViewSchoolDiary, "Ocena");
 }
Exemple #6
0
 /// <summary>
 /// Przycisk wyświetląjacy zawartość tabeli Nauczyciel
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonTeachers_Click(object sender, EventArgs e)
 {
     DataBaseQueries.SelectAll(sqlConnection, dataGridViewSchoolDiary, "Nauczyciel");
 }
Exemple #7
0
 /// <summary>
 /// Przycisk wyświetląjacy zawartość tabeli Komentarz
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonComments_Click(object sender, EventArgs e)
 {
     DataBaseQueries.SelectAll(sqlConnection, dataGridViewSchoolDiary, "Komentarz");
 }
Exemple #8
0
 /// <summary>
 /// Przycisk wyświetląjacy zawartość tabeli adres_zamieszkania
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonAddress_Click(object sender, EventArgs e)
 {
     DataBaseQueries.SelectAll(sqlConnection, dataGridViewSchoolDiary, "adres_zamieszkania");
 }
Exemple #9
0
 /// <summary>
 /// Dynamiczne wyszukiwanie opiekunów po imieniu
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void textBoxSearchByNameKeepers_TextChanged(object sender, EventArgs e)
 {
     DataBaseQueries.SearchByName(sqlConnection, dataGridViewSchoolDiary, textBoxSearchByNameKeepers.Text, "Opiekun");
 }
Exemple #10
0
 /// <summary>
 /// Dynamiczne wyszukiwanie nauczycieli po imieniu
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void textBoxSearchByNameTeachers_TextChanged(object sender, EventArgs e)
 {
     DataBaseQueries.SearchByName(sqlConnection, dataGridViewSchoolDiary, textBoxSearchByNameTeachers.Text, "Nauczyciel");
 }
Exemple #11
0
 /// <summary>
 /// Przycisk wyświetlający informacje o nauczycielach
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonShowAllTeachers_Click(object sender, EventArgs e)
 {
     DataBaseQueries.ShowAllTeachers(sqlConnection, dataGridViewSchoolDiary);
 }
Exemple #12
0
 /// <summary>
 /// Przycisk wyświetlający lekcje danej klasy (lub wszystkich klas)
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonShowClassLessons_Click(object sender, EventArgs e)
 {
     DataBaseQueries.ShowClassLessons(sqlConnection, dataGridViewSchoolDiary, textBoxClassDegree.Text);
 }
Exemple #13
0
 /// <summary>
 /// Przycisk wyświetląjacy oceny ucznia o podanym imieniu i nazwisku (lub wszystkie oceny wszystkich uczniów)
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonShowStudentsGrades_Click(object sender, EventArgs e)
 {
     DataBaseQueries.ShowStudentsGrades(sqlConnection, dataGridViewSchoolDiary, textBoxStudentName.Text, textBoxStudentSurname.Text);
 }
Exemple #14
0
 /// <summary>
 /// Przycisk potwierdzający usunięcie rekordu z tabeli Opiekun
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonDelete_Click(object sender, EventArgs e)
 {
     DataBaseQueries.DeleteKeeper(sqlConnection, dataGridView, textBoxID.Text);
     this.Dispose();
 }