📄 djmenu.pas
字号:
ListView2.Items.Add;
ListView2.Items[0].ImageIndex:=58;
ListView2.Items[0].Caption:=M1.Caption;
ListView2.Items.Add;
ListView2.Items[1].ImageIndex:=7;
ListView2.Items[1].Caption:=M2.Caption;
ListView2.Items.Add;
ListView2.Items[2].ImageIndex:=59;
ListView2.Items[2].Caption:=M3.Caption;
ListView2.Items.Add;
ListView2.Items[3].ImageIndex:=12;
ListView2.Items[3].Caption:=M4.Caption;
ListView2.Items.Add;
ListView2.Items[4].ImageIndex:=60;
ListView2.Items[4].Caption:=M5.Caption;
ListView2.Items.Add;
ListView2.Items[5].ImageIndex:=61;
ListView2.Items[5].Caption:=M6.Caption;
ListView2.Items.Add;
ListView2.Items[6].ImageIndex:=45;
ListView2.Items[6].Caption:=M7.Caption;
{ ListView2.Items.Add;
ListView2.Items[7].ImageIndex:=23;
ListView2.Items[7].Caption:=M8.Caption;
ListView2.Items.Add;
ListView2.Items[8].ImageIndex:=40;
ListView2.Items[8].Caption:=M9.Caption;
{ ListView2.Items.Add;
ListView2.Items[9].ImageIndex:=52;
ListView2.Items[9].Caption:=M10.Caption; }
end ;
{ else
begin
Panel4.Visible:=true;
Panel4.Caption:='您无权使用'+M0.Caption+'!请与系统管理员联系!';
end; }
// end;
// 2:begin //客人消费
if (T0.Enabled)and(ListView1.Selected.Caption='客人消费') then
begin
ListView2.Items.Clear;
Panel4.Visible:=false;
ListView2.Items.Add;
ListView2.Items[0].ImageIndex:=28;
ListView2.Items[0].Caption:=T1.Caption;
ListView2.Items.Add;
ListView2.Items[1].ImageIndex:=29;
ListView2.Items[1].Caption:=T3.Caption;
ListView2.Items.Add;
ListView2.Items[2].ImageIndex:=22;
ListView2.Items[2].Caption:=t21.Caption;
ListView2.Items.Add;
ListView2.Items[3].ImageIndex:=17;
ListView2.Items[3].Caption:=t22.Caption;
{ ListView2.Items.Add;
ListView2.Items[4].ImageIndex:=41;
ListView2.Items[4].Caption:=T4.Caption; }
ListView2.Items.Add;
ListView2.Items[4].ImageIndex:=24;
ListView2.Items[4].Caption:=T5.Caption;
ListView2.Items.Add;
ListView2.Items[5].ImageIndex:=25;
ListView2.Items[5].Caption:=T7.Caption;
end ;
{ else
begin
Panel4.Visible:=true;
Panel4.Caption:='您无权使用'+T0.Caption+'!请与系统管理员联系!';
end; }
// end;
// 3:begin //帐务处理
if (X0.Enabled)and(ListView1.Selected.Caption='帐务处理') then
begin
ListView2.Items.Clear;
Panel4.Visible:=false;
ListView2.Items.Add;
ListView2.Items[0].ImageIndex:=23;
ListView2.Items[0].Caption:=X7.Caption;
ListView2.Items.Add;
ListView2.Items[1].ImageIndex:=15;
ListView2.Items[1].Caption:=X1.Caption;
ListView2.Items.Add;
ListView2.Items[2].ImageIndex:=4;
ListView2.Items[2].Caption:=X3.Caption;
ListView2.Items.Add;
ListView2.Items[3].ImageIndex:=55;
ListView2.Items[3].Caption:=x4.Caption;
ListView2.Items.Add;
ListView2.Items[4].ImageIndex:=28;
ListView2.Items[4].Caption:=X5.Caption;
ListView2.Items.Add;
ListView2.Items[5].ImageIndex:=29;
ListView2.Items[5].Caption:=X6.Caption;
ListView2.Items.Add;
ListView2.Items[6].ImageIndex:=31;
ListView2.Items[6].Caption:=X2.Caption;
ListView2.Items.Add;
ListView2.Items[7].ImageIndex:=51;
ListView2.Items[7].Caption:=x13.Caption;
ListView2.Items.Add;
ListView2.Items[8].ImageIndex:=0;
ListView2.Items[8].Caption:=x15.Caption;
ListView2.Items.Add;
ListView2.Items[9].ImageIndex:=12;
ListView2.Items[9].Caption:=x10.Caption;
ListView2.Items.Add;
ListView2.Items[10].ImageIndex:=40;
ListView2.Items[10].Caption:=x16.Caption;
end ;
{ else
begin
Panel4.Visible:=true;
Panel4.Caption:='您无权使用'+X0.Caption+'!请与系统管理员联系!';
end; }
// end;
// 4:begin //总台查询
// ListView2.Items.Clear;
if (v0.Enabled)and(ListView1.Selected.Caption='总台查询') then
begin
ListView2.Items.Clear;
Panel4.Visible:=false;
ListView2.Items.Add;
ListView2.Items[0].ImageIndex:=41;
ListView2.Items[0].Caption:=v1.Caption;
ListView2.Items.Add;
ListView2.Items[1].ImageIndex:=11;
ListView2.Items[1].Caption:=v2.Caption;
ListView2.Items.Add;
ListView2.Items[2].ImageIndex:=53;
ListView2.Items[2].Caption:=v3.Caption;
ListView2.Items.Add;
ListView2.Items[3].ImageIndex:=54;
ListView2.Items[3].Caption:=v4.Caption;
ListView2.Items.Add;
ListView2.Items[4].ImageIndex:=57;
ListView2.Items[4].Caption:=v5.Caption;
ListView2.Items.Add;
ListView2.Items[5].ImageIndex:=5;
ListView2.Items[5].Caption:=v6.Caption;
ListView2.Items.Add;
ListView2.Items[6].ImageIndex:=35;
ListView2.Items[6].Caption:=v7.Caption;
ListView2.Items.Add;
ListView2.Items[7].ImageIndex:=51;
ListView2.Items[7].Caption:=v8.Caption;
ListView2.Items.Add;
ListView2.Items[8].ImageIndex:=0;
ListView2.Items[8].Caption:=v9.Caption;
end;
{ else
begin
Panel4.Visible:=true;
Panel4.Caption:='您无权使用'+v0.Caption+'!请与系统管理员联系!';
end; }
// end;
// 5:begin //报表查询
// ListView2.Items.Clear;
if (c0.Enabled)and(ListView1.Selected.Caption='报表查询') then
begin
ListView2.Items.Clear;
Panel4.Visible:=false;
ListView2.Items.Add;
ListView2.Items[0].ImageIndex:=19;
ListView2.Items[0].Caption:=c1.Caption;
ListView2.Items.Add;
ListView2.Items[1].ImageIndex:=22;
ListView2.Items[1].Caption:=c2.Caption;
ListView2.Items.Add;
ListView2.Items[2].ImageIndex:=43;
ListView2.Items[2].Caption:=c3.Caption;
ListView2.Items.Add;
ListView2.Items[3].ImageIndex:=10;
ListView2.Items[3].Caption:=c12.Caption;
{ ListView2.Items.Add;
ListView2.Items[3].ImageIndex:=14;
ListView2.Items[3].Caption:=c4.Caption;
ListView2.Items.Add;
ListView2.Items[4].ImageIndex:=28;
ListView2.Items[4].Caption:=W5.Caption;
end; }
end ;
{ else
begin
Panel4.Visible:=true;
Panel4.Caption:='您无权使用'+c0.Caption+'!请与系统管理员联系!';
end; }
// end;
// end;
if (f0.Enabled)and(ListView1.Selected.Caption='房态维护') then
begin
ListView2.Items.Clear;
Panel4.Visible:=false;
ListView2.Items.Add;
ListView2.Items[0].ImageIndex:=41;
ListView2.Items[0].Caption:=f1.Caption;
end ;
end;
procedure Tmenu.ListView2Click(Sender: TObject);
begin
if (ListView1.Selected=nil) or (ListView2.Selected=nil) then exit;
// case ListView1.Selected.Index of
// 0:begin //总台登记 (z)
if (z0.Enabled)and(ListView1.Selected.Caption='总台登记') then
begin
case ListView2.Selected.Index of
0:Z1Click(nil);
1:Z2Click(nil);
2:Z3Click(nil);
// 3:Z4Click(nil);
{ 4:Z5Click(nil);
5:Z6Click(nil);
// 6:Z7Click(nil);
6:Z8Click(nil);
7:Z9Click(nil);
8:Z10Click(nil); }
end;
end;
// 1:begin //客房调换 (M)
if (m0.Enabled)and(ListView1.Selected.Caption='客房调换') then
begin
case ListView2.Selected.Index of
0:M1Click(nil);
1:M2Click(nil);
2:M3Click(nil);
3:M4Click(nil);
4:M5Click(nil);
5:M6Click(nil);
6:M7Click(nil);
// 7:M8Click(nil);
// 8:M9Click(nil);
// 9:M10Click(nil);
end;
end;
// 2:begin //客人消费(T)
if (T0.Enabled)and(ListView1.Selected.Caption='客人消费') then
begin
case ListView2.Selected.Index of
0:T1Click(nil);
1:T3Click(nil);
2:t21Click(nil);
3:t22Click(nil);
// 4:T4Click(nil);
4:T5Click(nil);
5:T7Click(nil);
end;
end;
// 3:begin //帐务处理(X)
if (X0.Enabled)and(ListView1.Selected.Caption='帐务处理') then
begin
case ListView2.Selected.Index of
0:X7Click(nil);
1:X1Click(nil);
2:X3Click(nil);
3:X4Click(nil);
4:X5Click(nil);
5:X6Click(nil);
6:X2Click(nil);
7:X13Click(nil);
8:X15Click(nil);
9:X10Click(nil);
10:X16Click(nil);
end;
end;
// 4:begin //设置(v)
if (v0.Enabled)and(ListView1.Selected.Caption='总台查询') then
begin
case ListView2.Selected.Index of
0:v1Click(nil);
1:v2Click(nil);
2:v3Click(nil);
3:v4Click(nil);
4:v5Click(nil);
5:v6Click(nil);
6:v7Click(nil);
7:v8Click(nil);
8:v9Click(nil);
end;
end;
// 5:begin //报表查询(c)
if (c0.Enabled)and(ListView1.Selected.Caption='报表查询') then
begin
case ListView2.Selected.Index of
0:c1Click(nil);
1:c2Click(nil);
2:c3Click(nil);
3:c12Click(nil);
//4:W5Click(nil);
// 5:W6Click(nil);
// 6:W7Click(nil);
// 7:W8Click(nil);
// 8:W9Click(nil);
// 9:W10Click(nil);
// 10:W11Click(nil);
end;
end;
if (f0.Enabled)and(ListView1.Selected.Caption='房态维护') then
begin
case ListView2.Selected.Index of
0:f1Click(nil);
end;
end;
// END;
end;
///////////////////////////////////////////////////////////////
procedure Tmenu.z1Click(Sender: TObject);
begin
Application.CreateForm(Tdjform, djform);
djform.showmodal;
djform.free;
end;
procedure Tmenu.FormCreate(Sender: TObject);
begin
if (not FileExists('c:\windows\system\Dpnodemx.DLL')) and (not FileExists('c:\winnt\system32\Dpnodemx.DLL')) then
begin
// close;
end;
try
//ComboBox1.Items.LoadFromFile('E:\hy\家园复件 SOURCE6hy'+'\cwsys.dll');
ComboBox1.Items.LoadFromFile(curper.workpath+'\cwsys.dll');
except
end;
lc:=trim(copy(ComboBox1.Items[0],10,40));
xt:=0;
fm.query1.close;
fm.query1.sql.clear;
fm.query1.sql.add('Select UnitName from syssetup');
fm.query1.open;
curper.sydw:=trim(unpassname(fm.query1.Fields[0].asstring));
Label1.Caption:=curper.sydw+'酒店管理系统';
Label1.Left:=strtoint(floattostr(int((Width-Label1.Width)/2)));
Label2.Left:=Width-Label2.Width-10;
fm.query1.close;
fm.Query1.UnPrepare;
fm.query1.RequestLive:=false;
{Timer1Timer(nil); }
end;
procedure Tmenu.FormClose(Sender: TObject; var Action: TCloseAction);
begin
// if curper.code<>'' then
// addlogo(curper.code,datetimetostr(now),'退出系统');
// exitwindowsex(EWX_shutdown,0);
// Halt;
end;
procedure Tmenu.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
try
if key=113 then
begin
cscxForm.Query1.Active:=false;
cscxForm.Query1.SQL.Clear;
cscxForm.Query1.SQL.Add('select *,'''' from fzdbjcx where substring(手号,1,1) in ('+lc+')');
cscxForm.Query1.SQL.Add('union (select *,'''' from zdbjcx where substring(手号,1,1) in ('+lc+'))');
cscxForm.Query1.SQL.Add('union (select * from sancx where sex in ('+lc+'))');
cscxForm.Query1.Open;
cscxForm.Show;
end;
if key=114 then
begin
hkcscxForm.Query1.Active:=false;
hkcscxForm.Query1.SQL.Clear;
hkcscxForm.Query1.SQL.Add('select * from guest where substring(roomno,1,1) in ('+lc+')');
hkcscxForm.Query1.Open;
hkcscxForm.Show;
end;
except
end;
if key=112 then
N25Click(nil);
if key=13 then
begin
if z0.Enabled then
begin
Application.CreateForm(Tdjform, djform);
djform.showmodal;
djform.free;
exit;
end;
if x0.Enabled then
begin
Application.CreateForm(Tnewjz, newjz);
newjz.showmodal;
newjz.free;
exit;
end;
if t0.Enabled then
begin
Application.CreateForm(Txfform, xfform);
xfform.showmodal;
xfform.free;
exit;
end;
if v0.Enabled then
begin
Application.CreateForm(Txgftform, xgftform);
xgftform.showmodal;
xgftform.free;
exit;
end;
end;
end;
procedure Tmenu.n15Click(Sender: TObject);
begin
close;
end;
procedure Tmenu.t1Click(Sender: TObject);
begin
Application.CreateForm(Txfform, xfform);
xfform.showmodal;
xfform.free;
end;
procedure Tmenu.x9Click(Sender: TObject);
begin
Application.CreateForm(Tjbform1, jbform1);
jbform1.showmodal;
if not jbform1.Panel3.Enabled then
begin
jbform1.free;
N6Click(nil);
end
else
jbform1.free;
end;
procedure Tmenu.z9Click(Sender: TObject);
begin
Application.CreateForm(TrzForm, rzForm);
rzForm.showmodal;
rzForm.free;
end;
procedure Tmenu.x4Click(Sender: TObject);
begin
Application.CreateForm(Tunlockall, unlockall);
unlockall.showmodal;
unlockall.free;
end;
procedure Tmenu.x1Click(Sender: TObject);
begin
Application.CreateForm(Taddyj, addyj);
addyj.showmodal;
addyj.free;
end;
procedure Tmenu.n10Click(Sender: TObject);
begin
Application.CreateForm(Tchangepass, changepass);
changepass.showmodal;
changepass.free;
end;
procedure Tmenu.n25Click(Sender: TObject);
begin
Application.CreateForm(TAboutBox, AboutBox);
AboutBox.showmodal;
aboutbox.free;
end;
procedure Tmenu.n24Click(Sender: TObject);
begin
// winhelp(0,Pchar('前台帮助.hlp'),HELP_FINDER,0);
end;
procedure Tmenu.x5Click(Sender: TObject);
begin
Application.CreateForm(Tzzform, zzform);
zzform.showmodal;
zzform.free;
end;
procedure Tmenu.x7Click(Sender: TObject);
begin
Application.CreateForm(Tnewjz, newjz);
newjz.showmodal;
newjz.free;
end;
procedure Tmenu.x8Click(Sender: TObject);
begin
Application.CreateForm(Tjkform, jkform);
jkform.showmodal;
end;
procedure Tmenu.m1Click(Sender: TObject);
var ls:string;
begin
ls:='';
{ Application.CreateForm(Tqxrzform, qxrzform);
qxrzform.showmodal;
if qxrzform.name.Caption<>'' then ls:=qxrzform.name.Caption;
qxrzform.free;
if ls<>'' then
begin }
Application.CreateForm(Thfform, hfform);
hfform.czy.Text:=ls;
hfform.showmodal;
hfform.Free;
{ end else
Application.MessageBox('不能换房','提示信息',48); }
end;
procedure Tmenu.m2Click(Sender: TObject);
var ls:string;
begin
ls:='';
{Application.CreateForm(Tqxrzform, qxrzform);
qxrzform.showmodal;
if qxrzform.name.Caption<>'' then ls:=qxrzform.name.Caption;
qxrzform.free;
if ls<>'' then
begin }
Application.CreateForm(Trmhsan, rmhsan);
rmhsan.czy.text:=ls;
rmhsan.showmodal;
rmhsan.free;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -