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

11 months ago
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 <20><><EFBFBD><EFBFBD><E1B5A5>=:<3A><><EFBFBD><EFBFBD><E1B5A5> and <20><><EFBFBD><EFBFBD>=:<3A><><EFBFBD><EFBFBD>');
SQL.Add('Order by ״̬ʱ<CCAC><CAB1>');
end;
with ADOQuery1 do
begin
close;sql.Clear;
SQL.Add('select distinct <20><><EFBFBD><EFBFBD> from t_op_state_igz');
SQL.Add('where <20><><EFBFBD><EFBFBD><E1B5A5>=:<3A><><EFBFBD><EFBFBD><E1B5A5>');
Parameters.ParamByName('<27><><EFBFBD><EFBFBD><E1B5A5>').Value:=mblno;
Open;First;
while not eof do
begin
ctn:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
aNode:=cxTreeView1.Items.AddChild(nil,ctn);
ADOQuery2.Close;
ADOQuery2.Parameters.ParamByName('<27><><EFBFBD><EFBFBD>').Value:=FieldByName('<27><><EFBFBD><EFBFBD>').AsString;
ADOQuery2.Parameters.ParamByName('<27><><EFBFBD><EFBFBD><E1B5A5>').Value:=mblno;
ADOQuery2.Open;ADOQuery2.First;
while not ADOQuery2.eof do
begin
ctnstatus:=EditFieldVlaue(trim(ADOQuery2.FieldByName('ҵ<><D2B5>״̬').AsString),20);
ctnstatusDate:=ADOQuery2.FieldByName('״̬ʱ<CCAC><CAB1>').AsString;
ctnstatusNode:=ctnstatus+'ʱ<><CAB1>:'+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.