Commit 951448d9 by Elias Sarraf

Merge branch 'cam2'

parents d2ea84ea afced290
......@@ -43,6 +43,8 @@ type
{ Private declarations }
public
{ Public declarations }
var
confirm: boolean;
end;
var
......@@ -60,11 +62,13 @@ end;
procedure TFAddOrder.btnConfirmClick(Sender: TObject);
begin
confirm := true;
Close;
end;
procedure TFAddOrder.WebFormShow(Sender: TObject);
begin
confirm := false;
getCustomers();
end;
......
object FViewOrders: TFViewOrders
Width = 676
Height = 480
Caption = 'edtorderid'
CSSLibrary = cssBootstrap
ElementFont = efCSS
Font.Charset = DEFAULT_CHARSET
......@@ -9,6 +10,7 @@ object FViewOrders: TFViewOrders
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
Visible = True
OnCreate = WebFormCreate
OnShow = WebFormShow
object lblEntries: TWebLabel
......@@ -23,63 +25,16 @@ object FViewOrders: TFViewOrders
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object wcbSortBy: TWebComboBox
Left = 368
Top = 16
Width = 145
Height = 21
ElementID = 'wcbsortby'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
TabOrder = 4
TabStop = False
Text = 'PROOF DONE'
WidthPercent = 100.000000000000000000
ItemIndex = -1
Items.Strings = (
'PROOF DUE'
'PROOF DONE'
'ART DUE'
'ART DONE'
'PLATE DUE'
'PLATE DONE'
'MOUNT DUE'
'MOUNT DONE'
'SHIP DUE'
'SHIP DONE')
end
object btnApply: TWebButton
Left = 542
Top = 16
Width = 96
Height = 25
Caption = 'Apply'
ChildOrder = 7
ElementID = 'btnapply'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
TabOrder = 5
TabStop = False
WidthPercent = 100.000000000000000000
OnClick = btnApplyClick
end
object edtSearch: TWebEdit
Left = 35
Top = 16
Width = 121
Height = 22
HelpType = htKeyword
TabStop = False
ChildOrder = 8
ElementClassName = 'form-control'
ElementID = 'edtsearch'
object lblSearch: TWebLabel
Left = 594
Top = 116
Width = 47
Height = 13
Caption = 'Search = '
ElementID = 'lblsearch'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
HideSelection = False
TabOrder = 1
WidthPercent = 100.000000000000000000
end
object btnAddOrder: TWebButton
......@@ -98,12 +53,12 @@ object FViewOrders: TFViewOrders
WidthPercent = 100.000000000000000000
OnClick = btnAddOrderClick
end
object btnFilters: TWebButton
object btnSearch: TWebButton
Left = 462
Top = 79
Width = 96
Height = 25
Caption = 'Show Filters'
Caption = 'Search'
ChildOrder = 6
ElementID = 'btnfilters'
ElementFont = efCSS
......@@ -112,41 +67,7 @@ object FViewOrders: TFViewOrders
TabOrder = 9
TabStop = False
WidthPercent = 100.000000000000000000
OnClick = btnFiltersClick
end
object dtpStartDate: TWebDateTimePicker
Left = 168
Top = 16
Width = 85
Height = 22
ElementID = 'dtpstartdate'
HeightStyle = ssAuto
BorderStyle = bsSingle
ChildOrder = 7
Color = clWhite
Date = 45553.505972858790000000
ElementFont = efCSS
Role = ''
TabOrder = 2
TabStop = False
Text = ''
end
object dtpEndDate: TWebDateTimePicker
Left = 266
Top = 16
Width = 87
Height = 22
ElementID = 'dtpenddate'
HeightStyle = ssAuto
BorderStyle = bsSingle
ChildOrder = 7
Color = clWhite
Date = 45553.505972858790000000
ElementFont = efCSS
Role = ''
TabOrder = 3
TabStop = False
Text = ''
OnClick = btnSearchClick
end
object pnlMessage: TWebPanel
Left = 82
......@@ -160,7 +81,7 @@ object FViewOrders: TFViewOrders
ElementFont = efCSS
ElementPosition = epRelative
Role = 'alert'
TabOrder = 7
TabOrder = 2
object lblMessage: TWebLabel
Left = 32
Top = 11
......@@ -269,6 +190,11 @@ object FViewOrders: TFViewOrders
Title = 'Job Name'
end
item
DataField = 'orderType'
Title = 'Order Type'
end
item
ElementClassName = 'text-nowrap'
DataField = 'orderDate'
Title = 'Order Date'
end
......@@ -289,6 +215,14 @@ object FViewOrders: TFViewOrders
Title = 'Art Done'
end
item
DataField = 'plateDue'
Title = 'Plate Due'
end
item
DataField = 'plateDone'
Title = 'Plate Done'
end
item
DataField = 'mountDue'
Title = 'Mount Due'
end
......@@ -310,25 +244,103 @@ object FViewOrders: TFViewOrders
end
item
DataField = 'qbRefNum'
Title = 'Quickbooks Reference Number'
Title = 'QB Ref Num'
end
item
DataField = 'colors'
Title = 'Colors'
end>
DataSource = wdsOrders
end
object wcbPageSize: TWebComboBox
Left = 22
Top = 52
Width = 145
Height = 21
ElementClassName = 'custom-select'
ElementID = 'wcbpagesize'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
Text = '500'
WidthPercent = 100.000000000000000000
OnChange = wcbPageSizeChange
ItemIndex = -1
Items.Strings = (
'100'
'250'
'500'
'1000')
end
object wlcbOrderBy: TWebLookupComboBox
Left = 188
Top = 52
Width = 145
Height = 22
ElementClassName = 'custom-select'
ElementID = 'wlcborderby'
ElementFont = efCSS
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnChange = wlcbOrderByChange
ItemIndex = -1
LookupValues = <
item
Value = 'o.ORDER_ID DESC'
DisplayText = 'ID'
end
item
DataField = 'plateDue'
Title = 'Plate Due'
Value = 'c.NAME ASC'
DisplayText = 'Company Name'
end
item
DataField = 'plateDone'
Title = 'Plate Done'
Value = 'o.JOB_NAME ASC'
DisplayText = 'Job Name'
end
item
DataField = 'orderType'
Title = 'Order Type'
Value = 'o.ORDER_DATE DESC'
DisplayText = 'Order Date'
end
item
Value = 'PROOF_DUE DESC'
DisplayText = 'Proof Due'
end
item
Value = 'PROOF_DONE DESC'
DisplayText = 'Proof Done'
end
item
Value = 'ART_DUE DESC'
DisplayText = 'Art Due'
end
item
Value = 'ART_DONE DESC'
DisplayText = 'Art Done'
end
item
Value = 'PLATE_DUE DESC'
DisplayText = 'Plate Due'
end
item
Value = 'PLATE_DONE DESC'
DisplayText = 'Plate Done'
end
item
Value = 'MOUNT_DUE DESC'
DisplayText = 'Mount Due'
end
item
Value = 'MOUNT_DONE DESC'
DisplayText = 'Mount Done'
end
item
Value = 'SHIP_DUE DESC'
DisplayText = 'Ship Due'
end
item
Value = 'SHIP_DONE DESC'
DisplayText = 'Ship Done'
end>
DataSource = wdsOrders
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
......@@ -348,6 +360,9 @@ object FViewOrders: TFViewOrders
object xdwdsOrdersjobName: TStringField
FieldName = 'jobName'
end
object xdwdsOrdersorderType: TStringField
FieldName = 'orderType'
end
object xdwdsOrdersorderDate: TStringField
FieldName = 'orderDate'
end
......@@ -363,6 +378,12 @@ object FViewOrders: TFViewOrders
object xdwdsOrdersartDone: TStringField
FieldName = 'artDone'
end
object xdwdsOrdersplateDue: TStringField
FieldName = 'plateDue'
end
object xdwdsOrdersplateDone: TStringField
FieldName = 'plateDone'
end
object xdwdsOrdersmountDue: TStringField
FieldName = 'mountDue'
end
......@@ -384,15 +405,6 @@ object FViewOrders: TFViewOrders
object xdwdsOrderscolors: TStringField
FieldName = 'colors'
end
object xdwdsOrdersplateDue: TStringField
FieldName = 'plateDue'
end
object xdwdsOrdersplateDone: TStringField
FieldName = 'plateDone'
end
object xdwdsOrdersorderType: TStringField
FieldName = 'orderType'
end
end
object wdsOrders: TWebDataSource
DataSet = xdwdsOrders
......
<div class="container h-100 d-flex flex-column mt-0" style="max-width: 95%;">
<div class="container h-100 d-flex flex-column mt-0" style="max-width: 100%; padding-bottom: 0;">
<!-- Alert Section -->
<div class="row">
<div class="col-sm">
......@@ -9,62 +9,45 @@
</div>
</div>
<!-- Filters Section -->
<div class="container mb-3">
<!-- Filters Row (Hidden Initially) -->
<div id="filter_info" style="display: none;">
<div class="row justify-content-center">
<div class="col-auto">
<label for="edtsearch" class="fw-bold">Search:</label>
<input type="text" id="edtsearch" class="form-control">
</div>
<div class="col-auto">
<label for="dtpstartdate" class="fw-bold">Start Date:</label>
<input type="date" id="dtpstartdate" class="form-control">
</div>
<div class="col-auto">
<label for="dtpenddate" class="fw-bold">End Date:</label>
<input type="date" id="dtpenddate" class="form-control">
</div>
<div class="col-auto">
<label for="wcbsortby" class="fw-bold">Property Type*</label>
<select class="form-select" id="wcbsortby"></select>
</div>
<div class="col-auto d-flex align-items-end">
<button id="btnapply" class="btn btn-primary">Apply</button>
</div>
</div>
<!-- Actions Row -->
<div class="row mt-3 justify-content-center">
<div class="col-auto d-flex align-items-center">
<label class="mt-3" style="font-weight: 700;">Show <select class="custom-select" id="wcbpagesize" style="font-size: 1.00rem;"></select> entries</label>
</div>
<!-- Actions Row -->
<div class="row mt-3 justify-content-center">
<div class="col-auto">
<button id="btnaddorder" class="btn btn-secondary mt-3">Add Order</button>
</div>
<div class="col-auto">
<button id="btnsetstatus" class="btn btn-secondary mt-3">Set Status</button>
</div>
<div class="col-auto">
<button id="btngeneratepdf" class="btn btn-secondary mt-3" type="button">Generate PDF</button>
<div class="invalid-feedback">
No order selected. Please select an order to generate a PDF.
</div>
</div>
<div class="col-auto">
<button id="btnfilters" class="btn btn-secondary mt-3">Filters</button>
<div class="col-auto d-flex align-items-center">
<label class="mt-3" style="font-weight: 700;">Order By: <select class="custom-select" id="wlcborderby" style="font-size: 1.00rem;"></select></label>
</div>
<div class="col-auto">
<button id="btnaddorder" class="btn btn-secondary mt-3">Add Order</button>
</div>
<div class="col-auto">
<button id="btnsetstatus" class="btn btn-secondary mt-3">Set Status</button>
</div>
<div class="col-auto">
<button id="btngeneratepdf" class="btn btn-secondary mt-3" type="button">Generate PDF</button>
<div class="invalid-feedback">
No order selected. Please select an order to generate a PDF.
</div>
</div>
<div class="col-auto">
<button id="btnfilters" class="btn btn-secondary mt-3">Filters</button>
</div>
</div>
<!-- Entries Label Section -->
<div class="d-flex justify-content-between w-100 mt-2">
<label id="lblentries"></label>
<!-- Entries Label Section d-flex justify-content-between w-100 mt-2-->
<div class="row">
<div class="col text-start">
<label id="lblentries"></label>
</div>
<div class="col text-end">
<label id="lblsearch"></label>
</div>
</div>
<!-- Table Section -->
<div id="order_table_section" class="overflow-auto mt-2"
style="max-height: calc(100vh - 380px); border-bottom: none; padding-bottom: 0;">
<table id="tblPhoneGrid" class="table table-striped table-bordered">
style="max-height: calc(100vh - 250px); padding-bottom: 0; width: 100%;">
<table id="tblPhoneGrid" class="table table-striped table-bordered" style="width: 100%;">
<thead class="sticky-top bg-light">
<tr style="font-size: 0.875rem;">
<!-- Table headers are dynamically generated -->
......@@ -86,22 +69,3 @@
</div>
</div>
<!-- Confirmation Modal -->
<div id="confirmation_modal" class="modal fade" tabindex="-1" aria-labelledby="confirmation_modal_label" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 id="confirmation_modal_label" class="modal-title">Select Customer</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<select id="wcbcustomer" class="form-control input-sm"></select>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal" id="btn_confirm_order">Confirm</button>
</div>
</div>
</div>
</div>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>TMS Web Project</title>
<style>
</style>
</head>
<body>
</body>
</html>
unit View.Search;
interface
uses
System.SysUtils, System.Generics.Collections, System.Classes, JS, Web, WEBLib.Graphics, WEBLib.Controls,
WEBLib.Forms, WEBLib.Dialogs, WEBLib.Menus, WEBLib.ExtCtrls, WEBLib.StdCtrls,
WEBLib.JSON, Auth.Service, XData.Web.Client, WebLib.Storage,
ConnectionModule, App.Types, Vcl.StdCtrls, Vcl.Controls, WEBLib.DBCtrls,
Data.DB, XData.Web.JsonDataset, XData.Web.Dataset, WEBLib.DB, WEBLib.Grids,
Vcl.Grids, VCL.TMSFNCTypes, VCL.TMSFNCUtils, VCL.TMSFNCGraphics,
VCL.TMSFNCGraphicsTypes, VCL.TMSFNCGridCell, VCL.TMSFNCGridOptions,
VCL.TMSFNCCustomControl, VCL.TMSFNCCustomScrollControl, VCL.TMSFNCGridData,
VCL.TMSFNCCustomGrid, VCL.TMSFNCGrid;
type
TFSearch = class(TWebForm)
pnlMessage: TWebPanel;
lblMessage: TWebLabel;
btnCloseNotification: TWebButton;
wcbFilterType1: TWebComboBox;
btnConfirm: TWebButton;
edtOrderID: TWebEdit;
dtpStartDate1: TWebDateTimePicker;
dtpEndDate1: TWebDateTimePicker;
cbNull1: TWebCheckBox;
wcbOrderType: TWebComboBox;
lblStatus1: TWebLabel;
lblType1: TWebLabel;
lblStartDate1: TWebLabel;
lblEndDate1: TWebLabel;
wcbFilterType2: TWebComboBox;
dtpStartDate2: TWebDateTimePicker;
dtpEndDate2: TWebDateTimePicker;
cbNull2: TWebCheckBox;
lblStatus2: TWebLabel;
lblType2: TWebLabel;
lblStartDate2: TWebLabel;
lblEndDate2: TWebLabel;
WebLabel1: TWebLabel;
WebLabel2: TWebLabel;
TMSFNCGrid1: TTMSFNCGrid;
edtSearch: TWebEdit;
edtCompanyID: TWebEdit;
lblCompanyID: TWebLabel;
XDataWebClient1: TXDataWebClient;
xdwdsCustomers: TXDataWebDataSet;
xdwdsCustomersID: TIntegerField;
xdwdsCustomersNAME: TStringField;
xdwdsCustomersSHORT_NAME: TStringField;
xdwdsCustomersADDRESS: TStringField;
wdsCustomers: TWebDataSource;
WebLabel3: TWebLabel;
edtJobName: TWebEdit;
WebLabel4: TWebLabel;
btnCancel: TWebButton;
btnClear: TWebButton;
procedure btnConfirmClick(Sender: TObject);
procedure WebFormShow(Sender: TObject);
procedure btnCancelClick(Sender: TObject);
procedure edtSearchChange(Sender: TObject);
procedure TMSFNCGrid1CellClick(Sender: TObject; ACol, ARow: Integer);
procedure btnClearClick(Sender: TObject);
private
//FJSONProc: TJSONProc;
[async] procedure getCustomers;
procedure PopulateGridManually;
procedure ApplyFilter;
var
temp: string;
public
class function CreateForm(AElementID: string): TWebForm;
var
confirm: boolean;
searchOptions: string;
end;
var
FSearch: TFSearch;
implementation
{$R *.dfm}
class function TFSearch.CreateForm(AElementID: string): TWebForm;
begin
Application.CreateForm(TFSearch, AElementID, Result,
procedure(AForm: TObject)
begin
with TFSearch(AForm) do
begin
end;
end
);
end;
procedure TFSearch.edtSearchChange(Sender: TObject);
begin
ApplyFilter;
end;
procedure TFSearch.WebFormShow(Sender: TObject);
var
params: TStringList;
DateFormatSettings: TFormatSettings;
begin
params := TStringList.Create;
params.StrictDelimiter := true;
params.Delimiter := '&';
params.DelimitedText := searchOptions;
confirm := false;
DateFormatSettings := TFormatSettings.Create;
DateFormatSettings.ShortDateFormat := 'yyyy/mm/dd';
wcbOrderType.Text := UpperCase(Copy(params.Values['orderType'], 1, 1)) + LowerCase(Copy(params.Values['orderType'], 2, MaxInt));
edtOrderID.Text := params.Values['orderID'];
edtCompanyID.Text := params.Values['companyID'];
edtJobName.Text := params.Values['jobName'];
// Status 1
if params.Values['filterType1'] <> '' then
wcbFilterType1.Text := params.Values['filterType1']
else
wcbFilterType1.Text := 'NONE';
console.log(params.Values['startDate1']);
if params.Values['startDate1'] = '' then
dtpStartDate1.Date := 0
else
begin
dtpStartDate1.Date := StrToDateTime(params.Values['startDate1'], DateFormatSettings);
end;
if params.Values['endDate1'] = '' then
dtpEndDate1.Date := 0
else
dtpEndDate1.Date := StrToDateTime(params.Values['endDate1'], DateFormatSettings);
if params.values['null1'] <> '' then
cbNull1.Checked := StrToBool(params.Values['null1']);
// Status 2
if params.Values['filterType2'] <> '' then
wcbFilterType2.Text := params.Values['filterType2']
else
wcbFilterType2.Text := 'NONE';
if params.Values['startDate2'] = '1899/12/30' then
dtpStartDate2.Date := 0
else
dtpStartDate2.Date := StrToDateTime(params.Values['startDate2'], DateFormatSettings);
if params.Values['endDate2'] = '1899/12/30' then
dtpEndDate2.Date := 0
else
dtpEndDate2.Date := StrToDateTime(params.Values['endDate2'], DateFormatSettings);
if params.values['null2'] <> '' then
cbNull1.Checked := StrToBool(params.Values['null2']);
params.Free;
getCustomers();
end;
procedure TFSearch.btnCancelClick(Sender: TObject);
begin
Close;
end;
procedure TFSearch.btnClearClick(Sender: TObject);
begin
edtOrderID.Text := '';
edtCompanyID.Text := '';
edtSearch.Text := '';
edtJobName.Text := '';
wcbOrderType.Text := 'Any';
wcbFilterType1.Text := 'NONE';
dtpStartDate1.Date := 0;
dtpEndDate1.Date := 0;
cbNull1.Checked := False;
wcbFilterType2.Text := 'NONE';
dtpStartDate2.Date := 0;
dtpEndDate2.Date := 0;
cbNull2.Checked := false;
end;
procedure TFSearch.btnConfirmClick(Sender: TObject);
begin
confirm := true;
Close;
end;
[async] procedure TFSearch.getCustomers();
var
xdcResponse: TXDataClientResponse;
customerList: TJSObject;
begin
// Fetch data from XData service
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetCustomers', []));
customerList := TJSObject(xdcResponse.Result);
// Load data into TXDataWebDataset
xdwdsCustomers.Close;
xdwdsCustomers.SetJsonData(customerList['data']);
xdwdsCustomers.Open;
// Manually populate the grid
PopulateGridManually;
end;
procedure TFSearch.TMSFNCGrid1CellClick(Sender: TObject; ACol, ARow: Integer);
begin
edtCompanyID.Text := TMSFNCGrid1.Cells[0, ARow];
end;
procedure TFSearch.PopulateGridManually;
var
RowIndex: Integer;
begin
TMSFNCGrid1.BeginUpdate;
try
TMSFNCGrid1.Clear; // Clear any existing data
// Set up column headers
TMSFNCGrid1.ColumnCount := 4;
TMSFNCGrid1.RowCount := 1;
TMSFNCGrid1.Cells[0, 0] := 'ID';
TMSFNCGrid1.Cells[1, 0] := 'Short Name';
TMSFNCGrid1.Cells[2, 0] := 'Name';
TMSFNCGrid1.Cells[3, 0] := 'Address';
// TMSFNCGrid1.ColumnWidths[0] := 40;
// TMSFNCGrid1.ColumnWidths[1] := 80;
// TMSFNCGrid1.ColumnWidths[2] := 250;
// Populate the grid with data from the dataset
xdwdsCustomers.First;
RowIndex := 1;
while not xdwdsCustomers.EOF do
begin
TMSFNCGrid1.RowCount := RowIndex + 1;
TMSFNCGrid1.Cells[0, RowIndex] := xdwdsCustomers.FieldByName('ID').AsString;
TMSFNCGrid1.Cells[1, RowIndex] := xdwdsCustomers.FieldByName('SHORT_NAME').AsString;
TMSFNCGrid1.Cells[2, RowIndex] := xdwdsCustomers.FieldByName('NAME').AsString;
TMSFNCGrid1.Cells[3, RowIndex] := xdwdsCustomers.FieldByName('ADDRESS').AsString;
Inc(RowIndex);
xdwdsCustomers.Next;
end;
finally
TMSFNCGrid1.EndUpdate;
end;
end;
procedure TFSearch.ApplyFilter;
var
fd: TTMSFNCGridFilterData;
i: Integer;
SearchText: string;
begin
SearchText := Trim(edtSearch.Text);
TMSFNCGrid1.RemoveFilter;
TMSFNCGrid1.Filter.Clear;
// match on first 3 columns
for i := 0 to 2 do
begin
fd := TMSFNCGrid1.Filter.Add;
fd.Column := i;
fd.Condition := '*' + SearchText + '*'; // Match text anywhere in the cell
fd.CaseSensitive := False; // Make the filter case-insensitive
// Use foOR for "match any column" logic
if i > 0 then
fd.Operation := foOR
else
fd.Operation := foNONE; // First filter has no logical operation
end;
// Apply the filters to the grid
TMSFNCGrid1.ApplyFilter;
end;
end.
......@@ -14,6 +14,16 @@ input[type="text"] {
padding-left: 5px;
}
.input-search input {
width: 100px; /* Adjust the width of the input */
height: 35px; /* Set the height to match label height */
padding: 5px; /* Padding for input text */
font-size: 14px; /* Font size for input text */
border: 1px solid #ced4da; /* Border style */
border-radius: 5px; /* Rounded corners for the input */
box-sizing: border-box; /* Ensures padding and border are included in the element's total width and height */
}
.card-header {
width: 100%;
text-align: left; /* Align text to the left */
......
......@@ -18,7 +18,8 @@ uses
View.EditUser in 'View.EditUser.pas' {FViewEditUser: TWebForm} {*.html},
View.Orders in 'View.Orders.pas' {FViewOrders: TWebForm} {*.html},
View.OrderEntryCorrugated in 'View.OrderEntryCorrugated.pas' {FOrderEntry: TWebForm} {*.html},
View.AddOrder in 'View.AddOrder.pas' {FAddOrder: TWebForm} {*.html};
View.AddOrder in 'View.AddOrder.pas' {FAddOrder: TWebForm} {*.html},
View.Search in 'View.Search.pas' {FSearch: TWebForm} {*.html};
{$R *.res}
......
......@@ -94,7 +94,6 @@
<AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode>
<TMSUseJSDebugger>2</TMSUseJSDebugger>
<TMSWebSingleInstance>1</TMSWebSingleInstance>
<TMSWebBrowser>5</TMSWebBrowser>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
......@@ -176,6 +175,11 @@
<FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass>
</DCCReference>
<DCCReference Include="View.Search.pas">
<Form>FSearch</Form>
<FormType>dfm</FormType>
<DesignClass>TWebForm</DesignClass>
</DCCReference>
<None Include="index.html"/>
<None Include="css\app.css"/>
<None Include="config\config.json"/>
......
......@@ -78,6 +78,27 @@ type
end;
TStatusSearchInfo = class
Public
startDate,
endDate,
filterType,
statusType,
statusSuffix,
statusTableShort,
statusTableLong,
altStatusTableShort,
altStatusTableLong: string;
null: boolean;
end;
TSQLQuery = class
Public
SQL,
whereSQL: string;
end;
TOrderList = class
Public
count: integer;
......
......@@ -20,25 +20,13 @@ uses
procedure LoadDatabaseSettings( uc: TUniConnection; iniFilename: string );
var
iniFile: TIniFile;
iniStr: string;
begin
iniFile := TIniFile.Create( ExtractFilePath(Application.ExeName) + iniFilename );
try
iniStr := iniFile.ReadString('Database', 'Server', '');
if not iniStr.IsEmpty then
uc.Server := iniStr;
iniStr := iniFile.ReadString('Database', 'Database', '');
if not iniStr.IsEmpty then
uc.Database := iniStr;
iniStr := iniFile.ReadString('Database', 'Username', '');
if not iniStr.IsEmpty then
uc.Username := iniStr;
iniStr := iniFile.ReadString('Database', 'Password', '');
if not iniStr.IsEmpty then
uc.Password := iniStr;
uc.Server := iniFile.ReadString('Database', 'Server', uc.Server);
uc.Database := iniFile.ReadString('Database', 'Database', uc.Database);
uc.Username := iniFile.ReadString('Database', 'Username', uc.Username);
uc.Password := iniFile.ReadString('Database', 'Password', uc.Password);
finally
iniFile.Free;
end;
......
[Settings]
MemoLogLevel=5
MemoLogLevel=4
FileLogLevel=5
LogFileNum=34
webClientVersion=1.0.0
[Database]
--Server=192.168.159.132
Server=192.168.60.129
Server=192.168.159.132
--Server=192.168.60.129
--Server=192.168.75.133
--Database=
--Username=
Password=emsys!012
--Password=emsys!012
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