📄 bkzlhf.pas
字号:
unit bkzlhf;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Spin, Mask, ExtCtrls, Db, DBTables;
type
TbkzlhfForm = class(TForm)
Bevel3: TBevel;
Label4: TLabel;
Label5: TLabel;
Button3: TButton;
Button4: TButton;
roomno: TEdit;
rmmoney: TSpinEdit;
Label1: TLabel;
SpinEdit1: TSpinEdit;
Query1: TQuery;
GroupBox2: TGroupBox;
bzf: TRadioButton;
zd: TRadioButton;
swf: TRadioButton;
GroupBox3: TGroupBox;
hyj: TRadioButton;
gbj: TRadioButton;
th: TRadioButton;
bzj: TRadioButton;
CheckBox1: TCheckBox;
Panel1: TPanel;
Label7: TLabel;
Label9: TLabel;
Label10: TLabel;
Label11: TLabel;
Label13: TLabel;
Label6: TLabel;
name: TEdit;
id: TMaskEdit;
GroupBox1: TGroupBox;
man: TRadioButton;
woman: TRadioButton;
liang: TRadioButton;
zj: TComboBox;
age: TSpinEdit;
workdw: TMaskEdit;
rs: TSpinEdit;
Bevel1: TBevel;
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure zdClick(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
bkzlhfForm: TbkzlhfForm;
implementation
uses dataproc, hf;
{$R *.DFM}
procedure TbkzlhfForm.Button3Click(Sender: TObject);
begin
hfform.SpinEdit1.Value:=SpinEdit1.Value;
hfform.rmmoney.Value:=rmmoney.Value;
close;
end;
procedure TbkzlhfForm.Button4Click(Sender: TObject);
begin
close;
end;
procedure TbkzlhfForm.FormShow(Sender: TObject);
begin
// comadd(zj,1,'select name from zj');
// name.SetFocus;
end;
procedure TbkzlhfForm.zdClick(Sender: TObject);
begin
query1.Active:=false;
query1.SQL.Clear;
query1.SQL.Add('select * from roomtype where roomtype in (select roomtype from room1 where roomno='''+trim(roomno.Text)+''')');
query1.Prepare;
query1.Open;
if bzf.Checked then
begin
bzj.Enabled:=true;
hyj.Enabled:=(trim(hfform.djfs.text)='会员卡') ;
gbj.Enabled:=true;
th.Enabled:=query1.Fieldbyname('select1').asboolean;
SpinEdit1.text:=query1.Fieldbyname('Turntime').asstring;
if bzj.Checked then
rmmoney.Text:=query1.Fieldbyname('Price').asstring;
if hyj.Checked then
begin
rmmoney.Text:=query1.Fieldbyname('hyprice12').asstring;
hfform.hfr.Caption:=curper.name+'会员';
end;
if gbj.Checked then
begin
rmmoney.Text:=query1.Fieldbyname('vipprice12').asstring;
hfform.hfr.Caption:=curper.name+'贵宾';
end;
if th.Checked then
begin
rmmoney.Text:=query1.Fieldbyname('troomprice1').asstring;
hfform.hfr.Caption:=curper.name+'特惠';
end;
end else
begin
if zd.Checked then
begin
bzj.Checked:=true;
hyj.Enabled:=false;
gbj.Enabled:=false;
th.Enabled:=false;
SpinEdit1.text:=query1.Fieldbyname('Zdturntime').asstring;
rmmoney.Text:=query1.Fieldbyname('Zdprice').asstring;
end else
begin
if swf.Checked then
begin
bzj.Enabled:=true;
hyj.Enabled:=(trim(hfform.djfs.text)='会员卡') ;
gbj.Enabled:=true;
th.Enabled:=query1.Fieldbyname('select2').asboolean;
SpinEdit1.text:=query1.Fieldbyname('Turntime2').asstring;
if bzj.Checked then
rmmoney.Text:=query1.Fieldbyname('roomprice').asstring;
if hyj.Checked then
begin
rmmoney.Text:=query1.Fieldbyname('hyprice24').asstring;
hfform.hfr.Caption:=curper.name+'会员';
end;
if gbj.Checked then
begin
rmmoney.Text:=query1.Fieldbyname('vipprice24').asstring;
hfform.hfr.Caption:=curper.name+'贵宾';
end;
if th.Checked then
begin
rmmoney.Text:=query1.Fieldbyname('troomprice2').asstring;
hfform.hfr.Caption:=curper.name+'特惠';
end;
end;
end;
end;
if (not hyj.Checked) and (not gbj.Checked) and (not th.Checked) then
hfform.hfr.Caption:='';
end;
procedure TbkzlhfForm.CheckBox1Click(Sender: TObject);
begin
if CheckBox1.Checked then
begin
bkzlhfForm.ClientHeight:=244;
bkzlhfForm.ClientWidth:=285;
Bevel1.Visible:=true;
panel1.Visible:=true;
end else
begin
bkzlhfForm.ClientHeight:=154;
bkzlhfForm.ClientWidth:=285;
Bevel1.Visible:=false;
panel1.Visible:=false;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -