Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
ohj2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aichinos
ohj2
Commits
f34a518a
Commit
f34a518a
authored
1 month ago
by
aichinos
Browse files
Options
Downloads
Patches
Plain Diff
pitääkö siirtää ja poistaa kaikki ylimääräiset kontrollit?
parent
75bc144e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mmkurssit/src/fxMMKurssit/KurssinlisaysGUIController.java
+27
-2
27 additions, 2 deletions
mmkurssit/src/fxMMKurssit/KurssinlisaysGUIController.java
mmkurssit/src/mmkurssit/Kurssi.java
+1
-1
1 addition, 1 deletion
mmkurssit/src/mmkurssit/Kurssi.java
with
28 additions
and
3 deletions
mmkurssit/src/fxMMKurssit/KurssinlisaysGUIController.java
+
27
−
2
View file @
f34a518a
package
fxMMKurssit
;
import
fi.jyu.mit.fxgui.Dialogs
;
import
fi.jyu.mit.fxgui.ModalControllerInterface
;
import
javafx.application.Platform
;
//import javafx.event.ActionEvent;
...
...
@@ -6,6 +7,9 @@ import javafx.fxml.FXML;
import
javafx.scene.control.Alert
;
import
javafx.scene.control.Button
;
import
javafx.scene.control.TextField
;
import
mmkurssit.Kurssi
;
import
mmkurssit.MMKurssit
;
import
mmkurssit.SailoException
;
import
javafx.scene.control.Alert.AlertType
;
/**
...
...
@@ -66,11 +70,32 @@ public class KurssinlisaysGUIController implements ModalControllerInterface<Stri
@FXML
void
saveCourse
()
{
Alert
alert
=
new
Alert
(
AlertType
.
INFORMATION
);
/*
Alert alert = new Alert(AlertType.INFORMATION);
alert.setTitle("Not yet");
alert.setContentText("Not ready yet.");
alert
.
showAndWait
();
alert.showAndWait();*/
uusiKurssi
();
}
//========================================================================================
/**
* Lisätään mmkurssille uusi kurssi
*/
private
void
uusiKurssi
()
{
Kurssi
uusi
=
new
Kurssi
();
uusi
.
rekisteroi
();
uusi
.
tayta1
();
//tähän pitää lukea tekstikentiltä tiedot
try
{
mmkurssit
.
lisaa
(
uusi
);
//pitääkö nämä kaikki siirtää sinne MMKurssitGUIControlleriin?
}
catch
(
SailoException
e
)
{
Dialogs
.
showInputDialog
(
"Ohjelmia uuden luomisessa"
,
e
.
getMessage
());
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
mmkurssit/src/mmkurssit/Kurssi.java
+
1
−
1
View file @
f34a518a
...
...
@@ -85,7 +85,7 @@ public class Kurssi {
* TODO: POISTA, kun kaikki toimii!!
*
*/
void
tayta1
()
{
public
void
tayta1
()
{
this
.
nimi
=
"Japani 4"
;
this
.
opeEtunimi
=
"Ken"
;
this
.
opeSukunimi
=
"Manninen"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment