|
|
|
|
unit u_sys_ask;
|
|
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
|
|
uses
|
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|
|
|
|
Dialogs, BusinessSkinForm, bsSkinCtrls, StdCtrls, ComCtrls,IdFTP,IdFTPCommon;
|
|
|
|
|
|
|
|
|
|
type
|
|
|
|
|
Tfrm_sys_ask = class(TForm)
|
|
|
|
|
bsBusinessSkinForm1: TbsBusinessSkinForm;
|
|
|
|
|
OpenDialog1: TOpenDialog;
|
|
|
|
|
bsSkinGroupBox1: TbsSkinGroupBox;
|
|
|
|
|
RichEdit1: TMemo;
|
|
|
|
|
bsSkinPanel1: TbsSkinPanel;
|
|
|
|
|
bsSkinButton2: TbsSkinButton;
|
|
|
|
|
bsSkinButton1: TbsSkinButton;
|
|
|
|
|
bsSkinButton5: TbsSkinButton;
|
|
|
|
|
procedure bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
procedure bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
private
|
|
|
|
|
{ Private declarations }
|
|
|
|
|
public
|
|
|
|
|
{ Public declarations }
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
var
|
|
|
|
|
frm_sys_ask: Tfrm_sys_ask;
|
|
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
|
|
uses u_data_share, u_main, my_sys_function;
|
|
|
|
|
|
|
|
|
|
{$R *.dfm}
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_sys_ask.bsSkinButton5Click(Sender: TObject);
|
|
|
|
|
begin
|
|
|
|
|
close;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_sys_ask.bsSkinButton2Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
IdFTP1:TIdFTP;
|
|
|
|
|
str:widestring;
|
|
|
|
|
str_file:widestring;
|
|
|
|
|
begin
|
|
|
|
|
if not OpenDialog1.Execute then
|
|
|
|
|
exit;
|
|
|
|
|
update_jiandu;
|
|
|
|
|
try
|
|
|
|
|
str:=OpenDialog1.FileName;
|
|
|
|
|
str_file:=frm_data_share.t_sys_company.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString
|
|
|
|
|
+employee
|
|
|
|
|
+FormatDateTime('yyyy',now)
|
|
|
|
|
+FormatDateTime('mm',now)
|
|
|
|
|
+FormatDateTime('dd',now)
|
|
|
|
|
+FormatDateTime('hh',now)
|
|
|
|
|
+FormatDateTime('nn',now)+'.'+copy(str,pos('.',str)+1,length(str)-pos('.',str));
|
|
|
|
|
IdFTP1:=TIdFTP.Create(application);
|
|
|
|
|
with idftp1 do
|
|
|
|
|
begin
|
|
|
|
|
Connect;
|
|
|
|
|
end;
|
|
|
|
|
con_net:=false;
|
|
|
|
|
idftp1.ChangeDir('/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3>ҵ<EFBFBD><D2B5>/<2F><><EFBFBD><EFBFBD>');
|
|
|
|
|
idftp1.TransferType:=ftBinary;
|
|
|
|
|
idftp1.Put(str,str_file);
|
|
|
|
|
idftp1.Disconnect;
|
|
|
|
|
showmessage('<27><><EFBFBD>ⷴ<EFBFBD><E2B7B4><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
except
|
|
|
|
|
con_net:=true;
|
|
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⷴ<EFBFBD><E2B7B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
idftp1.Free;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
procedure Tfrm_sys_ask.bsSkinButton1Click(Sender: TObject);
|
|
|
|
|
var
|
|
|
|
|
IdFTP1:TIdFTP;
|
|
|
|
|
str:widestring;
|
|
|
|
|
str_file:widestring;
|
|
|
|
|
begin
|
|
|
|
|
if RichEdit1.text='' then
|
|
|
|
|
exit;
|
|
|
|
|
update_jiandu;
|
|
|
|
|
try
|
|
|
|
|
str:=ExtractFilePath(application.ExeName)
|
|
|
|
|
+frm_data_share.t_sys_company.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString
|
|
|
|
|
+employee
|
|
|
|
|
+FormatDateTime('yyyy',now)
|
|
|
|
|
+FormatDateTime('mm',now)
|
|
|
|
|
+FormatDateTime('dd',now)
|
|
|
|
|
+FormatDateTime('hh',now)
|
|
|
|
|
+FormatDateTime('nn',now)+'.txt';
|
|
|
|
|
str_file:=frm_data_share.t_sys_company.fieldbyname('<27><><EFBFBD><EFBFBD>').AsString
|
|
|
|
|
+employee
|
|
|
|
|
+FormatDateTime('yyyy',now)
|
|
|
|
|
+FormatDateTime('mm',now)
|
|
|
|
|
+FormatDateTime('dd',now)
|
|
|
|
|
+FormatDateTime('hh',now)
|
|
|
|
|
+FormatDateTime('nn',now)+'.txt';
|
|
|
|
|
RichEdit1.lines.SaveToFile(str);
|
|
|
|
|
|
|
|
|
|
IdFTP1:=TIdFTP.Create(application);
|
|
|
|
|
with idftp1 do
|
|
|
|
|
begin
|
|
|
|
|
// Username:='xhdsoft.com';
|
|
|
|
|
// Password:='fgerHJKy678';
|
|
|
|
|
// Host:='218.107.216.42';
|
|
|
|
|
Connect;
|
|
|
|
|
end;
|
|
|
|
|
con_net:=false;
|
|
|
|
|
idftp1.ChangeDir('/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3>ҵ<EFBFBD><D2B5>/<2F><><EFBFBD><EFBFBD>');
|
|
|
|
|
idftp1.TransferType:=ftBinary;
|
|
|
|
|
idftp1.Put(str,str_file);
|
|
|
|
|
idftp1.Disconnect;
|
|
|
|
|
showmessage('ʮ<>ָ<EFBFBD>л<EFBFBD><D0BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飬<EFBFBD><E9A3AC><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
deletefile(str);
|
|
|
|
|
except
|
|
|
|
|
deletefile(str);
|
|
|
|
|
con_net:=true;
|
|
|
|
|
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><DCA3><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ⷴ<EFBFBD><E2B7B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
|
|
|
|
end;
|
|
|
|
|
idftp1.Free;
|
|
|
|
|
end;
|
|
|
|
|
|
|
|
|
|
end.
|