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.
129 lines
3.2 KiB
Plaintext
129 lines
3.2 KiB
Plaintext
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('简称').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('/航运物流管理系统/航运物流管理系统企业版/反馈');
|
|
idftp1.TransferType:=ftBinary;
|
|
idftp1.Put(str,str_file);
|
|
idftp1.Disconnect;
|
|
showmessage('问题反馈成功!!');
|
|
except
|
|
con_net:=true;
|
|
showmessage('与服务器连接失败,不能进行问题反馈!!');
|
|
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('简称').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('简称').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('/航运物流管理系统/航运物流管理系统企业版/反馈');
|
|
idftp1.TransferType:=ftBinary;
|
|
idftp1.Put(str,str_file);
|
|
idftp1.Disconnect;
|
|
showmessage('十分感谢你对我们提出的宝贵建议,反馈成功!!');
|
|
deletefile(str);
|
|
except
|
|
deletefile(str);
|
|
con_net:=true;
|
|
showmessage('与服务器连接失败,不能进行问题反馈!!');
|
|
end;
|
|
idftp1.Free;
|
|
end;
|
|
|
|
end.
|