|
|
unit u_code_send_address;
|
|
|
|
|
|
interface
|
|
|
|
|
|
uses
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
Dialogs, dxExEdtr, BusinessSkinForm, bsSkinCtrls, ExtCtrls, bsdbctrls,
|
|
|
StdCtrls, DBCtrls, Mask, dxDBTLCl, dxGrClms, dxTL, dxDBCtrl, dxDBGrid,
|
|
|
dxCntner, bsSkinBoxCtrls,ADODB;
|
|
|
|
|
|
type
|
|
|
Tfrm_code_send_address = class(TForm)
|
|
|
dxDBGrid1: TdxDBGrid;
|
|
|
Panel1: TPanel;
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
bsSkinButton4: TbsSkinButton;
|
|
|
bsSkinButton3: TbsSkinButton;
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
dxDBGrid1Column1: TdxDBGridMaskColumn;
|
|
|
dxDBGrid1Column2: TdxDBGridMaskColumn;
|
|
|
Label13: TLabel;
|
|
|
DBEdit9: TDBEdit;
|
|
|
Label14: TLabel;
|
|
|
DBEdit12: TDBEdit;
|
|
|
DBMemo2: TDBMemo;
|
|
|
Label15: TLabel;
|
|
|
Label16: TLabel;
|
|
|
DBEdit13: TDBEdit;
|
|
|
Label17: TLabel;
|
|
|
DBEdit14: TDBEdit;
|
|
|
DBEdit15: TDBEdit;
|
|
|
Label18: TLabel;
|
|
|
bsSkinButton6: TbsSkinButton;
|
|
|
bsSkinButton7: TbsSkinButton;
|
|
|
bsSkinButton8: TbsSkinButton;
|
|
|
bsSkinEdit1: TbsSkinEdit;
|
|
|
Memo1: TMemo;
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
procedure FormShow(Sender: TObject);
|
|
|
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
|
|
procedure bsSkinButton6Click(Sender: TObject);
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
procedure bsSkinButton4Click(Sender: TObject);
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
procedure FormKeyPress(Sender: TObject; var Key: Char);
|
|
|
procedure bsSkinButton3Click(Sender: TObject);
|
|
|
procedure bsSkinButton7Click(Sender: TObject);
|
|
|
procedure bsSkinButton8Click(Sender: TObject);
|
|
|
private
|
|
|
{ Private declarations }
|
|
|
public
|
|
|
{ Public declarations }
|
|
|
end;
|
|
|
|
|
|
var
|
|
|
frm_code_send_address: Tfrm_code_send_address;
|
|
|
|
|
|
implementation
|
|
|
|
|
|
uses u_data_share, my_sys_function,u_op_kuaidi_shen;
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
procedure Tfrm_code_send_address.bsSkinButton5Click(Sender: TObject);
|
|
|
begin
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_send_address.FormShow(Sender: TObject);
|
|
|
begin
|
|
|
frm_data_share.t_code_send_address.requery;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_send_address.FormCloseQuery(Sender: TObject;
|
|
|
var CanClose: Boolean);
|
|
|
begin
|
|
|
CanClose:=frm_close_query(frm_data_share.t_code_send_address);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_send_address.bsSkinButton6Click(Sender: TObject);
|
|
|
begin
|
|
|
table_cancel(frm_data_share.t_code_send_address);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_send_address.bsSkinButton2Click(Sender: TObject);
|
|
|
begin
|
|
|
table_post(frm_data_share.t_code_send_address);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_send_address.bsSkinButton4Click(Sender: TObject);
|
|
|
begin
|
|
|
table_delete(frm_data_share.t_code_send_address);
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_send_address.bsSkinButton1Click(Sender: TObject);
|
|
|
begin
|
|
|
frm_data_share.t_code_send_address.Insert;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_send_address.FormKeyPress(Sender: TObject;
|
|
|
var Key: Char);
|
|
|
begin
|
|
|
if key=#13 then
|
|
|
begin
|
|
|
if not(activecontrol is Tdbmemo)
|
|
|
and not(activecontrol is Tdxdbgrid)then
|
|
|
begin
|
|
|
Perform(WM_NEXTDLGCTL,0,0);
|
|
|
key:=#0;
|
|
|
end;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_send_address.bsSkinButton3Click(Sender: TObject);
|
|
|
begin
|
|
|
if frm_data_share.t_code_send_address.IsEmpty then
|
|
|
exit;
|
|
|
frm_op_kuaidi_shen.t_op_kuaidi.edit;
|
|
|
frm_op_kuaidi_shen.t_op_kuaidi['<27>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_code_send_address['<27>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'];
|
|
|
frm_op_kuaidi_shen.t_op_kuaidi['<27>ռ<EFBFBD><D5BC>˹<EFBFBD>˾']:=frm_data_share.t_code_send_address['<27>ռ<EFBFBD><D5BC>˹<EFBFBD>˾'];
|
|
|
frm_op_kuaidi_shen.t_op_kuaidi['<27>ռ<EFBFBD><D5BC>˵<EFBFBD>ַ']:=frm_data_share.t_code_send_address['<27>ռ<EFBFBD><D5BC>˵<EFBFBD>ַ'];
|
|
|
frm_op_kuaidi_shen.t_op_kuaidi['Ŀ<>ĵ<EFBFBD>']:=frm_data_share.t_code_send_address['Ŀ<>ĵ<EFBFBD>'];
|
|
|
frm_op_kuaidi_shen.t_op_kuaidi['<27>ռ<EFBFBD><D5BC>˵绰']:=frm_data_share.t_code_send_address['<27>ռ<EFBFBD><D5BC>˵绰'];
|
|
|
frm_op_kuaidi_shen.t_op_kuaidi['<27>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD>ʱ<EFBFBD>']:=frm_data_share.t_code_send_address['<27>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD>ʱ<EFBFBD>'];
|
|
|
close;
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_send_address.bsSkinButton7Click(Sender: TObject);
|
|
|
var aAdoQuery:TAdoQuery;
|
|
|
begin
|
|
|
aAdoQuery:=CreateAdoQuery;
|
|
|
with aAdoQuery do
|
|
|
try
|
|
|
Close;Sql.Clear;
|
|
|
sql.add('select * from t_crm_client ');
|
|
|
sql.add('where <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><>'''' and ͨѶ<CDA8><D1B6>ַ<>'''' and <20>ͻ<EFBFBD>ȫ<EFBFBD><C8AB><>'''' and <20><><EFBFBD>˵绰<>'''' and '+open_data('0008','¼<><C2BC><EFBFBD><EFBFBD>','<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>','<27>ͷ<EFBFBD>Ա','no','no')+' order by <20><><EFBFBD><EFBFBD>');
|
|
|
open;First;
|
|
|
while not eof do
|
|
|
begin
|
|
|
if frm_data_share.t_code_send_address.Locate('<27>ռ<EFBFBD><D5BC>˹<EFBFBD>˾',FieldByName('<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>').AsString,[]) then
|
|
|
begin
|
|
|
frm_data_share.t_code_send_address.Edit;
|
|
|
frm_data_share.t_code_send_address['<27>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=aAdoQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>'];
|
|
|
// frm_data_share.t_code_send_address['<27>ռ<EFBFBD><D5BC>˹<EFBFBD>˾']:=aAdoQuery['<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>'];
|
|
|
frm_data_share.t_code_send_address['<27>ռ<EFBFBD><D5BC>˵<EFBFBD>ַ']:=aAdoQuery['ͨѶ<CDA8><D1B6>ַ'];
|
|
|
frm_data_share.t_code_send_address['Ŀ<>ĵ<EFBFBD>']:=aAdoQuery['ͨѶ<CDA8><D1B6>ַ'];
|
|
|
frm_data_share.t_code_send_address['<27>ռ<EFBFBD><D5BC>˵绰']:=aAdoQuery['<27><><EFBFBD>˵绰'];
|
|
|
frm_data_share.t_code_send_address['<27>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD>ʱ<EFBFBD>']:='null';
|
|
|
frm_data_share.t_code_send_address.post;
|
|
|
|
|
|
|
|
|
end
|
|
|
else
|
|
|
begin
|
|
|
frm_data_share.t_code_send_address.Insert;
|
|
|
frm_data_share.t_code_send_address['<27>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=aAdoQuery['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>'];
|
|
|
frm_data_share.t_code_send_address['<27>ռ<EFBFBD><D5BC>˹<EFBFBD>˾']:=aAdoQuery['<27>ͻ<EFBFBD>ȫ<EFBFBD><C8AB>'];
|
|
|
frm_data_share.t_code_send_address['<27>ռ<EFBFBD><D5BC>˵<EFBFBD>ַ']:=aAdoQuery['ͨѶ<CDA8><D1B6>ַ'];
|
|
|
frm_data_share.t_code_send_address['Ŀ<>ĵ<EFBFBD>']:=aAdoQuery['ͨѶ<CDA8><D1B6>ַ'];
|
|
|
frm_data_share.t_code_send_address['<27>ռ<EFBFBD><D5BC>˵绰']:=aAdoQuery['<27><><EFBFBD>˵绰'];
|
|
|
frm_data_share.t_code_send_address['<27>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD>ʱ<EFBFBD>']:='null';
|
|
|
frm_data_share.t_code_send_address.post;
|
|
|
end;
|
|
|
Next;
|
|
|
end;
|
|
|
finally
|
|
|
Free;
|
|
|
end;
|
|
|
|
|
|
end;
|
|
|
|
|
|
procedure Tfrm_code_send_address.bsSkinButton8Click(Sender: TObject);
|
|
|
var
|
|
|
str:widestring;
|
|
|
begin
|
|
|
str:='';
|
|
|
if bsSkinEdit1.text<>''then
|
|
|
begin
|
|
|
str:=str+' where <20>ռ<EFBFBD><D5BC>˹<EFBFBD>˾ like '+''''+'%'+bsSkinEdit1.text+'%'+'''';
|
|
|
end;
|
|
|
frm_data_share.t_code_send_address.close;
|
|
|
frm_data_share.t_code_send_address.sql.clear;
|
|
|
frm_data_share.t_code_send_address.sql.add('select * from t_code_send_address '+str+' order by <20>ռ<EFBFBD><D5BC>˹<EFBFBD>˾');
|
|
|
frm_data_share.t_code_send_address.open;
|
|
|
|
|
|
end;
|
|
|
|
|
|
end.
|