Commit 8419ad94 by cam

fixed minor bugs and added company name to table

parent f47d5190
...@@ -396,6 +396,7 @@ begin ...@@ -396,6 +396,7 @@ begin
asm asm
startSpinner(); startSpinner();
end; end;
console.log(PageNumber);
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetOrders', xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetOrders',
[searchOptions])); [searchOptions]));
orderList := TJSObject(xdcResponse.Result); orderList := TJSObject(xdcResponse.Result);
...@@ -416,6 +417,7 @@ begin ...@@ -416,6 +417,7 @@ begin
console.log(XDataWebDataSet1proofDue.Value); console.log(XDataWebDataSet1proofDue.Value);
console.log(XDataWebDataSet1ID.Value);} console.log(XDataWebDataSet1ID.Value);}
AddRowToTable(tempString); AddRowToTable(tempString);
XDataWebDataSet1.Next;
end; end;
TotalPages := (callListLength + PageSize - 1) div PageSize; TotalPages := (callListLength + PageSize - 1) div PageSize;
if (PageNumber * PageSize) < callListLength then if (PageNumber * PageSize) < callListLength then
...@@ -498,7 +500,7 @@ function TFViewCalls.GenerateSearchOptions(): string; ...@@ -498,7 +500,7 @@ function TFViewCalls.GenerateSearchOptions(): string;
var var
searchOptions: string; searchOptions: string;
begin begin
PageNumber := 1; //PageNumber := 1;
PageSize := StrToInt(wcbPageSize.Text); PageSize := StrToInt(wcbPageSize.Text);
OrderBy := wcbSortBy.Text; OrderBy := wcbSortBy.Text;
searchOptions := '&pagenumber=' + IntToStr(PageNumber) + searchOptions := '&pagenumber=' + IntToStr(PageNumber) +
......
...@@ -226,7 +226,7 @@ begin ...@@ -226,7 +226,7 @@ begin
offset := IntToStr((PageNum - 1) * PageSize); offset := IntToStr((PageNum - 1) * PageSize);
limit := IntToStr(PageSize); limit := IntToStr(PageSize);
SQL := 'select * from web_plate_orders ' + 'limit ' + limit + ' offset ' + offset; SQL := 'select * from web_plate_orders inner join customers on web_plate_orders.COMPANY_ID = customers.CUSTOMER_ID ' + 'limit ' + limit + ' offset ' + offset;
doQuery(callsDB.UniQuery1, SQL); doQuery(callsDB.UniQuery1, SQL);
...@@ -240,7 +240,7 @@ begin ...@@ -240,7 +240,7 @@ begin
TXDataOperationContext.Current.Handler.ManagedObjects.Add( Order ); TXDataOperationContext.Current.Handler.ManagedObjects.Add( Order );
Result.data.Add( Order ); Result.data.Add( Order );
order.ID := callsDB.UniQuery1.FieldByName('ORDER_ID').AsInteger; order.ID := callsDB.UniQuery1.FieldByName('ORDER_ID').AsInteger;
order.companyName := '???'; order.companyName := callsDB.UniQuery1.FieldByName('NAME').AsString;
order.jobName := callsDB.UniQuery1.FieldByName('staff_fields_job_name').AsString; order.jobName := callsDB.UniQuery1.FieldByName('staff_fields_job_name').AsString;
order.orderDate := callsDB.UniQuery1.FieldByName('ORDER_DATE').AsString; order.orderDate := callsDB.UniQuery1.FieldByName('ORDER_DATE').AsString;
order.proofDue := callsDB.UniQuery1.FieldByName('staff_fields_proof_date').AsString; order.proofDue := callsDB.UniQuery1.FieldByName('staff_fields_proof_date').AsString;
......
[Options] [Options]
LogFileNum=46 LogFileNum=51
UpdateTimerLength=0 UpdateTimerLength=0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment