Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
KGOrders
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cam Hayes
KGOrders
Commits
1285e060
Commit
1285e060
authored
Jan 16, 2025
by
cam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forgot two files in the previous commit
parent
8c0bceeb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
22 deletions
+31
-22
Lookup.ServiceImpl.pas
kgOrdersServer/Source/Lookup.ServiceImpl.pas
+30
-21
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+1
-1
No files found.
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
1285e060
...
@@ -1011,6 +1011,7 @@ var
...
@@ -1011,6 +1011,7 @@ var
UserID
:
string
;
UserID
:
string
;
SQL
:
string
;
SQL
:
string
;
begin
begin
logger
.
Log
(
1
,
'Set Status Hit'
);
params
:=
TStringList
.
Create
;
params
:=
TStringList
.
Create
;
// parse the statusOptions
// parse the statusOptions
params
.
Delimiter
:=
'&'
;
params
.
Delimiter
:=
'&'
;
...
@@ -1023,31 +1024,39 @@ begin
...
@@ -1023,31 +1024,39 @@ begin
SQL
:=
'select * from orders_status where ORDER_ID = '
+
OrderID
+
' AND '
+
SQL
:=
'select * from orders_status where ORDER_ID = '
+
OrderID
+
' AND '
+
'ORDER_STATUS = '
+
quotedStr
(
Status
);
'ORDER_STATUS = '
+
quotedStr
(
Status
);
try
logger
.
Log
(
1
,
'Trying to Set Status'
);
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
if
ordersDB
.
UniQuery1
.
IsEmpty
then
// Add Status
begin
ordersDB
.
UniQuery1
.
Insert
;
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_ID'
).
AsString
:=
OrderID
;
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_STATUS'
).
AsString
:=
Status
;
ordersDB
.
UniQuery1
.
FieldByName
(
'STATUS_DATE'
).
AsDateTime
:=
StrToDateTime
(
Date
);
ordersDB
.
UniQuery1
.
FieldByName
(
'STATUS_TIMESTAMP'
).
AsDateTime
:=
Now
;
ordersDB
.
UniQuery1
.
FieldByName
(
'USER_ID'
).
AsString
:=
UserID
;
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_REVISION'
).
AsInteger
:=
1
;
end
else
// Edit Status
begin
ordersDB
.
UniQuery1
.
Edit
;
ordersDB
.
UniQuery1
.
FieldByName
(
'STATUS_DATE'
).
AsDateTime
:=
StrToDateTime
(
Date
);
ordersDB
.
UniQuery1
.
FieldByName
(
'STATUS_TIMESTAMP'
).
AsDateTime
:=
Now
;
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_REVISION'
).
AsInteger
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_REVISION'
).
AsInteger
+
1
;
end
;
if
ordersDB
.
UniQuery1
.
IsEmpty
then
ordersDB
.
UniQuery1
.
Post
;
// Add Status
logger
.
Log
(
1
,
'Status Successfully set'
);
begin
result
:=
'success'
;
ordersDB
.
UniQuery1
.
Insert
;
except
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_ID'
).
AsString
:=
OrderID
;
on
E
:
Exception
do
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_STATUS'
).
AsString
:=
Status
;
// This block will catch any exception derived from the Exception class
ordersDB
.
UniQuery1
.
FieldByName
(
'STATUS_DATE'
).
AsDateTime
:=
StrToDateTime
(
Date
);
logger
.
Log
(
5
,
'An error occurred when setting status: '
+
E
.
Message
);
ordersDB
.
UniQuery1
.
FieldByName
(
'STATUS_TIMESTAMP'
).
AsDateTime
:=
Now
;
ordersDB
.
UniQuery1
.
FieldByName
(
'USER_ID'
).
AsString
:=
UserID
;
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_REVISION'
).
AsInteger
:=
1
;
end
else
// Edit Status
begin
ordersDB
.
UniQuery1
.
Edit
;
ordersDB
.
UniQuery1
.
FieldByName
(
'STATUS_DATE'
).
AsDateTime
:=
StrToDateTime
(
Date
);
ordersDB
.
UniQuery1
.
FieldByName
(
'STATUS_TIMESTAMP'
).
AsDateTime
:=
Now
;
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_REVISION'
).
AsInteger
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_REVISION'
).
AsInteger
+
1
;
end
;
end
;
ordersDB
.
UniQuery1
.
Post
;
result
:=
'success'
;
end
;
end
;
function
TLookupService
.
AddUser
(
userInfo
:
string
):
string
;
function
TLookupService
.
AddUser
(
userInfo
:
string
):
string
;
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
1285e060
[Settings]
[Settings]
MemoLogLevel
=
4
MemoLogLevel
=
4
FileLogLevel
=
5
FileLogLevel
=
5
LogFileNum
=
11
0
LogFileNum
=
11
1
webClientVersion
=
1.0.0
webClientVersion
=
1.0.0
[Database]
[Database]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment