unit u_UpdateSy; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, BusinessSkinForm; type TfrmUpdateSy = class(TForm) Label1: TLabel; bsBusinessSkinForm1: TbsBusinessSkinForm; Edit1: TEdit; Button1: TButton; Button2: TButton; procedure Button2Click(Sender: TObject); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var frmUpdateSy: TfrmUpdateSy; implementation uses u_main, u_rp_cd_hs; {$R *.dfm} procedure TfrmUpdateSy.Button2Click(Sender: TObject); begin close; end; procedure TfrmUpdateSy.Button1Click(Sender: TObject); var i:integer; begin if frm_rp_cd_hs.t_op_seae.IsEmpty then Exit; try frm_rp_cd_hs.t_op_seae.DisableControls; for i:=0 to frm_rp_cd_hs.dxDBGrid1.SelectedCount-1 do begin frm_rp_cd_hs.t_op_seae.GotoBookmark(pointer(frm_rp_cd_hs.dxDBGrid1.selectedrows[i])); frm_rp_cd_hs.t_op_seae.Edit; frm_rp_cd_hs.t_op_seae['应收']:=Edit1.Text; frm_rp_cd_hs.t_op_seae.Post; end; finally frm_rp_cd_hs.t_op_seae.EnableControls; end; ShowMessage('更新完成!'); end; end.