delphi2007 教程

delphi2007 教程

首页 新随笔 联系 聚合 管理
  1013 Posts :: 0 Stories :: 28 Comments :: 0 Trackbacks
请问:填空(高分^_^) Delphi / Windows SDK/API
http://www.delphi2007.net/DelphiBase/html/delphi_20061207153123237.html
实验中有一段组织查询条件的过程(窗口中有ckbM,   ckbF作为男女选择的)  
  procedure   TfmAA.Condition();  
  var  
      sNo1,   sNo2:   string;//学号,范围  
        sNocondit:string;//查询条件的‘学号’部分  
        s:string;     //查询条件的'性别'部分  
  begin  
        sNo1:=Trim(edtNo1.Text);  
        sNo2:=Trim(edtNo2.text);  
      if   StrToInt(sNo1)>StrToInt(sNo2)   then  
        begin  
            sNo1:=Trim(edtNo2.Text);  
            sNo2:=Trim(edtNo1.Text);  
        end;  
      sNoCondit:=_______________;                                       //(1)  
      if   _____________________   then//男女都选             //(2)  
          s:=''  
      else  
          begin  
                if   ckbM   Checked   then     //只选男  
                    s:='   AND   Sex   =   ''M''';  
                  else  
                    s:='   AND   Sex=''F''';  
          end;  
    if   _____________   then       //男女都不是                       //(3)  
        s:=   '   AND   (Sex=   ''''   OR   Sex   =   ''   '')';  
      sCondit:=sNoCondit   +   s;  
  end;  
   
   
  请问上面的三个空是怎么填的呀  
 

如果学号字段为No  
  1   '(No>='+   sNo1+   '   AND   No<='+   sNo2+   ')';  
  2   ckbM.Checked   and   ckbF.Checked  
  3   (not   ckbM.Checked)   and   (not   ckbF.Checked)

楼上正解

是不是你们要考试了的题目啊?

posted on 2009-02-11 16:49 delphi2007 阅读(250) 评论(0)  编辑 收藏 引用
只有注册用户登录后才能发表评论。