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.
83 lines
2.0 KiB
Plaintext
83 lines
2.0 KiB
Plaintext
unit u_op_state_igz;
|
|
|
|
interface
|
|
|
|
uses
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
Dialogs, cxControls, cxContainer, cxTreeView, bsSkinCtrls, DB, ADODB,ComCtrls;
|
|
|
|
type
|
|
Tfrm_op_state_igz = class(TForm)
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
cxTreeView1: TcxTreeView;
|
|
ADOQuery1: TADOQuery;
|
|
ADOQuery2: TADOQuery;
|
|
bsSkinButton1: TbsSkinButton;
|
|
procedure FormShow(Sender: TObject);
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
private
|
|
{ Private declarations }
|
|
public
|
|
{ Public declarations }
|
|
mblno:string;
|
|
end;
|
|
|
|
var
|
|
frm_op_state_igz: Tfrm_op_state_igz;
|
|
|
|
implementation
|
|
uses u_main,u_data_share, my_sys_function;
|
|
|
|
{$R *.dfm}
|
|
|
|
procedure Tfrm_op_state_igz.FormShow(Sender: TObject);
|
|
var
|
|
aNode:TTreeNode;
|
|
i,j:integer;
|
|
ctn,ctnstatus,ctnstatusDate,ctnstatusNode:string;
|
|
begin
|
|
cxTreeView1.Items.Clear;
|
|
with ADOQuery2 do
|
|
begin
|
|
close;sql.Clear;
|
|
SQL.Add('select * from t_op_state_igz');
|
|
SQL.Add('where 寮瓊데뵀=:寮瓊데뵀 and 芎뵀=:芎뵀');
|
|
SQL.Add('Order by 榴檄珂쇌');
|
|
end;
|
|
|
|
with ADOQuery1 do
|
|
begin
|
|
close;sql.Clear;
|
|
SQL.Add('select distinct 芎뵀 from t_op_state_igz');
|
|
SQL.Add('where 寮瓊데뵀=:寮瓊데뵀');
|
|
Parameters.ParamByName('寮瓊데뵀').Value:=mblno;
|
|
Open;First;
|
|
while not eof do
|
|
begin
|
|
ctn:=FieldByName('芎뵀').AsString;
|
|
aNode:=cxTreeView1.Items.AddChild(nil,ctn);
|
|
ADOQuery2.Close;
|
|
ADOQuery2.Parameters.ParamByName('芎뵀').Value:=FieldByName('芎뵀').AsString;
|
|
ADOQuery2.Parameters.ParamByName('寮瓊데뵀').Value:=mblno;
|
|
ADOQuery2.Open;ADOQuery2.First;
|
|
while not ADOQuery2.eof do
|
|
begin
|
|
ctnstatus:=EditFieldVlaue(trim(ADOQuery2.FieldByName('撚蛟榴檄').AsString),20);
|
|
ctnstatusDate:=ADOQuery2.FieldByName('榴檄珂쇌').AsString;
|
|
ctnstatusNode:=ctnstatus+'珂쇌:'+ctnstatusDate;
|
|
cxTreeView1.Items.AddChild(aNode,ctnstatusNode);
|
|
ADOQuery2.Next;
|
|
end;
|
|
Next;
|
|
end;
|
|
end;
|
|
|
|
end;
|
|
|
|
procedure Tfrm_op_state_igz.bsSkinButton1Click(Sender: TObject);
|
|
begin
|
|
close;
|
|
end;
|
|
|
|
end.
|