no message

This commit is contained in:
2024-09-12 23:32:15 +03:00
parent 4da2187f42
commit 3201742848
9 changed files with 252 additions and 118 deletions

View File

@@ -1,9 +1,13 @@
package TestingSystem.Common.Test;
import Common.Current;
import Common.Database.iDBTable;
import Common.Global;
import Common.UI.DataSetControlForm;
import Common.UI.Windows.Dialog.DBObjectDialog;
import TestingSystem.Common.Group.Group;
import TestingSystem.Common.Test.UI.TestFields;
import java.util.Vector;
public class TestDBTable extends iDBTable<Test> {
public TestDBTable() {
super(Test.class);
@@ -108,4 +112,16 @@ public class TestDBTable extends iDBTable<Test> {
}
return null;
}
public Vector<Test> getSelectedGroupTests(Group group) {
Vector<Test> allTests = new Vector<>();
Vector<Test> selectedTests = new Vector<>();
//--
for (Test test : Data.values()) {
if (test.group_id == group.id) {
allTests.add(test);
if (test.isSelected()) selectedTests.add(test);
}
}
return selectedTests.isEmpty()?allTests:selectedTests;
}
}