Delphi+Access报刊订阅管理系统设计论文+源码+流程图 第5页
main.Label6.Caption:='客户';
main.Label1.Visible:=false;
number:=adotable1.FieldByName('用户编号').AsInteger;
main.Show;
login.Hide;
end;
end
else
begin
application.MessageBox('密码输入错误,请重新输入!','密码错误',0);
edit2.Text:='';
edit2.SetFocus;
end;
end;
adotable1.Next;
end;
if right then
begin
if application.MessageBox('该用户名不存在,是否以此身份登录?','登录提示',1)=1 then
begin
main.gly.Visible:=false;
main.dy.Visible:=false;
main.tj.Visible:=false;
main.Label6.Caption:='游客';
main.Label1.Visible:=true;
main.Show;
login.Hide;
end;
end;
end
else
begin
application.MessageBox('用户名不能为空!','提示',0);
edit1.SetFocus;
end;
end;
(2).查询实现: procedure Tmain.Button4Click(Sender: TObject);
begin
with adoquery1 do
begin
sql.Clear;
sql.Add('select * from 报刊信息');
sql.Add(format(' where (%s',[trim(combobox2.Text)]));
sql.Add(format(' like ''%s'')'原文请找腾讯752018766辣,文'论'文,网
http://www.751com.cn/ edit1.Text)]));
if RadioButton1.Checked then
sql.Add(format(' and (所属类型=''%s'')',[trim(combobox1.Text)]));
open;
end;
if ADOQuery1.RecordCount<1 then
showmessage('无此报刊!请确认是否输入正确!');
end;
(3).报刊订阅实现: procedure Twelcom.Button1Click(Sender: TObject);
var
x,sum:integer;
right:boolean;
begin
right:=true;
if edit1.Text='' then
begin
showmessage('份数不能为空!');
edit1.SetFocus;
exit;
end;
if strtoint(combobox3.Text)>strtoint(combobox1.Text) then
begin
x:=(strtoint(combobox3.Text)-strtoint(combobox1.Text))*12+strtoint(combobox4.Text)-strtoint(combobox2.Text);
end
else
begin
x:=strtoint(combobox4.Text)-strtoint(combobox2.Text);
end;
if DBText4.Caption='月' then
begin
sum:=x;
end
else if DBText4.Caption='季' then
begin
if (x mod 3)<>0 then
begin
showmessage('月份选择与报刊整订期不一致!请重新选择!');
exit;
end
else
sum:=x div 3;
end
else
begin
if (x mod 6)<>0 then
begin
showmessage('月份选择与报刊整订期不一致!请重新选择!');
exit;
end
else
sum:=x div 6;
end;
adotable1.Open;
adotable1.Append;
adotable1.FieldByName('客户编号').AsInteger:= number;
adotable1.FieldByName('报刊代号').AsString:= DBText1.Caption;
上一页 [1] [2] [3] [4] [5] [6] 下一页
Delphi+Access报刊订阅管理系统设计论文+源码+流程图 第5页下载如图片无法显示或论文不完整,请联系qq752018766