|
|
@@ -314,33 +314,18 @@ void class_bdd::SetResultPubli(int row, unsigned int bitfield) |
|
|
|
wxMessageBox("Erreur lors de la mise à jour de la valeur", "Erreur", wxOK | wxICON_ERROR); |
|
|
|
} |
|
|
|
|
|
|
|
int class_bdd::GetNbCorrecs() |
|
|
|
wxArrayString* class_bdd::GetListCorrecs() |
|
|
|
{ |
|
|
|
int count = 0; |
|
|
|
wxArrayString* out = new wxArrayString[2]; |
|
|
|
|
|
|
|
sqlite3_prepare_v2(db, "SELECT * FROM Correc;", -1, &stmt, NULL); |
|
|
|
while (sqlite3_step(stmt) == SQLITE_ROW) |
|
|
|
count++; |
|
|
|
sqlite3_finalize(stmt); |
|
|
|
return count; |
|
|
|
} |
|
|
|
|
|
|
|
wxString* class_bdd::GetCorrecOrig() |
|
|
|
{ |
|
|
|
wxString* out = new wxString[GetNbCorrecs()]; |
|
|
|
sqlite3_prepare_v2(db, "SELECT * FROM Correc;", -1, &stmt, NULL); |
|
|
|
for (int i=0; sqlite3_step(stmt) == SQLITE_ROW; i++) |
|
|
|
out[i] = sqlite3_column_text(stmt, 0); |
|
|
|
sqlite3_finalize(stmt); |
|
|
|
return out; |
|
|
|
} |
|
|
|
|
|
|
|
wxString* class_bdd::GetCorrecDest() |
|
|
|
{ |
|
|
|
wxString* out = new wxString[GetNbCorrecs()]; |
|
|
|
sqlite3_prepare_v2(db, "SELECT * FROM Correc;", -1, &stmt, NULL); |
|
|
|
for (int i=0; sqlite3_step(stmt) == SQLITE_ROW; i++) |
|
|
|
out[i] = sqlite3_column_text(stmt, 1); |
|
|
|
{ |
|
|
|
out[0].Add(sqlite3_column_text(stmt,0)); |
|
|
|
out[1].Add(sqlite3_column_text(stmt,1)); |
|
|
|
} |
|
|
|
sqlite3_finalize(stmt); |
|
|
|
|
|
|
|
return out; |
|
|
|
} |
|
|
|
|
|
|
|