1155 lines
32 KiB
ObjectPascal
1155 lines
32 KiB
ObjectPascal
unit uKiosk;
|
||
|
||
interface
|
||
|
||
uses
|
||
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
||
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, System.Math, System.Types,
|
||
|
||
RegisterClasses_base, wItem, EmpMst, Vcl.Grids, Vcl.ComCtrls, Vcl.Imaging.jpeg,
|
||
acPNG, cxGraphics, cxControls, cxLookAndFeels, cxLookAndFeelPainters,
|
||
cxStyles, cxCustomData, cxFilter, cxData, cxDataStorage, cxEdit, cxNavigator,
|
||
dxDateRanges, dxScrollbarAnnotations, Data.DB, cxDBData,
|
||
cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGridLevel,
|
||
cxClasses, cxGridCustomView, cxGrid, cxCalc, cxTextEdit,
|
||
|
||
dxSkinDevExpressStyle,
|
||
|
||
cxCheckBox, cxContainer, cxMaskEdit, cxDropDownEdit,
|
||
cxCheckComboBox, Vcl.WinXCtrls, IniFiles, Vcl.WinXPickers;
|
||
|
||
|
||
type
|
||
TfKiosk = class(TForm)
|
||
Panel1: TPanel;
|
||
GroupBox1: TGroupBox;
|
||
lbDBName: TLabeledEdit;
|
||
lbHost: TLabeledEdit;
|
||
lbPort: TLabeledEdit;
|
||
lbPassword: TLabeledEdit;
|
||
lbUserName: TLabeledEdit;
|
||
btDBConnect: TButton;
|
||
btDBdisConnect: TButton;
|
||
Button3: TButton;
|
||
Memo1: TMemo;
|
||
Memo2: TMemo;
|
||
StringGrid1: TStringGrid;
|
||
Panel2: TPanel;
|
||
Button2: TButton;
|
||
btQuery: TButton;
|
||
Pan_Main: TPanel;
|
||
Pan_1: TPanel;
|
||
Pan_2: TPanel;
|
||
Pan_3: TPanel;
|
||
Label1: TLabel;
|
||
Label2: TLabel;
|
||
Label3: TLabel;
|
||
Panel4: TPanel;
|
||
Image1: TImage;
|
||
Label4: TLabel;
|
||
Timer_datetime: TTimer;
|
||
Pan_default: TPanel;
|
||
PageControl1: TPageControl;
|
||
tab_pan_1: TTabSheet;
|
||
Pan_tab_1: TPanel;
|
||
tab_pan_2: TTabSheet;
|
||
Pan_tab_2: TPanel;
|
||
tab_pan_3: TTabSheet;
|
||
Pan_tab_3: TPanel;
|
||
Panel5: TPanel;
|
||
Label5: TLabel;
|
||
Panel6: TPanel;
|
||
Label6: TLabel;
|
||
Panel7: TPanel;
|
||
Label7: TLabel;
|
||
Panel8: TPanel;
|
||
Panel9: TPanel;
|
||
Panel10: TPanel;
|
||
Panel11: TPanel;
|
||
Label8: TLabel;
|
||
Panel12: TPanel;
|
||
Label9: TLabel;
|
||
Panel13: TPanel;
|
||
Label10: TLabel;
|
||
Panel14: TPanel;
|
||
Panel15: TPanel;
|
||
Button1: TButton;
|
||
Panel16: TPanel;
|
||
GridOrderList: TcxGrid;
|
||
GridOrderListTV: TcxGridTableView;
|
||
GridOrderListTVColumn1: TcxGridColumn;
|
||
GridOrderListTVColumn2: TcxGridColumn;
|
||
GridOrderListTVColumn3: TcxGridColumn;
|
||
GridOrderListTVColumn4: TcxGridColumn;
|
||
GridOrderListTVColumn5: TcxGridColumn;
|
||
GridOrderListTVColumn6: TcxGridColumn;
|
||
GridOrderListTVColumn7: TcxGridColumn;
|
||
GridOrderListTVColumn8: TcxGridColumn;
|
||
GridOrderListTVColumn9: TcxGridColumn;
|
||
GridOrderListTVColumn10: TcxGridColumn;
|
||
GridOrderListTVColumn11: TcxGridColumn;
|
||
GridOrderListTVColumn12: TcxGridColumn;
|
||
GridOrderListTVColumn13: TcxGridColumn;
|
||
GridOrderListTVColumn14: TcxGridColumn;
|
||
GridOrderListTVColumn15: TcxGridColumn;
|
||
GridOrderListLv: TcxGridLevel;
|
||
GridPanel1: TGridPanel;
|
||
Panel17: TPanel;
|
||
Panel18: TPanel;
|
||
Panel19: TPanel;
|
||
Panel20: TPanel;
|
||
Button4: TButton;
|
||
TabSheet1: TTabSheet;
|
||
Panel21: TPanel;
|
||
TabSheet2: TTabSheet;
|
||
Panel23: TPanel;
|
||
Label11: TLabel;
|
||
Panel24: TPanel;
|
||
Label12: TLabel;
|
||
Label13: TLabel;
|
||
Label14: TLabel;
|
||
Label15: TLabel;
|
||
Label16: TLabel;
|
||
Label17: TLabel;
|
||
Label18: TLabel;
|
||
Label19: TLabel;
|
||
Label20: TLabel;
|
||
Edit1: TEdit;
|
||
Edit2: TEdit;
|
||
Edit3: TEdit;
|
||
Edit4: TEdit;
|
||
Edit5: TEdit;
|
||
Edit6: TEdit;
|
||
ComboBox1: TComboBox;
|
||
Panel22: TPanel;
|
||
Label21: TLabel;
|
||
Label22: TLabel;
|
||
Label23: TLabel;
|
||
Label24: TLabel;
|
||
Label25: TLabel;
|
||
Label26: TLabel;
|
||
Label27: TLabel;
|
||
Label28: TLabel;
|
||
Panel25: TPanel;
|
||
Label29: TLabel;
|
||
Panel26: TPanel;
|
||
Label30: TLabel;
|
||
Edit7: TEdit;
|
||
Edit8: TEdit;
|
||
Edit9: TEdit;
|
||
Edit10: TEdit;
|
||
Edit11: TEdit;
|
||
Edit12: TEdit;
|
||
ComboBox2: TComboBox;
|
||
Pan_Login: TPanel;
|
||
Panel27: TPanel;
|
||
Image2: TImage;
|
||
Label31: TLabel;
|
||
Image3: TImage;
|
||
Label34: TLabel;
|
||
TabSheet3: TTabSheet;
|
||
Pan_Setting: TPanel;
|
||
Edit15: TEdit;
|
||
Label35: TLabel;
|
||
Panel3: TPanel;
|
||
Panel29: TPanel;
|
||
Label36: TLabel;
|
||
Edit16: TEdit;
|
||
Label37: TLabel;
|
||
Label38: TLabel;
|
||
Edit18: TEdit;
|
||
Label39: TLabel;
|
||
Label40: TLabel;
|
||
ComboBox3: TComboBox;
|
||
ToggleSwitch1: TToggleSwitch;
|
||
Panel30: TPanel;
|
||
Edit13: TEdit;
|
||
Label32: TLabel;
|
||
Panel28: TPanel;
|
||
Label33: TLabel;
|
||
Edit14: TEdit;
|
||
ComboBox4: TComboBox;
|
||
ComboBox5: TComboBox;
|
||
ComboBox6: TComboBox;
|
||
Label41: TLabel;
|
||
Label42: TLabel;
|
||
Label43: TLabel;
|
||
DatePicker1: TDatePicker;
|
||
DatePicker2: TDatePicker;
|
||
DatePicker3: TDatePicker;
|
||
Panel31: TPanel;
|
||
Panel32: TPanel;
|
||
Panel33: TPanel;
|
||
Label44: TLabel;
|
||
Edit19: TEdit;
|
||
Edit20: TEdit;
|
||
Edit21: TEdit;
|
||
Panel34: TPanel;
|
||
Label45: TLabel;
|
||
Panel35: TPanel;
|
||
Edit22: TEdit;
|
||
Edit23: TEdit;
|
||
Edit24: TEdit;
|
||
Panel36: TPanel;
|
||
ComboBox7: TComboBox;
|
||
Pan_4: TPanel;
|
||
Label46: TLabel;
|
||
Pan_5: TPanel;
|
||
Label47: TLabel;
|
||
tab_Pan_4: TTabSheet;
|
||
tab_Pan_5: TTabSheet;
|
||
Pan_tab_4: TPanel;
|
||
Panel41: TPanel;
|
||
Panel42: TPanel;
|
||
Label51: TLabel;
|
||
Panel43: TPanel;
|
||
Edit17: TEdit;
|
||
Edit25: TEdit;
|
||
Edit26: TEdit;
|
||
Panel44: TPanel;
|
||
Pan_tab_5: TPanel;
|
||
Panel49: TPanel;
|
||
Panel50: TPanel;
|
||
Label55: TLabel;
|
||
Panel51: TPanel;
|
||
Edit27: TEdit;
|
||
Edit28: TEdit;
|
||
Edit29: TEdit;
|
||
Panel52: TPanel;
|
||
|
||
procedure btDBConnectClick(Sender: TObject);
|
||
procedure btDBdisConnectClick(Sender: TObject);
|
||
procedure Button2Click(Sender: TObject);
|
||
procedure btQueryClick(Sender: TObject);
|
||
procedure FormCreate(Sender: TObject);
|
||
procedure FormDestroy(Sender: TObject);
|
||
procedure FormShow(Sender: TObject);
|
||
procedure Button3Click(Sender: TObject);
|
||
procedure StringGrid1DblClick(Sender: TObject);
|
||
procedure Panel2MouseDown(Sender: TObject; Button: TMouseButton;
|
||
Shift: TShiftState; X, Y: Integer);
|
||
procedure Panel2MouseMove(Sender: TObject; Shift: TShiftState; X,
|
||
Y: Integer);
|
||
procedure Panel2MouseUp(Sender: TObject; Button: TMouseButton;
|
||
Shift: TShiftState; X, Y: Integer);
|
||
procedure Pan_MainMouseDown(Sender: TObject; Button: TMouseButton;
|
||
Shift: TShiftState; X, Y: Integer);
|
||
procedure Label1Click(Sender: TObject);
|
||
procedure Timer_datetimeTimer(Sender: TObject);
|
||
procedure Label5Click(Sender: TObject);
|
||
procedure Label8Click(Sender: TObject);
|
||
procedure Button1Click(Sender: TObject);
|
||
procedure Panel18Click(Sender: TObject);
|
||
procedure Button4Click(Sender: TObject);
|
||
procedure Label12Click(Sender: TObject);
|
||
procedure Label30Click(Sender: TObject);
|
||
procedure Panel28Click(Sender: TObject);
|
||
procedure Image3Click(Sender: TObject);
|
||
procedure Label4Click(Sender: TObject);
|
||
procedure Panel3Click(Sender: TObject);
|
||
procedure ToggleSwitch1Click(Sender: TObject);
|
||
procedure Panel29Click(Sender: TObject);
|
||
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
||
procedure Panel32Click(Sender: TObject);
|
||
procedure Panel33Click(Sender: TObject);
|
||
procedure Panel35Click(Sender: TObject);
|
||
procedure Panel36Click(Sender: TObject);
|
||
private
|
||
{ Private declarations }
|
||
FqryList: TList;
|
||
|
||
FDragging: Boolean;
|
||
FOffset: TPoint;
|
||
inifilename : string;
|
||
|
||
procedure xShowInfo(tmpList: TList);
|
||
procedure xFreeAll(tmpList: TList);
|
||
function xGetObjEmpInfo: TList;
|
||
procedure pan_select(tag: integer);
|
||
procedure label_set_alclient;
|
||
procedure Buttonselect(tag: integer);
|
||
procedure Buttonselect_1(tag: integer);
|
||
procedure BTCreate_1(page_no,count: integer);
|
||
procedure BTCreate_2(page_no,count: integer);
|
||
procedure DynamicButton_1Click(Sender: TObject);
|
||
procedure DynamicButton_2Click(Sender: TObject);
|
||
procedure SelectFocusedRecord;
|
||
procedure recordselectbt_1(fpanel:TPanel ; ck: integer);
|
||
public
|
||
{ Public declarations }
|
||
procedure xAutoResizeStringGridColumns(Grid: TStringGrid; Canvas: TCanvas);
|
||
end;
|
||
|
||
var
|
||
fKiosk: TfKiosk;
|
||
|
||
implementation
|
||
uses uDM, NeolTestMain, Editor;
|
||
|
||
{$R *.dfm}
|
||
|
||
procedure TfKiosk.Panel18Click(Sender: TObject);
|
||
begin
|
||
recordselectbt_1(Sender as TPanel, (Sender as TPanel).Tag);
|
||
end;
|
||
|
||
procedure TfKiosk.recordselectbt_1(fpanel:TPanel ; ck:integer);
|
||
begin
|
||
fpanel.Color := $00978F62;
|
||
|
||
if (GridOrderListTV.DataController.RecordCount > 0) then
|
||
begin
|
||
if GridOrderListTV.DataController.GetSelectedCount = 0 then
|
||
GridOrderListTV.DataController.FocusedRecordIndex := 0;
|
||
|
||
case ck of
|
||
0 : begin
|
||
GridOrderListTV.DataController.FocusedRecordIndex := 0;
|
||
end;
|
||
1 : begin
|
||
// if GridOrderListTV.DataController.FocusedRecordIndex - 1 >= 0 then
|
||
// GridOrderListTV.DataController.FocusedRecordIndex := GridOrderListTV.DataController.FocusedRecordIndex - 1;
|
||
if GridOrderListTV.DataController.FocusedRecordIndex - 7 >= 0 then
|
||
GridOrderListTV.DataController.FocusedRecordIndex := GridOrderListTV.DataController.FocusedRecordIndex - 7
|
||
else
|
||
GridOrderListTV.DataController.FocusedRecordIndex := 0;
|
||
end;
|
||
2 : begin
|
||
// if GridOrderListTV.DataController.FocusedRecordIndex + 1 < GridOrderListTV.DataController.RecordCount then
|
||
// GridOrderListTV.DataController.FocusedRecordIndex := GridOrderListTV.DataController.FocusedRecordIndex + 1;
|
||
if GridOrderListTV.DataController.FocusedRecordIndex + 7 < GridOrderListTV.DataController.RecordCount then
|
||
GridOrderListTV.DataController.FocusedRecordIndex := GridOrderListTV.DataController.FocusedRecordIndex + 7
|
||
else
|
||
GridOrderListTV.DataController.FocusedRecordIndex := GridOrderListTV.DataController.RecordCount - 1;
|
||
end;
|
||
3 : begin
|
||
GridOrderListTV.DataController.FocusedRecordIndex := GridOrderListTV.DataController.RecordCount - 1;
|
||
end;
|
||
end;
|
||
|
||
SelectFocusedRecord;
|
||
end;
|
||
|
||
Refresh;
|
||
Sleep(100);
|
||
fpanel.Color := $00E8E8D5;
|
||
end;
|
||
|
||
procedure TfKiosk.SelectFocusedRecord;
|
||
begin
|
||
// <20><><EFBFBD><EFBFBD> <20><>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD> <20><><EFBFBD>ڵ带 <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||
GridOrderListTV.DataController.SelectRows(GridOrderListTV.DataController.FocusedRecordIndex, GridOrderListTV.DataController.FocusedRecordIndex);
|
||
GridOrderListTV.DataController.ClearSelection;
|
||
GridOrderListTV.Controller.FocusedRow.Selected := True;
|
||
end;
|
||
|
||
procedure TfKiosk.Panel28Click(Sender: TObject);
|
||
begin
|
||
(Sender as TPanel).Color := $005C583D;
|
||
Refresh;
|
||
|
||
try
|
||
ShowMessage('Login...ok!');
|
||
Pan_Login.Visible := False;
|
||
finally
|
||
Sleep(50);
|
||
(Sender as TPanel).Color := $00978F62;
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.Panel29Click(Sender: TObject);
|
||
begin
|
||
Pan_Setting.Visible := False;
|
||
end;
|
||
|
||
procedure TfKiosk.Panel2MouseDown(Sender: TObject; Button: TMouseButton;
|
||
Shift: TShiftState; X, Y: Integer);
|
||
begin
|
||
if Button = mbLeft then
|
||
begin
|
||
FDragging := True;
|
||
FOffset := Point(X, Y);
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.Panel2MouseMove(Sender: TObject; Shift: TShiftState; X,
|
||
Y: Integer);
|
||
var
|
||
NewPos: TPoint;
|
||
begin
|
||
if FDragging then
|
||
begin
|
||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>콺 <20><>ġ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>θ<EFBFBD> <20><> <20><>ǥ <20><><EFBFBD><EFBFBD>
|
||
NewPos := Panel1.ClientToParent(Point(X, Y));
|
||
Panel1.Left := NewPos.X - FOffset.X;
|
||
Panel1.Top := NewPos.Y - FOffset.Y;
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.Panel2MouseUp(Sender: TObject; Button: TMouseButton;
|
||
Shift: TShiftState; X, Y: Integer);
|
||
begin
|
||
if Button = mbLeft then
|
||
begin
|
||
FDragging := false;
|
||
FOffset := Point(X, Y);
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.Panel32Click(Sender: TObject);
|
||
begin
|
||
if Edit19.Text <> '1' then
|
||
begin
|
||
Edit19.Text := IntToStr(StrToInt(Edit19.Text)-1);
|
||
|
||
BTCreate_1(StrToInt(Edit19.Text)-1,StrToInt(Edit20.Text));
|
||
|
||
Label44.Caption := Edit19.Text + '/'+Edit21.Text;
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.Panel33Click(Sender: TObject);
|
||
begin
|
||
if Edit19.Text <> Edit21.Text then
|
||
begin
|
||
Edit19.Text := IntToStr(StrToInt(Edit19.Text)+1);
|
||
|
||
BTCreate_1(StrToInt(Edit19.Text)-1,StrToInt(Edit20.Text));
|
||
|
||
Label44.Caption := Edit19.Text + '/'+Edit21.Text;
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.Panel35Click(Sender: TObject);
|
||
begin
|
||
if Edit22.Text <> '1' then
|
||
begin
|
||
Edit22.Text := IntToStr(StrToInt(Edit22.Text)-1);
|
||
|
||
BTCreate_2(StrToInt(Edit22.Text)-1,StrToInt(Edit23.Text));
|
||
|
||
Label45.Caption := Edit22.Text + '/'+Edit24.Text;
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.Panel36Click(Sender: TObject);
|
||
begin
|
||
if Edit22.Text <> Edit24.Text then
|
||
begin
|
||
Edit22.Text := IntToStr(StrToInt(Edit22.Text)+1);
|
||
|
||
BTCreate_2(StrToInt(Edit22.Text)-1,StrToInt(Edit23.Text));
|
||
|
||
Label45.Caption := Edit22.Text + '/'+Edit24.Text;
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.Panel3Click(Sender: TObject);
|
||
var
|
||
IniFile : TIniFile;
|
||
begin
|
||
(Sender as TPanel).Color := $005C583D;
|
||
Refresh;
|
||
|
||
try
|
||
IniFile := TIniFile.Create(inifilename);
|
||
try
|
||
IniFile.WriteString('Setting', 'string', 'A');
|
||
IniFile.WriteInteger('Setting', 'integer', StrToIntDef('1', 0));
|
||
IniFile.WriteBool('Setting_1', 'bool', True);
|
||
finally
|
||
IniFile.Free;
|
||
end;
|
||
|
||
|
||
finally
|
||
Sleep(50);
|
||
(Sender as TPanel).Color := $00978F62;
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.Pan_MainMouseDown(Sender: TObject; Button: TMouseButton;
|
||
Shift: TShiftState; X, Y: Integer);
|
||
begin
|
||
ReleaseCapture;
|
||
Perform( WM_SYSCOMMAND, $F012, 0 );
|
||
end;
|
||
|
||
procedure TfKiosk.xAutoResizeStringGridColumns(Grid: TStringGrid;
|
||
Canvas: TCanvas);
|
||
var
|
||
Col, Row: Integer;
|
||
MaxWidth: Integer;
|
||
CellText: string;
|
||
begin
|
||
for Col := 0 to Grid.ColCount - 1 do begin
|
||
MaxWidth := 0;
|
||
for Row := 0 to Grid.RowCount - 1 do begin
|
||
CellText := Grid.Cells[Col, Row];
|
||
MaxWidth := max(MaxWidth, Canvas.TextWidth(CellText));
|
||
end;
|
||
Grid.ColWidths[Col] := MaxWidth + 10;
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.xFreeAll(tmpList: TList);
|
||
var
|
||
i: Integer;
|
||
tmpEmp: TEmpMst;
|
||
begin
|
||
i := 0;
|
||
while i < tmpList.Count do begin
|
||
tmpEmp := TEmpMst(tmpList.Items[0]);
|
||
tmpEmp.Free;
|
||
tmpList.Delete(0);
|
||
end;
|
||
tmpList.Free; tmpList:=nil;
|
||
end;
|
||
|
||
function TfKiosk.xGetObjEmpInfo: TList;
|
||
var
|
||
curEmp: TEmpMst;
|
||
begin
|
||
Result := TList.Create;
|
||
with dm do begin
|
||
while not FDQuery1.Eof do begin
|
||
curEmp := TEmpMst.Create(Self);
|
||
curEmp.OBID := FDQuery1.FieldByName('OBID').AsString;
|
||
curEmp.Name := FDQuery1.FieldByName('Name').AsString;
|
||
curEmp.wClassName := FDQuery1.FieldByName('wClassName').AsString;
|
||
curEmp.CreateDate := FDQuery1.FieldByName('CreateDate').AsString;
|
||
//curEmp.CreateTime := FDQuery1.FieldByName('CreateTime').AsString;
|
||
curEmp.CreateTime := FormatDateTime('hh:nn:ss', FDQuery1.FieldByName('CreateTime').AsDateTime);
|
||
curEmp.CreatorID := FDQuery1.FieldByName('CreatorID').AsString;
|
||
curEmp.IsValid := FDQuery1.FieldByName('IsValid').AsString;
|
||
curEmp.OrdCode := FDQuery1.FieldByName('OrdCode').AsString;
|
||
curEmp.Position := FDQuery1.FieldByName('Position').AsString;
|
||
curEmp.Role := FDQuery1.FieldByName('Role').AsString;
|
||
curEmp.InDate := FDQuery1.FieldByName('InDate').AsString;
|
||
curEmp.OutDate := FDQuery1.FieldByName('OutDate').AsString;
|
||
curEmp.Status := FDQuery1.FieldByName('Status').AsString;
|
||
curEmp.EmpTelNum := FDQuery1.FieldByName('EmpTelNum').AsString;
|
||
curEmp.EmpAddress := FDQuery1.FieldByName('EmpAddress').AsString;
|
||
curEmp.Descriptions := FDQuery1.FieldByName('Descriptions').AsString;
|
||
|
||
Result.Add(curEmp);
|
||
|
||
FDQuery1.Next;
|
||
end;
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.xShowInfo(tmpList: TList);
|
||
var
|
||
i, cidx, ridx: Integer;
|
||
tmpEmp: TEmpMst;
|
||
begin
|
||
ridx := 0;
|
||
StringGrid1.RowCount := tmpList.Count+1;
|
||
for i := 0 to tmpList.Count-1 do begin
|
||
tmpEmp := TEmpMst(tmpList.Items[i]);
|
||
Inc(ridx);
|
||
cidx := StringGrid1.Rows[0].IndexOf('OBID');
|
||
StringGrid1.Objects[cidx,ridx] := tmpEmp;
|
||
StringGrid1.Cells[cidx,ridx] := tmpEmp.OBID;
|
||
cidx := StringGrid1.Rows[0].IndexOf('Name');
|
||
StringGrid1.Cells[cidx,ridx] := tmpEmp.Name;
|
||
cidx := StringGrid1.Rows[0].IndexOf('wClassName');
|
||
StringGrid1.Cells[cidx,ridx] := tmpEmp.wClassName;
|
||
cidx := StringGrid1.Rows[0].IndexOf('CreateDate');
|
||
StringGrid1.Cells[cidx,ridx] := tmpEmp.CreateDate;
|
||
cidx := StringGrid1.Rows[0].IndexOf('CreateTime');
|
||
StringGrid1.Cells[cidx,ridx] := tmpEmp.CreateTime;
|
||
cidx := StringGrid1.Rows[0].IndexOf('CreatorID');
|
||
StringGrid1.Cells[cidx,ridx] := tmpEmp.CreatorID;
|
||
cidx := StringGrid1.Rows[0].IndexOf('IsValid');
|
||
StringGrid1.Cells[cidx,ridx] := tmpEmp.IsValid;
|
||
cidx := StringGrid1.Rows[0].IndexOf('OrdCode');
|
||
StringGrid1.Cells[cidx,ridx] := tmpEmp.OrdCode;
|
||
cidx := StringGrid1.Rows[0].IndexOf('Position');
|
||
StringGrid1.Cells[cidx,ridx] := tmpEmp.Position;
|
||
cidx := StringGrid1.Rows[0].IndexOf('Role');
|
||
StringGrid1.Cells[cidx,ridx] := tmpEmp.Role;
|
||
cidx := StringGrid1.Rows[0].IndexOf('InDate');
|
||
StringGrid1.Cells[cidx,ridx] := tmpEmp.InDate;
|
||
cidx := StringGrid1.Rows[0].IndexOf('OutDate');
|
||
StringGrid1.Cells[cidx,ridx] := tmpEmp.OutDate;
|
||
cidx := StringGrid1.Rows[0].IndexOf('Status');
|
||
StringGrid1.Cells[cidx,ridx] := tmpEmp.Status;
|
||
cidx := StringGrid1.Rows[0].IndexOf('EmpTelNum');
|
||
StringGrid1.Cells[cidx,ridx] := tmpEmp.EmpTelNum;
|
||
cidx := StringGrid1.Rows[0].IndexOf('EmpAddress');
|
||
StringGrid1.Cells[cidx,ridx] := tmpEmp.EmpAddress;
|
||
cidx := StringGrid1.Rows[0].IndexOf('Descriptions');
|
||
StringGrid1.Cells[cidx,ridx] := tmpEmp.Descriptions;
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.btDBConnectClick(Sender: TObject);
|
||
begin
|
||
DM.PG_DBName := lbDBName.Text;
|
||
DM.PG_UserName := lbUserName.Text;
|
||
DM.PG_Password := lbPassword.Text;
|
||
DM.PG_Host := lbHost.Text;
|
||
DM.PG_Port := lbPort.Text;
|
||
|
||
if dm.DM_Connect then begin
|
||
btDBConnect.Enabled := False;
|
||
btDBdisConnect.Enabled := True;
|
||
Memo1.Lines.Add('PG_Connected : TRUE');
|
||
end
|
||
else begin
|
||
btDBConnect.Enabled := True;
|
||
btDBdisConnect.Enabled := False;
|
||
Memo1.Lines.Add('PG_Connected : FALSE');
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.btDBdisConnectClick(Sender: TObject);
|
||
begin
|
||
if dm.DM_Close then begin
|
||
btDBConnect.Enabled := True;
|
||
btDBdisConnect.Enabled := False;
|
||
Memo1.Lines.Add('PG_disConnected');
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.btQueryClick(Sender: TObject);
|
||
var
|
||
i: Integer;
|
||
tmpList: TList;
|
||
tmpItem: TwItem;
|
||
tmpEmp: TEmpMst;
|
||
begin
|
||
try
|
||
DM.FDQuery1.Close;
|
||
DM.FDQuery1.SQL.Text := Memo2.Lines.Text;
|
||
DM.FDQuery1.Open;
|
||
except
|
||
on E: Exception do ShowMessage('<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>: ' + E.Message);
|
||
end;
|
||
if FqryList <> nil then xFreeAll(FqryList);
|
||
FqryList := xGetObjEmpInfo;
|
||
xShowInfo(FqryList);
|
||
xAutoResizeStringGridColumns(StringGrid1, Canvas);
|
||
end;
|
||
|
||
procedure TfKiosk.Button1Click(Sender: TObject);
|
||
var
|
||
CK_ROW : integer;
|
||
I : integer;
|
||
begin
|
||
try
|
||
GridOrderListTV.DataController.BeginUpdate;
|
||
|
||
for I := 0 to 10 do begin
|
||
with GridOrderListTV.DataController do begin
|
||
|
||
CK_ROW := AppendRecord;
|
||
|
||
Values[CK_ROW, GridOrderListTVColumn1.Index] := 'A'+IntToStr(CK_ROW);
|
||
Values[CK_ROW, GridOrderListTVColumn2.Index] := 'B'+IntToStr(CK_ROW);
|
||
Values[CK_ROW, GridOrderListTVColumn3.Index] := 'C'+IntToStr(CK_ROW);
|
||
Values[CK_ROW, GridOrderListTVColumn4.Index] := 'D'+IntToStr(CK_ROW);
|
||
Values[CK_ROW, GridOrderListTVColumn5.Index] := 'E'+IntToStr(CK_ROW);
|
||
Values[CK_ROW, GridOrderListTVColumn6.Index] := 'F'+IntToStr(CK_ROW);
|
||
Values[CK_ROW, GridOrderListTVColumn7.Index] := 'G'+IntToStr(CK_ROW);
|
||
Values[CK_ROW, GridOrderListTVColumn8.Index] := 'H'+IntToStr(CK_ROW);
|
||
Values[CK_ROW, GridOrderListTVColumn9.Index] := 'I'+IntToStr(CK_ROW);
|
||
Values[CK_ROW, GridOrderListTVColumn10.Index] := 'J'+IntToStr(CK_ROW);
|
||
Values[CK_ROW, GridOrderListTVColumn11.Index] := 'K'+IntToStr(CK_ROW);
|
||
Values[CK_ROW, GridOrderListTVColumn12.Index] := 'L'+IntToStr(CK_ROW);
|
||
Values[CK_ROW, GridOrderListTVColumn13.Index] := 'M'+IntToStr(CK_ROW);
|
||
Values[CK_ROW, GridOrderListTVColumn14.Index] := 'N'+IntToStr(CK_ROW);
|
||
Values[CK_ROW, GridOrderListTVColumn15.Index] := 'O'+IntToStr(CK_ROW);
|
||
end;
|
||
end;
|
||
|
||
finally
|
||
GridOrderListTV.DataController.EndUpdate;
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.Button2Click(Sender: TObject);
|
||
begin
|
||
Memo2.Lines.Clear;
|
||
Memo2.Lines.Add('SELECT * FROM "EmpMst" WHERE "IsValid"=' + dm.xAddSqlMark('t') + ';');
|
||
end;
|
||
|
||
procedure TfKiosk.Button3Click(Sender: TObject);
|
||
begin
|
||
frmNeolTestMain := TfrmNeolTestMain.Create(nil);
|
||
frmNeolTestMain.Show;
|
||
end;
|
||
|
||
procedure TfKiosk.Button4Click(Sender: TObject);
|
||
begin
|
||
try
|
||
GridOrderListTV.DataController.BeginUpdate;
|
||
|
||
GridOrderListTV.DataController.RecordCount:=0;
|
||
|
||
finally
|
||
GridOrderListTV.DataController.EndUpdate;
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.FormClose(Sender: TObject; var Action: TCloseAction);
|
||
var
|
||
IniFile : TIniFile;
|
||
begin
|
||
IniFile := TIniFile.Create(inifilename);
|
||
try
|
||
IniFile.WriteInteger('Setting', 'top', top);
|
||
IniFile.WriteInteger('Setting', 'left', left);
|
||
finally
|
||
IniFile.Free;
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.FormCreate(Sender: TObject);
|
||
var
|
||
IniFile : TIniFile;
|
||
begin
|
||
|
||
inifilename := StringReplace(Application.ExeName,'.exe','.ini',[rfReplaceAll]);
|
||
|
||
IniFile := TIniFile.Create(inifilename);
|
||
try
|
||
top := IniFile.ReadInteger('Setting', 'top', 0);
|
||
left := IniFile.ReadInteger('Setting', 'left', 0);
|
||
finally
|
||
IniFile.Free;
|
||
end;
|
||
|
||
Pan_Login.Top := 0;
|
||
Pan_Login.Left := 0;
|
||
|
||
Pan_Main.Top := 0;
|
||
Pan_Main.Left := 0;
|
||
FqryList := nil;
|
||
|
||
pan_tab_1.Parent := Pan_default;
|
||
pan_tab_2.Parent := Pan_default;
|
||
pan_tab_3.Parent := Pan_default;
|
||
pan_tab_4.Parent := Pan_default;
|
||
pan_tab_5.Parent := Pan_default;
|
||
|
||
|
||
Pan_Setting.Parent := Pan_Login;
|
||
|
||
Pan_Setting.Top := 305;
|
||
Pan_Setting.Left := 500;
|
||
|
||
Pan_Setting.Visible := False;
|
||
|
||
Panel21.Parent := Panel14;
|
||
|
||
label_set_alclient;
|
||
|
||
Label4.Caption := FormatDateTime('yyyy-mm-dd hh:nn:ss ',now);
|
||
Label31.Caption := FormatDateTime('yyyy-mm-dd hh:nn:ss ',now);
|
||
|
||
pan_select(1);
|
||
Pan_Login.BringToFront;
|
||
end;
|
||
|
||
procedure TfKiosk.label_set_alclient;
|
||
begin
|
||
Label1.Align := alClient;
|
||
Label2.Align := alClient;
|
||
Label3.Align := alClient;
|
||
|
||
Label46.Align := alClient; // <20><>ǰ<EFBFBD><EFBFBD>_main bt
|
||
Label47.Align := alClient; // <20><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>_main bt
|
||
|
||
Label5.Align := alClient;
|
||
Label6.Align := alClient;
|
||
Label7.Align := alClient;
|
||
Label8.Align := alClient;
|
||
Label9.Align := alClient;
|
||
Label10.Align := alClient;
|
||
end;
|
||
|
||
procedure TfKiosk.FormDestroy(Sender: TObject);
|
||
begin
|
||
if FqryList <> nil then xFreeAll(FqryList);
|
||
end;
|
||
|
||
procedure TfKiosk.FormShow(Sender: TObject);
|
||
var
|
||
tmpStrs: TStrings;
|
||
begin
|
||
Memo1.Lines.Clear;
|
||
Memo2.Lines.Clear;
|
||
|
||
tmpStrs := TStringList.Create;
|
||
tmpStrs.Add('OBID'); tmpStrs.Add('Name'); tmpStrs.Add('wClassName');
|
||
tmpStrs.Add('CreateDate'); tmpStrs.Add('CreateTime'); tmpStrs.Add('CreatorID');
|
||
tmpStrs.Add('IsValid'); tmpStrs.Add('OrdCode'); tmpStrs.Add('Position');
|
||
tmpStrs.Add('Role'); tmpStrs.Add('InDate'); tmpStrs.Add('OutDate');
|
||
tmpStrs.Add('Status'); tmpStrs.Add('EmpTelNum'); tmpStrs.Add('EmpAddress');
|
||
tmpStrs.Add('Descriptions');
|
||
StringGrid1.ColCount := tmpStrs.Count;
|
||
StringGrid1.Rows[0].AddStrings(tmpStrs);
|
||
tmpStrs.Free;
|
||
xAutoResizeStringGridColumns(StringGrid1, Canvas);
|
||
end;
|
||
|
||
procedure TfKiosk.Image3Click(Sender: TObject);
|
||
begin
|
||
// ShowMessage('SETTING SHOW');
|
||
Pan_Setting.Visible := True;
|
||
Pan_Setting.BringToFront;
|
||
end;
|
||
|
||
procedure TfKiosk.pan_select(tag:integer);
|
||
begin
|
||
case tag of
|
||
1 : begin
|
||
Pan_1.Color := $00978F62;
|
||
Pan_2.Color := $00D3CFBA;
|
||
Pan_3.Color := $00D3CFBA;
|
||
Pan_4.Color := $00D3CFBA;
|
||
Pan_5.Color := $00D3CFBA;
|
||
pan_tab_1.BringToFront;
|
||
|
||
Button4.Click;
|
||
Button1.Click;
|
||
Button1.Click;
|
||
Button1.Click;
|
||
Button1.Click;
|
||
end;
|
||
2 : begin
|
||
Pan_1.Color := $00D3CFBA;
|
||
Pan_2.Color := $00978F62;
|
||
Pan_3.Color := $00D3CFBA;
|
||
Pan_4.Color := $00D3CFBA;
|
||
Pan_5.Color := $00D3CFBA;
|
||
pan_tab_2.BringToFront;
|
||
end;
|
||
3 : begin
|
||
Pan_1.Color := $00D3CFBA;
|
||
Pan_2.Color := $00D3CFBA;
|
||
Pan_3.Color := $00978F62;
|
||
Pan_4.Color := $00D3CFBA;
|
||
Pan_5.Color := $00D3CFBA;
|
||
pan_tab_3.BringToFront;
|
||
end;
|
||
4 : begin
|
||
Pan_1.Color := $00D3CFBA;
|
||
Pan_2.Color := $00D3CFBA;
|
||
Pan_3.Color := $00D3CFBA;
|
||
Pan_4.Color := $00978F62;
|
||
Pan_5.Color := $00D3CFBA;
|
||
pan_tab_4.BringToFront;
|
||
end;
|
||
5 : begin
|
||
Pan_1.Color := $00D3CFBA;
|
||
Pan_2.Color := $00D3CFBA;
|
||
Pan_3.Color := $00D3CFBA;
|
||
Pan_4.Color := $00D3CFBA;
|
||
Pan_5.Color := $00978F62;
|
||
pan_tab_5.BringToFront;
|
||
end;
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.Label12Click(Sender: TObject);
|
||
begin
|
||
Panel21.Parent := TabSheet1;
|
||
|
||
Panel31.Visible := (StrToInt(Edit20.Text) > 15);
|
||
end;
|
||
|
||
procedure TfKiosk.Label1Click(Sender: TObject);
|
||
begin
|
||
pan_select((Sender as TLabel).Tag);
|
||
end;
|
||
|
||
procedure TfKiosk.Label30Click(Sender: TObject);
|
||
begin
|
||
Panel22.Parent := TabSheet2;
|
||
|
||
Panel34.Visible := (StrToInt(Edit23.Text) > 15);
|
||
end;
|
||
|
||
procedure TfKiosk.Label4Click(Sender: TObject);
|
||
begin
|
||
Panel1.Visible := not Panel1.Visible;
|
||
if Panel1.Visible then
|
||
Panel1.BringToFront;
|
||
end;
|
||
|
||
procedure TfKiosk.Label5Click(Sender: TObject);
|
||
begin
|
||
Buttonselect((Sender as TLabel).Tag);
|
||
end;
|
||
|
||
procedure TfKiosk.BTCreate_1(page_no,count:integer);
|
||
const
|
||
ButtonWidth = 200;
|
||
ButtonHeight = 200;
|
||
ButtonWidthSpacing = 50;
|
||
ButtonHeightSpacing = 70;
|
||
ButtonsPerRow = 5; // <20><> <20>ٿ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><>ư<EFBFBD><C6B0> <20><>ġ<EFBFBD><C4A1><EFBFBD><EFBFBD>
|
||
var
|
||
i, Row, Col, x: Integer;
|
||
NewButton: TPanel;
|
||
NewLabel : TLabel;
|
||
begin
|
||
Panel21.Parent := TabSheet1;
|
||
|
||
// Panel1<6C><31> <20>ڽ<EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20><> TButton<6F><6E> ã<>Ƽ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||
for i := Panel14.ControlCount - 1 downto 0 do
|
||
begin
|
||
if Panel14.Controls[i] is TPanel then
|
||
Panel14.Controls[i].Free;
|
||
end;
|
||
if count <= 15 then
|
||
x := count
|
||
else
|
||
x := 15;
|
||
for i := 0 to x-1 do // <20><> 15<31><35> <20><><EFBFBD><EFBFBD>
|
||
begin
|
||
Row := i div ButtonsPerRow;
|
||
Col := i mod ButtonsPerRow;
|
||
|
||
NewButton := TPanel.Create(Self);
|
||
NewButton.Parent := Panel14;
|
||
NewButton.Width := ButtonWidth;
|
||
NewButton.Height := ButtonHeight;
|
||
NewButton.BevelOuter := bvNone;
|
||
NewButton.ParentBackground := False;
|
||
NewButton.ShowCaption := False;
|
||
|
||
if (i mod 2) = 0 then
|
||
NewButton.Color := $00978F62
|
||
else
|
||
NewButton.Color := $00D3CFBA;
|
||
|
||
NewButton.Left := Col * (ButtonWidth + ButtonWidthSpacing) + 50;
|
||
NewButton.Top := Row * (ButtonHeight + ButtonHeightSpacing) + 38;
|
||
|
||
NewButton.Name := Format('Bt_1_%d', [(page_no*15)+i+1]); // <20><><EFBFBD><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||
NewButton.Tag := i + 1; // <20><><EFBFBD><EFBFBD> <20><>ȣ <20>±<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||
|
||
NewLabel := TLabel.Create(Self);
|
||
NewLabel.Parent := NewButton;
|
||
NewLabel.Font.Size := 40;
|
||
NewLabel.Caption := #13 + Format('<27><EFBFBD>_%d', [(page_no*15)+i+1]) + #13 + '[000]';
|
||
NewLabel.Alignment := taCenter;
|
||
NewLabel.Align := alClient;
|
||
NewLabel.Tag := i + 1; // <20><><EFBFBD><EFBFBD> <20><>ȣ <20>±<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||
NewLabel.Name := Format('lb_1_%d', [(page_no*15)+i+1]); // <20><><EFBFBD><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||
|
||
NewLabel.OnClick := DynamicButton_1Click;
|
||
|
||
end;
|
||
|
||
Panel31.Visible := (count > 15);
|
||
|
||
Edit19.Text := inttostr(page_no+1);
|
||
Edit20.Text := IntToStr(count);
|
||
if (count mod 15) > 0 then begin
|
||
Edit21.Text := IntToStr((count div 15)+1);
|
||
end
|
||
else begin
|
||
Edit21.Text := IntToStr((count div 15));
|
||
end;
|
||
label44.Caption := inttostr(page_no+1)+ '/'+Edit21.Text;
|
||
end;
|
||
|
||
procedure TfKiosk.BTCreate_2(page_no,count:integer);
|
||
const
|
||
ButtonWidth = 200;
|
||
ButtonHeight = 200;
|
||
ButtonWidthSpacing = 50;
|
||
ButtonHeightSpacing = 70;
|
||
ButtonsPerRow = 5; // <20><> <20>ٿ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><>ư<EFBFBD><C6B0> <20><>ġ<EFBFBD><C4A1><EFBFBD><EFBFBD>
|
||
var
|
||
i, Row, Col, x: Integer;
|
||
NewButton: TPanel;
|
||
NewLabel: TLabel;
|
||
begin
|
||
Panel22.Parent := TabSheet2;
|
||
|
||
// Panel1<6C><31> <20>ڽ<EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20><> TButton<6F><6E> ã<>Ƽ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||
|
||
for i := Panel15.ControlCount - 1 downto 0 do
|
||
begin
|
||
if (Panel15.Controls[i] is TPanel) or (Panel15.Controls[i] is TLabel) then
|
||
Panel15.Controls[i].Free;
|
||
end;
|
||
|
||
if count <= 15 then
|
||
x := count
|
||
else
|
||
x := 15;
|
||
for i := 0 to x-1 do // <20><> 15<31><35> <20><><EFBFBD><EFBFBD>
|
||
begin
|
||
Row := i div ButtonsPerRow;
|
||
Col := i mod ButtonsPerRow;
|
||
|
||
NewButton := TPanel.Create(Self);
|
||
NewButton.Parent := Panel15;
|
||
NewButton.Width := ButtonWidth;
|
||
NewButton.Height := ButtonHeight;
|
||
NewButton.BevelOuter := bvNone;
|
||
NewButton.ParentBackground := False;
|
||
NewButton.ShowCaption := False;
|
||
|
||
if (i mod 2) = 0 then
|
||
NewButton.Color := $00978F62
|
||
else
|
||
NewButton.Color := $00D3CFBA;
|
||
|
||
NewButton.Left := Col * (ButtonWidth + ButtonWidthSpacing) + 50;
|
||
NewButton.Top := Row * (ButtonHeight + ButtonHeightSpacing) + 38;
|
||
|
||
NewButton.Name := Format('Bt_2_%d', [(page_no*15)+i+1]); // <20><><EFBFBD><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||
NewButton.Tag := i + 1; // <20><><EFBFBD><EFBFBD> <20><>ȣ <20>±<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||
|
||
NewLabel := TLabel.Create(Self);
|
||
NewLabel.Parent := NewButton;
|
||
NewLabel.Font.Size := 40;
|
||
NewLabel.Caption := #13 + Format('<27><><EFBFBD><EFBFBD>_%d', [(page_no*15)+i+1]) + #13 + '[000]';
|
||
NewLabel.Alignment := taCenter;
|
||
NewLabel.Align := alClient;
|
||
NewLabel.Tag := i + 1; // <20><><EFBFBD><EFBFBD> <20><>ȣ <20>±<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||
NewLabel.Name := Format('lb_2_%d', [(page_no*15)+i+1]); // <20><><EFBFBD><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||
|
||
NewLabel.OnClick := DynamicButton_2Click;
|
||
end;
|
||
|
||
Panel34.Visible := (count > 15);
|
||
|
||
Edit22.Text := inttostr(page_no+1);
|
||
Edit23.Text := IntToStr(count);
|
||
if (count mod 15) > 0 then begin
|
||
Edit24.Text := IntToStr((count div 15)+1);
|
||
end
|
||
else begin
|
||
Edit24.Text := IntToStr((count div 15));
|
||
end;
|
||
label45.Caption := inttostr(page_no+1)+ '/'+Edit24.Text;
|
||
end;
|
||
|
||
procedure TfKiosk.DynamicButton_1Click(Sender: TObject);
|
||
//var
|
||
// Btn: TLabel;
|
||
begin
|
||
// Btn := Sender as TLabel;
|
||
// ShowMessage(Format('Ŭ<><C5AC><EFBFBD><EFBFBD> <20><>ư <20><EFBFBD> : %s (Tag: %d)', [Btn.Name, Btn.Tag]));
|
||
|
||
Panel21.Parent := Panel14;
|
||
Panel21.BringToFront;
|
||
Panel21.Visible := True;;
|
||
|
||
// Panel31.Visible := (count > 15);
|
||
Panel31.Visible := false;
|
||
end;
|
||
|
||
procedure TfKiosk.DynamicButton_2Click(Sender: TObject);
|
||
//var
|
||
// Btn: TLabel;
|
||
begin
|
||
// Btn := Sender as TLabel;
|
||
// ShowMessage(Format('Ŭ<><C5AC><EFBFBD><EFBFBD> <20><>ư <20><><EFBFBD><EFBFBD> : %s (Tag: %d)', [Btn.Name, Btn.Tag]));
|
||
|
||
Panel22.Parent := Panel15;
|
||
Panel22.BringToFront;
|
||
Panel22.Visible := True;
|
||
|
||
Panel34.Visible := False;
|
||
end;
|
||
|
||
procedure TfKiosk.Label8Click(Sender: TObject);
|
||
begin
|
||
Buttonselect_1((Sender as TLabel).Tag);
|
||
end;
|
||
|
||
procedure TfKiosk.Buttonselect(tag:integer);
|
||
begin
|
||
case tag of
|
||
1 : begin
|
||
Panel5.Color := $00978F62;
|
||
Panel6.Color := $00D3CFBA;
|
||
Panel7.Color := $00D3CFBA;
|
||
BTCreate_1(0,10); // BTCreate_1(DBTable);
|
||
end;
|
||
2 : begin
|
||
Panel5.Color := $00D3CFBA;
|
||
Panel6.Color := $00978F62;
|
||
Panel7.Color := $00D3CFBA;
|
||
BTCreate_1(0,24); // BTCreate_1(DBTable);
|
||
end;
|
||
3 : begin
|
||
Panel5.Color := $00D3CFBA;
|
||
Panel6.Color := $00D3CFBA;
|
||
Panel7.Color := $00978F62;
|
||
BTCreate_1(0,7); // BTCreate_1(DBTable);
|
||
end;
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.Buttonselect_1(tag:integer);
|
||
begin
|
||
case tag of
|
||
1 : begin
|
||
Panel11.Color := $00978F62;
|
||
Panel12.Color := $00D3CFBA;
|
||
Panel13.Color := $00D3CFBA;
|
||
BTCreate_2(0,34); // BTCreate_2(DBTable);
|
||
end;
|
||
2 : begin
|
||
Panel11.Color := $00D3CFBA;
|
||
Panel12.Color := $00978F62;
|
||
Panel13.Color := $00D3CFBA;
|
||
BTCreate_2(0,13); // BTCreate_2(DBTable);
|
||
end;
|
||
3 : begin
|
||
Panel11.Color := $00D3CFBA;
|
||
Panel12.Color := $00D3CFBA;
|
||
Panel13.Color := $00978F62;
|
||
BTCreate_2(0,9); // BTCreate_2(DBTable);
|
||
end;
|
||
end;
|
||
end;
|
||
|
||
procedure TfKiosk.StringGrid1DblClick(Sender: TObject);
|
||
var
|
||
cidx, ridx: Integer;
|
||
curEmp: TEmpMst;
|
||
tmpForm: TfrmEditor;
|
||
begin
|
||
cidx := StringGrid1.Rows[0].IndexOf('OBID');
|
||
ridx := StringGrid1.Row;
|
||
if StringGrid1.Objects[cidx,ridx] = nil then Exit;
|
||
curEmp := TEmpMst(StringGrid1.Objects[cidx,ridx]);
|
||
|
||
tmpForm := TfrmEditor.Create(Self);
|
||
tmpForm.objEmp := curEmp;
|
||
if tmpForm.ShowModal = mrOk then begin
|
||
btQuery.OnClick(Sender);
|
||
end;
|
||
tmpForm.Free; tmpForm:=nil;
|
||
end;
|
||
|
||
procedure TfKiosk.Timer_datetimeTimer(Sender: TObject);
|
||
begin
|
||
Label4.Caption := FormatDateTime('yyyy-mm-dd hh:nn:ss ',now);
|
||
if Pan_Login.Visible then
|
||
Label31.Caption := FormatDateTime('yyyy-mm-dd hh:nn:ss ',now);
|
||
end;
|
||
|
||
procedure TfKiosk.ToggleSwitch1Click(Sender: TObject);
|
||
begin
|
||
if ToggleSwitch1.State = tssOn then
|
||
ToggleSwitch1.ThumbColor := clGreen
|
||
else
|
||
ToggleSwitch1.ThumbColor := clGray;
|
||
end;
|
||
|
||
end.
|