procedure TForm1.Button1Click(Sender: TObject);
var  GS_zjlx,GS_zjhm:string;
begin
    if edit1.text<>'' then  //检测证件号不能为空
      begin
         if radiobutton1.Checked then   //检测证件类型
            begin
            GS_zjlx:=radiobutton1.Caption;
            GS_zjhm:=edit1.Text;
             end
           else if radiobutton2.Checked then
             begin
               GS_zjlx:=radiobutton2.Caption ;
                 if  adoquery1.SQL.Add('select Stu_sfz from student_d where Stu_sfz=edit1.Text') then
                     adoquery1.SQL.Add('select stu _txm from studen_d where stu _txm:=''Gs_zjhm''');
                  else
                   Showmessage('没有这个卡号,请从新输入');
             end
         end          //end
    else
        Showmessage('对不起!证件号不能为空');
  end;