|
|
|
|
unit u_op_chkpart;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, bsSkinCtrls, ExtCtrls, Grids, DBGridEh, StdCtrls, DBCtrls, Mask,
|
|
|
|
|
DB, ADODB;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_op_chkpart = class(TForm)
|
|
|
|
|
Panel1: TPanel;
|
|
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
|
|
DBGridEh1: TDBGridEh;
|
|
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
|
|
Label1: TLabel;
|
|
|
|
|
Label2: TLabel;
|
|
|
|
|
Label3: TLabel;
|
|
|
|
|
DBEdit1: TDBEdit;
|
|
|
|
|
DBEdit2: TDBEdit;
|
|
|
|
|
DBMemo1: TDBMemo;
|
|
|
|
|
qry_op_chkpart: TADOQuery;
|
|
|
|
|
dsr_op_chkpart: TDataSource;
|
|
|
|
|
Label4: TLabel;
|
|
|
|
|
Label5: TLabel;
|
|
|
|
|
DBMemo2: TDBMemo;
|
|
|
|
|
DBComboBox1: TDBComboBox;
|
|
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
procedure DBEdit2KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton8Click(Sender: TObject);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
ywlb:string ;
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
procedure showywlb(yw:string);
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_op_chkpart: Tfrm_op_chkpart;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
uses u_main,my_sys_function ;
|
|
|
|
|
|
|
|
|
|
{ Tfrm_op_chkpart }
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_chkpart.showywlb(yw: string);
|
|
|
|
|
begin
|
|
|
|
|
ywlb:=yw ;
|
|
|
|
|
with qry_op_chkpart,sql do
|
|
|
|
|
begin
|
|
|
|
|
close ; clear ;
|
|
|
|
|
add('select * from t_op_chkpart where ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>=:ywlb order by ˳<><CBB3><EFBFBD><EFBFBD>');
|
|
|
|
|
parameters.ParamByName('ywlb').value:=ywlb ;
|
|
|
|
|
open ;
|
|
|
|
|
end ;
|
|
|
|
|
showmodal ;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_chkpart.bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
qry_op_chkpart.Append ;
|
|
|
|
|
qry_op_chkpart.FieldByName('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').AsString:=ywlb ;
|
|
|
|
|
dbedit2.SetFocus ;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_chkpart.DBEdit2KeyPress(Sender: TObject; var Key: Char);
|
|
|
|
|
begin
|
|
|
|
|
if key=#13 then dbmemo1.SetFocus ;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_chkpart.bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
qry_op_chkpart.Post ;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_chkpart.bsSkinButton4Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
qry_op_chkpart.Delete ;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_chkpart.bsSkinButton3Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
qry_op_chkpart.Cancel ;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_chkpart.bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
qry_op_chkpart.Next ;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_chkpart.bsSkinButton7Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
qry_op_chkpart.Prior ;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_chkpart.bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close ;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_op_chkpart.bsSkinButton8Click(Sender: TObject);
|
|
|
|
|
var aQuery:TADOQuery ;
|
|
|
|
|
begin
|
|
|
|
|
try
|
|
|
|
|
aQuery:=CreateAdoQuery;
|
|
|
|
|
with aQuery,sql do
|
|
|
|
|
begin
|
|
|
|
|
close; clear ;
|
|
|
|
|
if DBComboBox1.Text='<27><><EFBFBD><EFBFBD>' then
|
|
|
|
|
begin
|
|
|
|
|
add('select count(*) as cnt from t_op_seae where (1=1) ') ;
|
|
|
|
|
add(' and ');
|
|
|
|
|
add(qry_op_chkpart.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
|
|
end
|
|
|
|
|
else if DBComboBox1.Text='<27><><EFBFBD>ñ<EFBFBD>' then
|
|
|
|
|
begin
|
|
|
|
|
add('select count(*) as cnt from t_ch_fee where (1=1) ');
|
|
|
|
|
add(' and ');
|
|
|
|
|
add(qry_op_chkpart.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
|
|
end
|
|
|
|
|
else if DBComboBox1.Text='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' then
|
|
|
|
|
begin
|
|
|
|
|
add('select count(*)as cnt from t_op_gain where (1=1) ');
|
|
|
|
|
add('and ');
|
|
|
|
|
add(qry_op_chkpart.fieldbyname('<27><><EFBFBD><EFBFBD>').asstring);
|
|
|
|
|
end ;
|
|
|
|
|
open ;
|
|
|
|
|
close ;
|
|
|
|
|
FreeAndNil(aQuery);
|
|
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7>');
|
|
|
|
|
end ;
|
|
|
|
|
except
|
|
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϲ淶<CFB9><E6B7B6><EFBFBD><EFBFBD><EFBFBD>ģ<DEB8>');
|
|
|
|
|
end;
|
|
|
|
|
end ;
|
|
|
|
|
|
|
|
|
|
end.
|