小弟不才请大哥教一下 delphi的问题,解释详细加分50
procedure Tcprk_win.rkdno_EditExit(Sender: TObject);
begin
tempQuery.close;
tempQuery.sql.clear;
tempQuery.sql.add('select * from jkd where (ckbh="' + curckbh + '") and (rkdno="' + rkdno_Edit.Text + '")');
tempQuery.open;
if not tempQuery.Eof then
begin
kd_date_Edit.Text := tempQuery.fieldbyname('kd_date').asstring;
rkshm_edit.Text := tempQuery.fieldbyname('rkshm').asstring;
dwbh_Edit.Text := tempQuery.fieldbyname('dwbh').asstring;
factory_Edit.Text := tempQuery.fieldbyname('factory').asstring;
slr_edit.Text := tempQuery.fieldbyname('slr').asstring;
chrlx.Text := tempQuery.fieldbyname('chrlx').asstring;
oldchrlx := tempQuery.fieldbyname('chrlx').asstring;
jzy_Edit.Text := qm;
cgdhdno_edit.Text := tempQuery.fieldbyname('cgdhdno').asstring;
nowdate_Edit.Text := tempQuery.fieldbyname('nowdate').asstring;
record_exist := true;
end
else
begin
kd_date_Edit.Text := DateTimeToStr(Date);
cgdhdno_edit.Text := '';
rkshm_edit.Text := '';
dwbh_Edit.Text := '';
factory_Edit.Text := '';
slr_edit.Text := '';
oldchrlx := '';
jzy_Edit.Text := qm;
nowdate_Edit.Text := '';
record_exist := false;
end;
tempQuery.close;
tempQuery.sql.clear;
tempQuery.sql.add('select * from subjkd where');
tempQuery.sql.add('(ckbh="' + curckbh + '") and (rkdno="' + rkdno_Edit.Text + '")');
tempQuery.open;
tempTable.emptytable;
tempTable.batchmove(tempQuery, batappend);
tempTable.refresh;
oldTable.emptytable;
oldTable.batchmove(tempQuery, batappend);
doupdate;
tempQuery.close;
tempQuery.sql.clear;
tempQuery.sql.add('select * from subwtjg where');
tempQuery.sql.add('(ckbh="' + curckbh + '") and (rkdno="' + rkdno_Edit.Text + '")');
tempQuery.open;
tempTable1.emptytable;
tempTable1.batchmove(tempQuery, batappend);
doupdate1;
end;
追问:能加你qq吗高手659774244