📄 u_main.pas
字号:
t_ctyx.Enabled:=fieldbyname('q_ctyx').AsBoolean;
mz_gtsp.Enabled:=fieldbyname('q_gtsp').AsBoolean;
t_gtsp.Enabled:=fieldbyname('q_gtsp').AsBoolean;
mi_qtyy.Enabled:=fieldbyname('q_qtyy').AsBoolean;
t_qtyy.Enabled:=fieldbyname('q_qtyy').AsBoolean;
mi_ctyl.Enabled:=fieldbyname('q_ctyl').AsBoolean;
mi_qdjz.Enabled:=fieldbyname('q_qdjz').AsBoolean;
t_qdjz.Enabled:=fieldbyname('q_qdjz').AsBoolean;
mi_qtdz.Enabled:=fieldbyname('q_qtdz').AsBoolean;
t_qtdz.Enabled:=fieldbyname('q_qtdz').AsBoolean;
mi_yycx.Enabled:=fieldbyname('q_yycx').AsBoolean;
t_yycx.Enabled:=fieldbyname('q_yycx').AsBoolean;
mb.Enabled:=fieldbyname('q_yybb').AsBoolean;
t_yybb.Enabled:=fieldbyname('q_yybb').AsBoolean;
mf.Enabled:=fieldbyname('q_yyfx').AsBoolean;
t_yyfx.Enabled:=fieldbyname('q_yyfx').AsBoolean;
end;
end;
function Tmain.h_count(s_sql:string):Integer;
begin
with query1 do
begin
active:=false;
sql.Clear;
sql.add(s_sql);
active:=true;
h_count:=fieldbyname('hj').asinteger;
end;
end;
function Tmain.h_only(s_sql,string1,string2:string):Integer;
begin
with query1 do
begin
active:=false;
sql.Clear;
sql.add(s_sql);
ParamByName(string1).asstring:=string2;
active:=true;
h_only:=recordcount;
end;
end;
procedure Tmain.h_del(s_sql:string);
begin
with query1 do
begin
sql.Clear;
sql.add(s_sql);
ExecSQL;
end;
end;
procedure Tmain.h_del_p1(string1,string2:string;s_sql:string);
begin
with query1 do
begin
sql.Clear;
sql.add(s_sql);
ParamByName(string1).asstring:=string2;
ExecSQL;
end;
end;
function Tmain.h_sum(s_sql:string):currency;
begin
with query1 do
begin
active:=false;
sql.Clear;
sql.add(s_sql);
active:=true;
h_sum:=fieldbyname('hj').asfloat;
end;
end;
procedure Tmain.my_fdxxClick(Sender: TObject);
begin
if s_fdxx=NIL then s_fdxx:=Ts_fdxx.Create(self);
S_FDXX.showmodal;
end;
procedure Tmain.quitClick(Sender: TObject);
begin
if messagebox(handle,'真的要退出该系统吗?!','系统提示信息',
MB_OKCANCEL+MB_ICONQUESTION)=IDOK then
close;
end;
procedure Tmain.my_yyflClick(Sender: TObject);
begin
if s_yyfl=NIL then s_yyfl:=Ts_yyfl.Create(self);
s_yyfl.showmodal;
end;
procedure Tmain.my_zhszClick(Sender: TObject);
begin
if s_zhsz=NIL then s_zhsz:=Ts_zhsz.Create(self);
s_zhsz.showmodal;
end;
procedure Tmain.my_ctbzClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if s_ctbz=NIL then s_ctbz:=Ts_ctbz.Create(self);
s_ctbz.showmodal;
end;
procedure Tmain.mz_cpzzClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if z_cpzz=NIL then z_cpzz:=Tz_cpzz.Create(Application);
z_cpzz.showmodal;
end;
procedure Tmain.mz_ckglClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if z_ckgl=NIL then z_ckgl:=Tz_ckgl.Create(self);
z_ckgl.showmodal;
end;
procedure Tmain.mz_ctyxClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if z_ctyx=NIL then z_ctyx:=Tz_ctyx.Create(Application);
z_ctyx.showmodal;
end;
procedure Tmain.mz_gtspClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if z_gtsp=NIL then z_gtsp:=Tz_gtsp.Create(Application);
z_gtsp.showmodal;
end;
procedure Tmain.T_ckglClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if z_ckgl=NIL then z_ckgl:=Tz_ckgl.Create(self);
z_ckgl.showmodal;
end;
procedure Tmain.FormShow(Sender: TObject);
begin
//把饭店编号和收款台号赋给全局变量
with main.fdxx do
begin
if recordcount=0 then
begin
append;
s_fdbh:='0';
s_skth:='00';
s_gtbh:='00';
messagebox(main.handle,'营业设置里某些数据已更改,请重新设置!','系统提示信息',MB_OK+MB_ICONWARNING)
end
else
begin
s_fdbh:=fieldbyname('fdbh').asstring;
s_fdmc:=fieldbyname('fdmc').asstring;
s_skth:=fieldbyname('skth').asstring;
s_gtbh:=fieldbyname('gtbh').asstring;
end;
end;
xs:=false;
// sb.Panels[2].text:=s_fdmc;
sb.Panels[4].text:=s_czym;
sb.Panels[5].text:=datetimetostr(date());
hbqxsz(s_czyh);
hbjd.Close;
end;
procedure Tmain.helpClick(Sender: TObject);
begin
Application.HelpFile:='c:\hbjd\cyzy\help\hbcy.hlp';
Application.HelpJump('tascontents');
//messagebox(handle,'您的计算机没有安装帮助系统!','系统提示信息',MB_OK+MB_ICONWARNING)
end;
procedure Tmain.MenuItem76Click(Sender: TObject);
begin
if about=NIL then about:=Tabout.Create(self);
about.showmodal;
end;
procedure Tmain.ms_ghczyClick(Sender: TObject);
begin
if x_ghczy=NIL then x_ghczy:=Tx_ghczy.create(self);
x_ghczy.showmodal;
end;
procedure Tmain.ms_czyglClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if x_czygl=NIL then x_czygl:=Tx_czygl.Create(Application);
x_czygl.showmodal;
end;
procedure Tmain.mz_bzglClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if z_bz=NIL then z_bz:=Tz_bz.Create(Application);
z_bz.showmodal;
end;
procedure Tmain.mf_sdxsClick(Sender: TObject);
begin
i_fx:=0;
yyfx;
end;
procedure Tmain.mf_jzfsClick(Sender: TObject);
begin
i_fx:=2;
yyfx;
end;
procedure Tmain.mf_xflbClick(Sender: TObject);
begin
i_fx:=3;
yyfx;
end;
procedure Tmain.mf_srlbClick(Sender: TObject);
begin
i_fx:=5;
yyfx;
end;
procedure Tmain.mf_ctxsClick(Sender: TObject);
begin
i_fx:=6;
yyfx;
end;
procedure Tmain.mf_clxsClick(Sender: TObject);
begin
i_fx:=7;
yyfx;
end;
procedure Tmain.mf_cyxsClick(Sender: TObject);
begin
i_fx:=8;
yyfx;
end;
procedure Tmain.mf_krtcClick(Sender: TObject);
begin
i_fx:=9;
yyfx;
end;
procedure Tmain.mf_krrsClick(Sender: TObject);
begin
i_fx:=11;
yyfx;
end;
procedure Tmain.mf_ckxfClick(Sender: TObject);
begin
i_fx:=12;
yyfx;
end;
procedure Tmain.mf_tcyyClick(Sender: TObject);
begin
i_fx:=10;
yyfx;
end;
procedure Tmain.mi_yycxClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if y_yycx=NIL then y_yycx:=Ty_yycx.Create(self);
y_yycx.showmodal;
end;
procedure Tmain.ms_xtcshClick(Sender: TObject);
begin
if x_xtcsh=NIL then x_xtcsh:=Tx_xtcsh.Create(Application);
x_xtcsh.showmodal;
end;
procedure Tmain.ms_sjbfClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
y_n:=0;
if x_sjbf=NIL then x_sjbf:=Tx_sjbf.Create(Application);
x_sjbf.showmodal;
end;
procedure Tmain.ms_sjhfClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
y_n:=1;
if x_sjbf=NIL then x_sjbf:=Tx_sjbf.Create(Application);
x_sjbf.showmodal;
end;
procedure Tmain.Timer1Timer(Sender: TObject);
begin
if xs then
begin
sb.Panels[1].text:='软件提供';
sb.Panels[2].text:='郑州恒邦计算机系统工程有限公司<0371-8979138>';
xs:=false;
end
else
begin
sb.Panels[1].text:='软件使用权属于';
sb.Panels[2].text:='河南省德鼎脸谱时尚广场';
xs:=true;
end;
end;
procedure Tmain.my_ctckClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if s_ctck=NIL then s_ctck:=Ts_ctck.Create(self);
s_ctck.showmodal;
end;
procedure Tmain.mz_cpckClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if z_cpck=NIL then z_cpck:=Tz_cpck.Create(Application);
z_cpck.showmodal;
end;
procedure Tmain.MenuItem18Click(Sender: TObject);
begin
PrinterSetup.Execute;
end;
procedure Tmain.mf_fwyxsClick(Sender: TObject);
begin
i_fx:=1;
yyfx;
end;
procedure Tmain.mb_yybbClick(Sender: TObject);
begin
if b_yyrb=NIL then b_yyrb:=Tb_yyrb.Create(Application);
b_yyrb.showmodal;
end;
procedure Tmain.mb_sdbbClick(Sender: TObject);
begin
if b_sdbb=NIL then b_sdbb:=Tb_sdbb.Create(Application);
b_sdbb.showmodal;
end;
procedure Tmain.mi_qtdzClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if y_qtdz=NIL then y_qtdz:=Ty_qtdz.Create(self);
y_qtdz.showmodal;
end;
procedure Tmain.mi_qtyyClick(Sender: TObject);
begin
if y_yyt_login=NIL then y_yyt_login:=Ty_yyt_login.Create(self);
y_yyt_login.showmodal;
end;
procedure Tmain.mi_qdjzClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if y_qdjz=NIL then y_qdjz:=Ty_qdjz.Create(self);
y_qdjz.showmodal;
end;
procedure Tmain.mi_ctylClick(Sender: TObject);
begin
y_ctyl.showmodal;
end;
procedure Tmain.mz_ctbzClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if s_ctbz=NIL then s_ctbz:=Ts_ctbz.Create(self);
s_ctbz.showmodal;
end;
procedure Tmain.mz_ctckClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if s_ctck=NIL then s_ctck:=Ts_ctck.Create(self);
s_ctck.showmodal;
end;
procedure Tmain.mf_yylxClick(Sender: TObject);
begin
i_fx:=4;
yyfx;
end;
procedure Tmain.mz_ryglClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if z_rygl=NIL then z_rygl:=Tz_rygl.Create(Application);
z_rygl.showmodal;
end;
procedure Tmain.FormDeactivate(Sender: TObject);
begin
Timer1.Enabled:=true;
end;
procedure Tmain.N16Click(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if z_cbkz=NIL then z_cbkz:=Tz_cbkz.Create(Application);
z_cbkz.showmodal;
end;
procedure Tmain.FormHide(Sender: TObject);
begin
Timer1.Enabled:=false;
end;
procedure Tmain.mz_yhydClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if z_yhyd=NIL then z_yhyd:=Tz_yhyd.Create(self);
z_yhyd.showmodal;
end;
procedure Tmain.cyxsClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if b_cyxs=NIL then b_cyxs:=Tb_cyxs.Create(self);
b_cyxs.showmodal;
end;
procedure Tmain.ctxsClick(Sender: TObject);
begin
g_wait.show;
g_wait.Update;
if b_ctxs=NIL then b_ctxs:=Tb_ctxs.Create(self);
b_ctxs.showmodal;
end;
procedure Tmain.MenuItem74Click(Sender: TObject);
begin
Application.HelpFile:='c:\hbjd\cyzy\help\hbcy.hlp';
Application.HelpCommand(Help_Finder,0);
end;
procedure Tmain.N25Click(Sender: TObject);
begin
Application.HelpFile:='c:\hbjd\cyzy\help\hbcy.hlp';
Application.HelpCommand(Help_PartialKey,0);
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -