📄 mainunt.pas
字号:
showmessage('没有此会员,请核对一下!');
edit5.Text:='';
end
else
begin
edit4.Text:=dataman.vipQuery.fields.Fields[0].Value;
edit7.Text:=floattostr(dataman.vipQuery.fields.Fields[1].value);
with dataman.vipQuery do
begin
close;
sql.Clear;
sql.Add('select 会员消费总金额 from consume where consume.VIP卡号 =:kh');
parameters.ParamByName('kh').Value:=trim(edit5.Text);
prepared;
open;
end;
if dataman.vipQuery.IsEmpty then
edit6.Text:='0'
else
edit6.Text:=floattostr(dataman.vipQuery.fields.Fields[0].Value);
end;
edit1.Text:='';
edit1.SetFocus;
end;
end;
procedure Tmain.Timer1Timer(Sender: TObject);
var
i,total_quatity:integer;
total_price:double;
begin
total_price :=0;
total_quatity :=0;
for i:=1 to 11 do
begin
if stringgrid1.Cells[1,i]='' then break;
stringgrid1.Cells[5,i]:=floattostr(round(strtointdef(trim(stringgrid1.Cells[2,i]),0)*strtointdef(trim(stringgrid1.Cells[3,i]),0)*strtofloatdef(stringgrid1.Cells[4,i],0)));
total_price:=total_price+strtofloatdef(trim(stringgrid1.Cells[5,i]),0);
total_quatity:=total_quatity+strtointdef(trim(stringgrid1.Cells[2,i]),0);
end;
edit2.Text:=floattostr(round(total_price));
edit13.Text:=inttostr(total_quatity);
end;
procedure Tmain.mxOutlookBarPro1Headers3Buttons1Click(Sender: TObject);
begin
psmf:='bddc';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF dcfrm=nil THEN Application.CreateForm(Tdcfrm,dcfrm);
dcfrm.showmodal;
end;
end;
procedure Tmain.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action := CaNone;
end;
procedure Tmain.FormCreate(Sender: TObject);
begin
//WriteRegAutoRun('牧羊人服饰');
end;
procedure Tmain.mxOutlookBarPro1Headers4Buttons0Click(Sender: TObject);
begin
psmf:='mrxsqd';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF kccxfrm=nil THEN Application.CreateForm(Tkccxfrm,kccxfrm);
kccxfrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers4Buttons1Click(Sender: TObject);
begin
psmf:='yxsfx';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF yjfrm=nil THEN Application.CreateForm(Tyjfrm,yjfrm);
yjfrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers4Buttons2Click(Sender: TObject);
begin
psmf:='hyxfphb';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF hyxfphfrm=nil THEN Application.CreateForm(Thyxfphfrm,hyxfphfrm);
hyxfphfrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers7Buttons0Click(Sender: TObject);
begin
psmf:='sjkwh';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF sysinifrm=nil THEN Application.CreateForm(Tsysinifrm,sysinifrm);
sysinifrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers5Buttons0Click(Sender: TObject);
begin
psmf:='hyqkcx';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF hyqkcxfrm=nil THEN Application.CreateForm(Thyqkcxfrm,hyqkcxfrm);
hyqkcxfrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers5Buttons1Click(Sender: TObject);
begin
psmf:='kcqkcx';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF kcqkcxfrm=nil THEN Application.CreateForm(Tkcqkcxfrm,kcqkcxfrm);
kcqkcxfrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers9Buttons0Click(Sender: TObject);
var
i:integer;
begin
if tempgrid.Cells[1,1]<>'' then
if MessageDlg('确实要删除临时储存数据??',mtWarning, [mbYes, mbNo], 0) = mrYes then
begin
for i:=0 to 11 do
tempgrid.Rows[i].Clear;
end
else
Action12Execute(Sender);
if (edit1.Text<>'') or (stringgrid1.Cells[1,1]<>'') then
exit;
if Application.MessageBox('是否要关闭程序?','关闭 确认',mb_YesNo + mb_IconWarning)=Id_Yes then
begin
dynamicchangedisplay(load_displayw('屏幕分辨率',800),load_displayh('屏幕分辨率',600));
application.Terminate;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers2Buttons2Click(Sender: TObject);
begin
psmf:='spjgwh';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF jgwhfrm=nil THEN Application.CreateForm(Tjgwhfrm,jgwhfrm);
jgwhfrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers4Buttons3Click(Sender: TObject);
begin
psmf:='spxsphb';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF xsphbfrm=nil THEN Application.CreateForm(Txsphbfrm,xsphbfrm);
xsphbfrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers5Buttons2Click(Sender: TObject);
begin
psmf:='drcx';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF drcxfrm=nil THEN Application.CreateForm(Tdrcxfrm,drcxfrm);
drcxfrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers5Buttons3Click(Sender: TObject);
begin
psmf:='dccx';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF dccxfrm=nil THEN Application.CreateForm(Tdccxfrm,dccxfrm);
dccxfrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers6Buttons2Click(Sender: TObject);
begin
ShellExecute(handle, 'open',pchar('C:\Program Files\foobar2000\foobar2000.exe'), nil, nil, sw_show);
end;
procedure Tmain.mxOutlookBarPro1Headers6Buttons3Click(Sender: TObject);
begin
ShellExecute(handle,'open','TypeEase.exe',nil,nil,SW_ShowNormal);
end;
procedure Tmain.mxOutlookBarPro1Headers7Buttons1Click(Sender: TObject);
begin
psmf:='sjbf';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF sjbffrm=nil THEN Application.CreateForm(Tsjbffrm,sjbffrm);
sjbffrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers7Buttons2Click(Sender: TObject);
begin
psmf:='sjhy';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF sjhffrm=nil THEN Application.CreateForm(Tsjhffrm,sjhffrm);
sjhffrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers8Buttons0Click(Sender: TObject);
begin
psmf:='ckdycz';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF ckdyjlfrm=nil THEN Application.CreateForm(Tckdyjlfrm,ckdyjlfrm);
ckdyjlfrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers8Buttons1Click(Sender: TObject);
begin
psmf:='ckdyly';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF cklyfrm=nil THEN Application.CreateForm(Tcklyfrm,cklyfrm);
cklyfrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers1Buttons1Click(Sender: TObject);
begin
IF dyhbfrm=nil THEN Application.CreateForm(Tdyhbfrm,dyhbfrm);
dyhbfrm.showmodal;
end;
procedure Tmain.mxOutlookBarPro1Headers6Buttons4Click(Sender: TObject);
begin
psmf:='dyyjx';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF dyyjxfrm=nil THEN Application.CreateForm(Tdyyjxfrm,dyyjxfrm);
dyyjxfrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers1Buttons0Click(Sender: TObject);
begin
edit1.SetFocus;
end;
procedure Tmain.mxOutlookBarPro1Headers3Buttons2Click(Sender: TObject);
begin
psmf:='drwh';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF drwhfrm=nil THEN Application.CreateForm(Tdrwhfrm,drwhfrm);
drwhfrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers3Buttons3Click(Sender: TObject);
begin
psmf:='dcwh';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF dcwhfrm=nil THEN Application.CreateForm(Tdcwhfrm,dcwhfrm);
dcwhfrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers5Buttons4Click(Sender: TObject);
begin
psmf:='thcx';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF thcxfrm=nil THEN Application.CreateForm(Tthcxfrm,thcxfrm);
thcxfrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers2Buttons3Click(Sender: TObject);
begin
psmf:='thwh';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF thwhfrm=nil THEN Application.CreateForm(Tthwhfrm,thwhfrm);
thwhfrm.showmodal;
end;
end;
procedure Tmain.Timer2Timer(Sender: TObject);
begin
StatusBar1.Panels.Items[2].Text := '系统日期: '+formatdatetime('yyyy"年"mm"月"dd"日" hh"点"mm"分" ampm',now);
end;
procedure Tmain.Edit1Enter(Sender: TObject);
begin
Edit1.Color:=clSkyBlue;
end;
procedure Tmain.Edit1Exit(Sender: TObject);
begin
Edit1.color:=clWindow;
end;
procedure Tmain.Edit5Enter(Sender: TObject);
begin
Edit5.Color:=clSkyBlue;
end;
procedure Tmain.Edit5Exit(Sender: TObject);
begin
Edit5.color:=clWindow;
end;
procedure Tmain.FormActivate(Sender: TObject);
begin
StatusBar1.Panels.Items[2].Text := '系统日期: '+formatdatetime('yyyy"年"mm"月"dd"日" hh"点"mm"分" ampm',now);
end;
procedure Tmain.mxOutlookBarPro1Headers6Buttons5Click(Sender: TObject);
begin
ShellExecute(handle,'open',pchar(ExtractFilePath(Application.ExeName)+'windows/LK602Demo.exe'),nil,nil,SW_ShowNormal);
end;
procedure Tmain.Action11Execute(Sender: TObject);
begin
IF changefrm=nil THEN Application.CreateForm(Tchangefrm,changefrm);
changefrm.showmodal;
end;
procedure Tmain.mxOutlookBarPro1Headers7Buttons3Click(Sender: TObject);
begin
psmf:='pd';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF pdfrm=nil THEN Application.CreateForm(Tpdfrm,pdfrm);
pdfrm.showmodal;
end;
end;
procedure Tmain.mxOutlookBarPro1Headers7Buttons4Click(Sender: TObject);
begin
psmf:='up';
if not premission(usrname,psmf) then
showmessage('你没有此权限!')
else
begin
IF updatefrm=nil THEN Application.CreateForm(Tupdatefrm,updatefrm);
updatefrm.showmodal;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -