var floorcount,roomcount :integer;
f,r :integer;
begin
///在个Edit都不能为空
if Edit_floorNum.Text='' then
begin
showmessage('楼房号不能为空!');
Edit_floorNum.SetFocus;
end
else
if Edit_floorcount.Text='' then
begin
showmessage('楼层数不能为空!');
Edit_floorcount.SetFocus;
end
else
if Edit_roomcount.Text='' then
begin
showmessage('每层房间数不能为空!');
Edit_roomcount.SetFocus;
end
  else
  begin
    floorcount:=strtoint(Form_floorconfig1.Edit_floorcount.Text);
    roomcount:=strtoint(Form_floorconfig1.Edit_roomcount.Text);
    for f:=1 to floorcount do
    with Form_floorconfig1.Query1 do
      begin
        for r:=1 to roomcount do
            begin
            Close;
            SQL.Clear;
            SQL.Add('insert into room(Num_room) values(:x1)');
            if r<10 then
              parambyname('x1').asstring:=Edit_floorNum.Text+inttostr(f)+'0'+inttostr(r)
            else
              parambyname('x1').asstring:=Edit_floorNum.Text+inttostr(f)+inttostr(r);
            ExecSQL;
          end;
      end;
    end;
end;
procedure TForm_floorconfig1.Edit_floorcountKeyPress(Sender: TObject;
  var Key: Char);             
begin
  if not (key in ['0'..'9',#13,#8]) then
  key:=#0;
end;
procedure TForm_main.N1Click(Sender: TObject);       //主窗体的壁纸设置
begin
  if Ope
首页 上一页 1 2 3 4 5 6 下一页 尾页 2/6/6
sql2000+公寓管理系统+delphi[开题报告+文档+源代码+答辩ppt+外文翻译](二)由毕业论文网(www.huoyuandh.com)会员上传。

