Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
controlpanel
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
Container 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
BIAS
controlpanel
Commits
7addc12b
Commit
7addc12b
authored
9 months ago
by
Valerio Pastore
Browse files
Options
Downloads
Patches
Plain Diff
fix set daq id
parent
442c4ae2
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
src/main/java/inaf/oas/controlpanel/MainFrame.java
+4
-0
4 additions, 0 deletions
src/main/java/inaf/oas/controlpanel/MainFrame.java
src/main/java/inaf/oas/controlpanel/db.java
+13
-0
13 additions, 0 deletions
src/main/java/inaf/oas/controlpanel/db.java
with
17 additions
and
0 deletions
src/main/java/inaf/oas/controlpanel/MainFrame.java
+
4
−
0
View file @
7addc12b
...
...
@@ -947,6 +947,10 @@ public class MainFrame extends javax.swing.JFrame {
}
//GEN-LAST:event_val_dateActionPerformed
private
void
b_set_daqidActionPerformed
(
java
.
awt
.
event
.
ActionEvent
evt
)
{
//GEN-FIRST:event_b_set_daqidActionPerformed
String
daq_id
=
val_daq_id
.
getText
();
myDB
.
SetActiveDataInt
(
"astridaq_config"
,
"daq_id"
,
Integer
.
parseInt
(
daq_id
));
val_daq_id
.
setText
(
""
);
// TODO add your handling code here:
}
//GEN-LAST:event_b_set_daqidActionPerformed
...
...
This diff is collapsed.
Click to expand it.
src/main/java/inaf/oas/controlpanel/db.java
+
13
−
0
View file @
7addc12b
...
...
@@ -345,6 +345,19 @@ public class db {
}
void
SetActiveDataInt
(
String
table
,
String
column
,
int
val
)
{
try
{
Statement
statement
=
this
.
db
.
createStatement
();
statement
.
executeUpdate
(
"UPDATE "
+
table
+
" SET "
+
column
+
" = '"
+
val
+
"' WHERE active = 1"
);
if
(
statement
!=
null
)
statement
.
close
();
}
catch
(
SQLException
e
)
{
System
.
err
.
println
(
"[Error in SET ACTIVE DATA]"
);
System
.
err
.
println
(
e
.
getMessage
());
}
}
String
getData
(
String
table
,
String
column
)
{
String
current_run_id
=
""
;
...
...
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