procedure Tfrmglenmt.navgtClick(Sender: TObject; Button: TOracleNavigateBtn); begin case Button of nbCancel : begin edtENTITY.Enabled := true; navgt.BtnClick(nbRefresh); edtENTITY.SetFocus; end; nbpost: begin edtentity.enabled:=true; edtentity.setfocus; if isclick=true then begin str_entity:=trim(edtentity.Text); if found_p and (chkisautoloc.Checked=true) and (edtentity.Text<>entity_s) then begin showmessage('²»ÄÜÓжà¸öÖ÷»á¼Æµ¥Î»£¡'); odstUSER.Locate('entity',str_entity,[loCaseInsensitive]); odstuser.Edit; odstuser.FieldByName('primarys').AsString:='N'; odstuser.Post; // navgt.DisableMoveBtn; end; isclick:=false; found_p:=odstUSER.SearchRecord('primarys','Y',[srFromBeginning]); entity_s:=odstuser.FieldValues['entity']; odstUSER.Locate('entity',str_entity,[loCaseInsensitive]); end; end; end; end;给你参考。。
Button: TOracleNavigateBtn);
begin
case Button of
nbCancel : begin
edtENTITY.Enabled := true;
navgt.BtnClick(nbRefresh);
edtENTITY.SetFocus;
end;
nbpost: begin
edtentity.enabled:=true;
edtentity.setfocus;
if isclick=true then
begin
str_entity:=trim(edtentity.Text); if found_p and (chkisautoloc.Checked=true) and (edtentity.Text<>entity_s) then
begin
showmessage('²»ÄÜÓжà¸öÖ÷»á¼Æµ¥Î»£¡');
odstUSER.Locate('entity',str_entity,[loCaseInsensitive]);
odstuser.Edit;
odstuser.FieldByName('primarys').AsString:='N';
odstuser.Post;
// navgt.DisableMoveBtn;
end;
isclick:=false;
found_p:=odstUSER.SearchRecord('primarys','Y',[srFromBeginning]);
entity_s:=odstuser.FieldValues['entity'];
odstUSER.Locate('entity',str_entity,[loCaseInsensitive]);
end;
end;
end;
end;给你参考。。