首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

一个button让另一个button效能不实现

2012-06-22 
一个button让另一个button功能不实现closesql.text:select kucunliang from kucun where yaopinhao+Q

一个button让另一个button功能不实现
close;
 sql.text:='select kucunliang from kucun where yaopinhao='+Quotedstr(Edit1.Text)+' and kucunliang<'+QuotedStr(Edit2.Text);

 open;
 if isEmpty then
 begin

  showmessage('可以卖出');

 end
 else
 showmessage('要求的数量大于库存量,不可卖出');
 

如果我想在button显示要求的数量大于库存量,不可卖出'后就让下一个button的功能不可用,怎么办

[解决办法]
if isEmpty then
 begin
button2.enanble := true;
showmessage('可以卖出');
 end
 else begin
showmessage('要求的数量大于库存量,不可卖出');
button2.enable := false;
 end;

热点排行