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
c515903d
Commit
c515903d
authored
Nov 26, 2024
by
cam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Began working on popup menu to add
parent
ab01a898
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
82 additions
and
42 deletions
+82
-42
View.OrderList.dfm
kgOrdersClient/View.OrderList.dfm
+56
-5
View.OrderList.pas
kgOrdersClient/View.OrderList.pas
+17
-34
Lookup.Service.pas
kgOrdersServer/Source/Lookup.Service.pas
+2
-0
Lookup.ServiceImpl.pas
kgOrdersServer/Source/Lookup.ServiceImpl.pas
+6
-2
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+1
-1
No files found.
kgOrdersClient/View.OrderList.dfm
View file @
c515903d
...
@@ -48,8 +48,8 @@ object FOrderList: TFOrderList
...
@@ -48,8 +48,8 @@ object FOrderList: TFOrderList
WidthPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
end
object pnlMessage: TWebPanel
object pnlMessage: TWebPanel
Left = 2
20
Left = 2
4
Top =
429
Top =
57
Width = 121
Width = 121
Height = 33
Height = 33
ElementClassName = 'card'
ElementClassName = 'card'
...
@@ -91,8 +91,8 @@ object FOrderList: TFOrderList
...
@@ -91,8 +91,8 @@ object FOrderList: TFOrderList
end
end
end
end
object WebDBTableControl: TWebDBTableControl
object WebDBTableControl: TWebDBTableControl
Left = 1
60
Left = 1
72
Top =
131
Top =
287
Width = 530
Width = 530
Height = 265
Height = 265
ElementClassName = 'table-responsive'
ElementClassName = 'table-responsive'
...
@@ -102,7 +102,6 @@ object FOrderList: TFOrderList
...
@@ -102,7 +102,6 @@ object FOrderList: TFOrderList
ColHeader = False
ColHeader = False
ElementTableClassName = 'table table-striped table-bordered table-hover dataTable'
ElementTableClassName = 'table table-striped table-bordered table-hover dataTable'
Options.ResizeColumns = True
Options.ResizeColumns = True
OnGetCellChildren = WebDBTableControlGetCellChildren
Columns = <
Columns = <
item
item
DataField = 'ID'
DataField = 'ID'
...
@@ -124,6 +123,58 @@ object FOrderList: TFOrderList
...
@@ -124,6 +123,58 @@ object FOrderList: TFOrderList
end>
end>
DataSource = wdsCustomers
DataSource = wdsCustomers
end
end
object cbCorrugatedPlate: TWebCheckBox
Left = 172
Top = 210
Width = 113
Height = 22
Caption = 'Corrugated Plate'
Checked = True
ChildOrder = 5
HeightPercent = 100.000000000000000000
State = cbChecked
WidthPercent = 100.000000000000000000
OnClick = cbCorrugatedPlateClick
end
object cbWebPlate: TWebCheckBox
Left = 304
Top = 210
Width = 113
Height = 22
Caption = 'Web Plate'
ChildOrder = 5
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = cbWebPlateClick
end
object edtCompanyName: TWebEdit
Left = 302
Top = 252
Width = 121
Height = 22
ChildOrder = 7
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object edtID: TWebEdit
Left = 172
Top = 252
Width = 121
Height = 22
ChildOrder = 8
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btnConfirm: TWebButton
Left = 564
Top = 251
Width = 96
Height = 25
Caption = 'Confirm'
ChildOrder = 9
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object XDataWebClient1: TXDataWebClient
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Connection = DMConnection.ApiConnection
Left = 88
Left = 88
...
...
kgOrdersClient/View.OrderList.pas
View file @
c515903d
...
@@ -26,10 +26,17 @@ type
...
@@ -26,10 +26,17 @@ type
xdwdsCustomersSHORT_NAME
:
TStringField
;
xdwdsCustomersSHORT_NAME
:
TStringField
;
xdwdsCustomersADDRESS
:
TStringField
;
xdwdsCustomersADDRESS
:
TStringField
;
WebDBTableControl
:
TWebDBTableControl
;
WebDBTableControl
:
TWebDBTableControl
;
cbCorrugatedPlate
:
TWebCheckBox
;
cbWebPlate
:
TWebCheckBox
;
edtCompanyName
:
TWebEdit
;
edtID
:
TWebEdit
;
btnConfirm
:
TWebButton
;
procedure
WebFormShow
(
Sender
:
TObject
);
procedure
WebFormShow
(
Sender
:
TObject
);
procedure
WebDBTableControlGetCellChildren
(
Sender
:
TObject
;
ACol
,
procedure
WebDBTableControlGetCellChildren
(
Sender
:
TObject
;
ACol
,
ARow
:
Integer
;
AField
:
TField
;
AValue
:
string
;
ARow
:
Integer
;
AField
:
TField
;
AValue
:
string
;
AElement
:
TJSHTMLElementRecord
);
AElement
:
TJSHTMLElementRecord
);
procedure
cbCorrugatedPlateClick
(
Sender
:
TObject
);
procedure
cbWebPlateClick
(
Sender
:
TObject
);
private
private
//FJSONProc: TJSONProc;
//FJSONProc: TJSONProc;
procedure
AddRowToTable
();
procedure
AddRowToTable
();
...
@@ -73,6 +80,16 @@ begin
...
@@ -73,6 +80,16 @@ begin
getCustomers
();
getCustomers
();
end
;
end
;
procedure
TFOrderList
.
cbCorrugatedPlateClick
(
Sender
:
TObject
);
begin
cbWebPlate
.
Checked
:=
false
;
end
;
procedure
TFOrderList
.
cbWebPlateClick
(
Sender
:
TObject
);
begin
cbCorrugatedPlate
.
Checked
:=
false
;
end
;
procedure
TFOrderList
.
ClearTable
();
procedure
TFOrderList
.
ClearTable
();
// clears the table
// clears the table
var
var
...
@@ -96,43 +113,9 @@ begin
...
@@ -96,43 +113,9 @@ begin
customerList
:=
TJSObject
(
xdcResponse
.
Result
);
customerList
:=
TJSObject
(
xdcResponse
.
Result
);
data
:=
TJSArray
(
customerList
[
'data'
]);
data
:=
TJSArray
(
customerList
[
'data'
]);
count
:=
integer
(
customerList
[
'count'
]);
count
:=
integer
(
customerList
[
'count'
]);
// ClearTable();
//customerGrid.col
xdwdsCustomers
.
Close
;
xdwdsCustomers
.
Close
;
xdwdsCustomers
.
SetJsonData
(
customerList
[
'data'
]);
xdwdsCustomers
.
SetJsonData
(
customerList
[
'data'
]);
xdwdsCustomers
.
Open
;
xdwdsCustomers
.
Open
;
console
.
log
(
xdwdsCustomersID
);
{for i := 0 to data.Length - 1 do
begin
customer := TJSObject(data[i]);
//AddRowToTable();
xdwdsCustomers.Next;
end;}
{TotalPages := (callListLength + PageSize - 1) div PageSize;
if callListLength = 0 then
begin
lblEntries.Caption := 'No entries found';
lblEntries2.Caption := 'No entries found';
end
else if (PageNumber * PageSize) < callListLength then
begin
lblEntries.Caption := 'Showing entries ' + IntToStr((PageNumber - 1) * PageSize + 1) +
' - ' + IntToStr(PageNumber * PageSize) +
' of ' + IntToStr(callListLength);
lblEntries2.Caption := 'Showing entries ' + IntToStr((PageNumber - 1) * PageSize + 1) +
' - ' + IntToStr(PageNumber * PageSize) +
' of ' + IntToStr(callListLength);
end
else if (PageNumber * PageSize) >= callListLength then
begin
lblEntries.Caption := 'Showing entries ' + IntToStr((PageNumber - 1) * PageSize + 1) +
' - ' + IntToStr(callListLength) +
' of ' + IntToStr(callListLength);
lblEntries2.Caption := 'Showing entries ' + IntToStr((PageNumber - 1) * PageSize + 1) +
' - ' + IntToStr(callListLength) +
' of ' + IntToStr(callListLength);
end;
//GeneratePagination(TotalPages);}
end
;
end
;
procedure
TFOrderList
.
AddRowToTable
();
procedure
TFOrderList
.
AddRowToTable
();
...
...
kgOrdersServer/Source/Lookup.Service.pas
View file @
c515903d
...
@@ -88,6 +88,8 @@ type
...
@@ -88,6 +88,8 @@ type
Public
Public
NAME
:
string
;
NAME
:
string
;
ID
:
integer
;
ID
:
integer
;
SHORT_NAME
:
string
;
ADDRESS
:
string
;
end
;
end
;
TCustomerList
=
class
TCustomerList
=
class
...
...
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
c515903d
...
@@ -62,10 +62,10 @@ end;
...
@@ -62,10 +62,10 @@ end;
function
TLookupService
.
GetCustomers
:
TCustomerList
;
function
TLookupService
.
GetCustomers
:
TCustomerList
;
var
var
SQL
:
string
;
SQL
,
ADDRESS
:
string
;
customer
:
TCustomerItem
;
customer
:
TCustomerItem
;
begin
begin
SQL
:=
'select NAME, CUSTOMER_ID from customers'
;
SQL
:=
'select NAME, CUSTOMER_ID
, SHORT_NAME, BILL_ADDRESS, BILL_CITY, BILL_STATE, BILL_ZIP
from customers'
;
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
result
:=
TCustomerList
.
Create
;
result
:=
TCustomerList
.
Create
;
...
@@ -79,6 +79,10 @@ begin
...
@@ -79,6 +79,10 @@ begin
TXDataOperationContext
.
Current
.
Handler
.
ManagedObjects
.
Add
(
customer
);
TXDataOperationContext
.
Current
.
Handler
.
ManagedObjects
.
Add
(
customer
);
customer
.
NAME
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'NAME'
).
AsString
;
customer
.
NAME
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'NAME'
).
AsString
;
customer
.
ID
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'CUSTOMER_ID'
).
AsInteger
;
customer
.
ID
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'CUSTOMER_ID'
).
AsInteger
;
customer
.
SHORT_NAME
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'SHORT_NAME'
).
AsString
;
customer
.
ADDRESs
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'BILL_ADDRESS'
).
AsString
+
', '
+
ordersDB
.
UniQuery1
.
FieldByName
(
'BILL_CITY'
).
AsString
+
' '
+
ordersDB
.
UniQuery1
.
FieldByName
(
'BILL_ZIP'
).
AsString
;
result
.
data
.
Add
(
customer
);
result
.
data
.
Add
(
customer
);
result
.
count
:=
result
.
count
+
1
;
result
.
count
:=
result
.
count
+
1
;
ordersDB
.
UniQuery1
.
Next
;
ordersDB
.
UniQuery1
.
Next
;
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
c515903d
[Options]
[Options]
LogFileNum
=
22
1
LogFileNum
=
22
3
UpdateTimerLength
=
0
UpdateTimerLength
=
0
...
...
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