|
|
|
|
unit u_ctn_cqfee;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, DB, ADODB, dxExEdtr, dxTL, dxDBCtrl, dxDBGrid, dxCntner,
|
|
|
|
|
bsSkinCtrls, dxBarDBNav, ExtCtrls, DBCtrls, Grids, DBGridEh;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_ctn_cqfee = class(TForm)
|
|
|
|
|
t_ctn_cqfee: TADOQuery;
|
|
|
|
|
t_ctn_cqfee1: TDataSource;
|
|
|
|
|
t_crm_client: TADOQuery;
|
|
|
|
|
t_crm_client1: TDataSource;
|
|
|
|
|
dxDBGrid2: TdxDBGrid;
|
|
|
|
|
dxDBGrid2Column1: TdxDBGridColumn;
|
|
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
|
|
DBNavigator1: TDBNavigator;
|
|
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
|
|
DBGridEh1: TDBGridEh;
|
|
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
|
|
procedure FormClose(Sender: TObject; var Action: TCloseAction);
|
|
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_ctn_cqfee: Tfrm_ctn_cqfee;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses my_sys_function;
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ctn_cqfee.FormShow(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
t_crm_client.Open;
|
|
|
|
|
t_ctn_cqfee.Open;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ctn_cqfee.FormClose(Sender: TObject;
|
|
|
|
|
var Action: TCloseAction);
|
|
|
|
|
begin
|
|
|
|
|
Action:=caFree;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_ctn_cqfee.bsSkinButton6Click(Sender: TObject);
|
|
|
|
|
var aAdoQuery:TAdoQuery;
|
|
|
|
|
begin
|
|
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
|
|
with aAdoQuery do
|
|
|
|
|
try
|
|
|
|
|
Close;SQL.Clear;
|
|
|
|
|
SQL.Add('select <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ from t_code_ctn');
|
|
|
|
|
SQL.Add('order by <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ');
|
|
|
|
|
Open;First;
|
|
|
|
|
while not Eof do
|
|
|
|
|
begin
|
|
|
|
|
if not t_ctn_cqfee.Locate('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ',VarArrayOf([t_ctn_cqfee.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString, FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString]), [loPartialKey]) then
|
|
|
|
|
begin
|
|
|
|
|
t_ctn_cqfee.Insert;
|
|
|
|
|
t_ctn_cqfee.FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString:=FieldByName('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ').AsString;
|
|
|
|
|
t_ctn_cqfee.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString:=t_crm_client.FieldByName('<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>').AsString;
|
|
|
|
|
t_ctn_cqfee.FieldByName('<27><><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9>').Value:=0;
|
|
|
|
|
t_ctn_cqfee.FieldByName('<27><>ʹ<EFBFBD><CAB9>1').Value:=0;
|
|
|
|
|
t_ctn_cqfee.FieldByName('<27><><EFBFBD><EFBFBD>1').Value:=0;
|
|
|
|
|
t_ctn_cqfee.FieldByName('<27><>ʹ<EFBFBD><CAB9>2').Value:=0;
|
|
|
|
|
t_ctn_cqfee.FieldByName('<27><><EFBFBD><EFBFBD>2').Value:=0;
|
|
|
|
|
t_ctn_cqfee.FieldByName('<27><>ʹ<EFBFBD><CAB9>3').Value:=0;
|
|
|
|
|
t_ctn_cqfee.FieldByName('<27><><EFBFBD><EFBFBD>3').Value:=0;
|
|
|
|
|
t_ctn_cqfee.FieldByName('<27><>ʹ<EFBFBD><CAB9>4').Value:=0;
|
|
|
|
|
t_ctn_cqfee.FieldByName('<27><><EFBFBD><EFBFBD>4').Value:=0;
|
|
|
|
|
t_ctn_cqfee.FieldByName('<27><>ʹ<EFBFBD><CAB9>5').Value:=0;
|
|
|
|
|
t_ctn_cqfee.FieldByName('<27><><EFBFBD><EFBFBD>5').Value:=0;
|
|
|
|
|
t_ctn_cqfee.Post;
|
|
|
|
|
end;
|
|
|
|
|
Next;
|
|
|
|
|
end;
|
|
|
|
|
finally
|
|
|
|
|
Free;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|