You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.0 KiB
Plaintext

unit u_op_customername_change;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, wwdbdatetimepicker, bsSkinCtrls, BusinessSkinForm, DB,ADODB,
Mask, DBCtrls, wwdblook, RxLookup;
type
Tfrm_op_customername_change = class(TForm)
Label1: TLabel;
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsSkinButton1: TbsSkinButton;
bsSkinButton5: TbsSkinButton;
DataSource1: TDataSource;
RxDBLookupCombo2: TRxDBLookupCombo;
procedure bsSkinButton5Click(Sender: TObject);
procedure bsSkinButton1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
BSTYPE:string;
end;
var
frm_op_customername_change: Tfrm_op_customername_change;
implementation
uses my_sys_function, u_op_seae_vessel, u_op_seae, u_data_share,
u_op_seae_edi_data;
{$R *.dfm}
procedure Tfrm_op_customername_change.bsSkinButton5Click(Sender: TObject);
begin
close;
end;
procedure Tfrm_op_customername_change.bsSkinButton1Click(Sender: TObject);
var
aQuery:TAdoQuery;
i:Integer;
book1:Tbookmark;
dsstr,PostUrl:string;
begin
if RxDBLookupCombo2.DisplayValues[1]='' then
begin
showmessage('请输入新的委托单位!!');
exit;
end;
try
frm_op_seae_edi_data.t_op_seae.DisableControls;
frm_op_seae_edi_data.isexcel:=true;
for i:=0 to frm_op_seae_edi_data.dxDBGrid1.SelectedCount-1 do
begin
frm_op_seae_edi_data.t_op_seae.GotoBookmark(pointer(frm_op_seae_edi_data.dxDBGrid1.selectedrows[i]));
frm_op_seae_edi_data.t_op_seae.Edit;
frm_op_seae_edi_data.t_op_seae['委托单位']:=RxDBLookupCombo2.DisplayValues[1];
frm_op_seae_edi_data.t_op_seae.Post;
end;
finally
frm_op_seae_edi_data.t_op_seae.EnableControls;
frm_op_seae_edi_data.isexcel:=false;
end;
book1:=frm_op_seae_edi_data.t_op_seae.GetBookmark;
frm_op_seae_edi_data.t_op_seae.Refresh;
frm_op_seae_edi_data.t_op_seae.GotoBookmark(book1);
showmessage('更改成功!!');
close;
end;
end.