Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cs427fa20team22
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
htmoss2
cs427fa20team22
Commits
fbb68636
Commit
fbb68636
authored
4 years ago
by
mjw11
Browse files
Options
Downloads
Patches
Plain Diff
Change casing on DAO to match table casing
parent
ae0270e2
No related branches found
No related tags found
1 merge request
!22
Merge UC92 into Master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iTrust/src/edu/ncsu/csc/itrust/dao/mysql/PatientDAO.java
+4
-4
4 additions, 4 deletions
iTrust/src/edu/ncsu/csc/itrust/dao/mysql/PatientDAO.java
with
4 additions
and
4 deletions
iTrust/src/edu/ncsu/csc/itrust/dao/mysql/PatientDAO.java
+
4
−
4
View file @
fbb68636
...
@@ -73,12 +73,12 @@ public class PatientDAO {
...
@@ -73,12 +73,12 @@ public class PatientDAO {
PreparedStatement
ps
=
null
;
PreparedStatement
ps
=
null
;
try
{
try
{
conn
=
factory
.
getConnection
();
conn
=
factory
.
getConnection
();
ps
=
conn
.
prepareStatement
(
"SELECT
r
egistered FROM patients WHERE MID=?"
);
ps
=
conn
.
prepareStatement
(
"SELECT
R
egistered FROM patients WHERE MID=?"
);
ps
.
setLong
(
1
,
mid
);
ps
.
setLong
(
1
,
mid
);
ResultSet
rs
;
ResultSet
rs
;
rs
=
ps
.
executeQuery
();
rs
=
ps
.
executeQuery
();
if
(
rs
.
next
())
{
if
(
rs
.
next
())
{
Integer
b
=
rs
.
getObject
(
"
r
egistered"
)
!=
null
?
rs
.
getInt
(
"
r
egistered"
)
:
null
;
Integer
b
=
rs
.
getObject
(
"
R
egistered"
)
!=
null
?
rs
.
getInt
(
"
R
egistered"
)
:
null
;
if
(
b
==
1
)
{
if
(
b
==
1
)
{
return
true
;
return
true
;
}
else
if
(
b
==
0
)
{
}
else
if
(
b
==
0
)
{
...
@@ -111,7 +111,7 @@ public class PatientDAO {
...
@@ -111,7 +111,7 @@ public class PatientDAO {
PreparedStatement
ps
=
null
;
PreparedStatement
ps
=
null
;
try
{
try
{
conn
=
factory
.
getConnection
();
conn
=
factory
.
getConnection
();
ps
=
conn
.
prepareStatement
(
"UPDATE
PATIENTS
SET
r
egistered = ? WHERE mid = ?"
);
ps
=
conn
.
prepareStatement
(
"UPDATE
patients
SET
R
egistered = ? WHERE mid = ?"
);
ps
.
setByte
(
1
,
1
);
ps
.
setByte
(
1
,
1
);
ps
.
setLong
(
2
,
mid
);
ps
.
setLong
(
2
,
mid
);
ps
.
executeUpdate
();
ps
.
executeUpdate
();
...
@@ -139,7 +139,7 @@ public class PatientDAO {
...
@@ -139,7 +139,7 @@ public class PatientDAO {
PreparedStatement
ps
=
null
;
PreparedStatement
ps
=
null
;
try
{
try
{
conn
=
factory
.
getConnection
();
conn
=
factory
.
getConnection
();
ps
=
conn
.
prepareStatement
(
"UPDATE
PATIENTS
SET DateofDeactivation = ?,
r
egistered = ? WHERE mid = ?"
);
ps
=
conn
.
prepareStatement
(
"UPDATE
patients
SET DateofDeactivation = ?,
R
egistered = ? WHERE mid = ?"
);
Date
date
=
new
Date
(
Calendar
.
getInstance
().
getTime
().
getTime
());
Date
date
=
new
Date
(
Calendar
.
getInstance
().
getTime
().
getTime
());
ps
.
setDate
(
1
,
date
);
ps
.
setDate
(
1
,
date
);
ps
.
setByte
(
2
,
0
);
ps
.
setByte
(
2
,
0
);
...
...
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