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
6d65b61f
Commit
6d65b61f
authored
Aug 12, 2024
by
cam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
realized most of my changes werent properly saved.
parent
8c76b8c5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
4 deletions
+44
-4
View.EditUser.pas
kgOrdersClient/View.EditUser.pas
+1
-1
View.Main.dfm
kgOrdersClient/View.Main.dfm
+2
-2
Lookup.Service.pas
kgOrdersServer/Source/Lookup.Service.pas
+1
-0
Lookup.ServiceImpl.pas
kgOrdersServer/Source/Lookup.ServiceImpl.pas
+40
-1
No files found.
kgOrdersClient/View.EditUser.pas
View file @
6d65b61f
...
@@ -113,7 +113,7 @@ var
...
@@ -113,7 +113,7 @@ var
xdcResponse
:
TXDataClientResponse
;
xdcResponse
:
TXDataClientResponse
;
responseString
:
TJSObject
;
responseString
:
TJSObject
;
begin
begin
userInfo
:=
'&username='
+
Username
+
userInfo
:=
'&username='
+
edtUsername
.
Text
+
'&fullname='
+
edtFullName
.
Text
+
'&fullname='
+
edtFullName
.
Text
+
'&password='
+
edtPassword
.
Text
+
'&password='
+
edtPassword
.
Text
+
'&status='
+
BoolToStr
(
cbStatus
.
Checked
)
+
'&status='
+
BoolToStr
(
cbStatus
.
Checked
)
+
...
...
kgOrdersClient/View.Main.dfm
View file @
6d65b61f
...
@@ -62,14 +62,14 @@ object FViewMain: TFViewMain
...
@@ -62,14 +62,14 @@ object FViewMain: TFViewMain
object lblCallsList: TWebLinkLabel
object lblCallsList: TWebLinkLabel
Left = 564
Left = 564
Top = 56
Top = 56
Width = 2
5
Width = 2
9
Height = 15
Height = 15
ElementID = 'dropdown.menu.callslist'
ElementID = 'dropdown.menu.callslist'
ElementFont = efCSS
ElementFont = efCSS
HeightPercent = 100.000000000000000000
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = lblCallsListClick
OnClick = lblCallsListClick
Caption = '
Call
s'
Caption = '
Item
s'
end
end
object lblUsers: TWebLinkLabel
object lblUsers: TWebLinkLabel
Left = 561
Left = 561
...
...
kgOrdersServer/Source/Lookup.Service.pas
View file @
6d65b61f
...
@@ -93,6 +93,7 @@ type
...
@@ -93,6 +93,7 @@ type
[
HttpGet
]
function
GetUsers
(
searchOptions
:
string
):
TUserList
;
[
HttpGet
]
function
GetUsers
(
searchOptions
:
string
):
TUserList
;
[
HttpGet
]
function
GetItems
(
searchOptions
:
string
):
TItemList
;
[
HttpGet
]
function
GetItems
(
searchOptions
:
string
):
TItemList
;
function
AddUser
(
userInfo
:
string
):
string
;
function
AddUser
(
userInfo
:
string
):
string
;
function
AddItem
(
itemInfo
:
string
):
string
;
function
DelUser
(
username
:
string
):
string
;
function
DelUser
(
username
:
string
):
string
;
function
EditUser
(
const
editOptions
:
string
):
string
;
function
EditUser
(
const
editOptions
:
string
):
string
;
end
;
end
;
...
...
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
6d65b61f
...
@@ -27,6 +27,7 @@ type
...
@@ -27,6 +27,7 @@ type
function
EditUser
(
const
editOptions
:
string
):
string
;
function
EditUser
(
const
editOptions
:
string
):
string
;
function
Search
(
phoneNum
:
string
):
TCallList
;
function
Search
(
phoneNum
:
string
):
TCallList
;
function
AddUser
(
userInfo
:
string
):
string
;
function
AddUser
(
userInfo
:
string
):
string
;
function
AddItem
(
itemInfo
:
string
):
string
;
function
DelUser
(
username
:
string
):
string
;
function
DelUser
(
username
:
string
):
string
;
procedure
AfterConstruction
;
override
;
procedure
AfterConstruction
;
override
;
procedure
BeforeDestruction
;
override
;
procedure
BeforeDestruction
;
override
;
...
@@ -447,10 +448,48 @@ begin
...
@@ -447,10 +448,48 @@ begin
Result
:=
'Failure:Username already taken'
;
Result
:=
'Failure:Username already taken'
;
end
;
end
;
function
TLookupService
.
DelUser
(
username
:
string
):
string
;
function
TLookupService
.
AddItem
(
itemInfo
:
string
):
string
;
var
var
params
:
TStringList
;
Name
:
string
;
Description
:
string
;
Status
:
boolean
;
SQL
:
string
;
SQL
:
string
;
begin
params
:=
TStringList
.
Create
;
params
.
StrictDelimiter
:=
true
;
// parse the searchOptions
params
.
Delimiter
:=
'&'
;
params
.
DelimitedText
:=
itemInfo
;
Name
:=
params
.
Values
[
'name'
];
Description
:=
params
.
Values
[
'description'
];
Status
:=
StrToBool
(
params
.
Values
[
'status'
]);
SQL
:=
'select * from qb_items where qb_item_name = '
+
QuotedStr
(
Name
);
doQuery
(
callsDB
.
UniQuery1
,
SQL
);
if
callsDB
.
UniQuery1
.
IsEmpty
then
begin
callsDB
.
UniQuery1
.
FieldByName
(
'qb_item_name'
).
AsString
:=
Name
;
callsDB
.
UniQuery1
.
FieldByName
(
'item_desc'
).
AsString
:=
Description
;
if
Status
then
callsDB
.
UniQuery1
.
FieldByName
(
'status'
).
AsString
:=
'ACTIVE'
else
callsDB
.
UniQuery1
.
FieldByName
(
'status'
).
AsString
:=
'INACTIVE'
;
callsDB
.
UniQuery1
.
Post
;
Result
:=
'Success:Item successfully added'
;
end
else
Result
:=
'Failure: Item already exists'
;
end
;
function
TLookupService
.
DelUser
(
username
:
string
):
string
;
var
SQL
:
string
;
params
:
TStringList
;
begin
begin
SQL
:=
'select * from users where username = '
+
QuotedStr
(
username
.
toLower
);
SQL
:=
'select * from users where username = '
+
QuotedStr
(
username
.
toLower
);
callsDB
.
UniQuery1
.
Close
;
callsDB
.
UniQuery1
.
Close
;
...
...
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