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.

98 lines
3.4 KiB
Plaintext

unit u_op_seae_ctn;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxExEdtr, dxCntner, dxTL, dxDBCtrl, dxDBGrid, DB, ADODB,
ExtCtrls, bsSkinCtrls;
type
Tfrm_op_seae_ctn = class(TForm)
ADOQuery_CtnList1: TDataSource;
ADOQuery_CtnList: TADOQuery;
dxDBGrid2: TdxDBGrid;
dxDBGrid2Column1: TdxDBGridColumn;
dxDBGrid2Column2: TdxDBGridColumn;
dxDBGrid2Column3: TdxDBGridColumn;
dxDBGrid2Column4: TdxDBGridColumn;
dxDBGrid2Column5: TdxDBGridColumn;
dxDBGrid2Column6: TdxDBGridColumn;
dxDBGrid2Column7: TdxDBGridColumn;
dxDBGrid2Column8: TdxDBGridColumn;
dxDBGrid2Column9: TdxDBGridColumn;
dxDBGrid2Column10: TdxDBGridColumn;
Panel1: TPanel;
bsSkinButton5: TbsSkinButton;
t_op_ctn1: TDataSource;
procedure FormShow(Sender: TObject);
procedure bsSkinButton5Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
CorpName,Vsl,Voy,bsNo:string;
end;
var
frm_op_seae_ctn: Tfrm_op_seae_ctn;
implementation
uses u_main;
{$R *.dfm}
procedure Tfrm_op_seae_ctn.FormShow(Sender: TObject);
begin
with ADOQuery_CtnList do
begin
Close;SQL.Clear;
SQL.Add('select t_op_seae.寮瓊데뵀,t_op_seae.官辜데貫,t_op_seae.역눋휑퍅,t_op_ctn.* from t_op_seae');
SQL.Add('left join t_op_ctn on t_op_seae.긍뵀=t_op_ctn.긍뵀');
SQL.Add('where t_op_seae.官辜데貫=:CorpName and t_op_seae.눋츰=:Vsl and t_op_seae.봄늴=:voy');
SQL.Add('and t_op_seae.긍뵀<>:bsno');
Parameters.ParamByName('CorpName').Value:=CorpName;
Parameters.ParamByName('bsno').Value:=bsno;
Parameters.ParamByName('vsl').Value:=Vsl;
Parameters.ParamByName('Voy').Value:=Voy;
Open;
end;
end;
procedure Tfrm_op_seae_ctn.bsSkinButton5Click(Sender: TObject);
var
i:integer;
begin
if ADOQuery_CtnList.IsEmpty then
exit;
if dxDBGrid2.SelectedCount>=1 then
begin
for i:=0 to dxDBGrid2.SelectedCount-1 do
begin
ADOQuery_CtnList.GotoBookmark(pointer(dxDBGrid2.selectedrows[i]));
t_op_ctn1.Dataset.Append;
t_op_ctn1.Dataset.FieldByName('긍뵀').Value:=bsno;
t_op_ctn1.Dataset.FieldByName('덜쯤').Value:=ADOQuery_CtnList.FieldByName('덜쯤').Value;
t_op_ctn1.Dataset.FieldByName('넹당').Value:=ADOQuery_CtnList.FieldByName('넹당').Value;
t_op_ctn1.Dataset.FieldByName('芎謹').Value:=ADOQuery_CtnList.FieldByName('芎謹').Value;
t_op_ctn1.Dataset.FieldByName('鑒좆').Value:=ADOQuery_CtnList.FieldByName('鑒좆').Value;
t_op_ctn1.Dataset.FieldByName('TEU').Value:=ADOQuery_CtnList.FieldByName('TEU').Value;
t_op_ctn1.Dataset.FieldByName('TEU').Value:=ADOQuery_CtnList.FieldByName('TEU').Value;
t_op_ctn1.Dataset.FieldByName('깊君近駕').Value:=ADOQuery_CtnList.FieldByName('깊君近駕').Value;
t_op_ctn1.Dataset.FieldByName('芎뵀').Value:=ADOQuery_CtnList.FieldByName('芎뵀').Value;
t_op_ctn1.Dataset.FieldByName('룐뵀').Value:=ADOQuery_CtnList.FieldByName('룐뵀').Value;
t_op_ctn1.Dataset.FieldByName('숭鑒').Value:=ADOQuery_CtnList.FieldByName('숭鑒').Value;
t_op_ctn1.Dataset.FieldByName('관陋').Value:=ADOQuery_CtnList.FieldByName('관陋').Value;
t_op_ctn1.Dataset.FieldByName('路좆').Value:=ADOQuery_CtnList.FieldByName('路좆').Value;
t_op_ctn1.Dataset.FieldByName('넹쯤').Value:=ADOQuery_CtnList.FieldByName('넹쯤').Value;
t_op_ctn1.Dataset.post;
// Create.
end;
end;
end;
end.