private void ChangeGradeStatus() { string errorMessage = ""; GradeDecisionProcedure grade = new GradeDecisionProcedure(); if (!DataValidation.DataValidation.ValidStudentGradeStatus(tableRowContentList[6].Text, out errorMessage)) { AlertWindow alertWindow = new AlertWindow(errorMessage); alertWindow.ShowDialog(); return; } grade.currentUser = signInUser.UserID; grade.MembershipID = choosenMembershipID; if (tableRowContentList[6].Text == "t") { DbService.DataBaseTakeGrade(grade); AlertWindow alertWindow2 = new AlertWindow("Zatwierdzenie oceny przebiegło pomyślnie."); alertWindow2.ShowDialog(); } else { DbService.DataBaseRejectGrade(grade); AlertWindow alertWindow2 = new AlertWindow("Reklamacja oceny przebiegła pomyślnie."); alertWindow2.ShowDialog(); } CreateIndeksOceny(); }
public void DataBaseRejectGrade(GradeDecisionProcedure grade) { command = new MySqlCommand($"call reklamuj_ocene({grade.MembershipID}, {grade.currentUser});", this.conection); adapter.InsertCommand = command; adapter.InsertCommand.ExecuteNonQuery(); command.Dispose(); }