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.

1196 lines
34 KiB
Plaintext

11 months ago
{$INCLUDE t_main.inc}
unit u_main;
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ImgList, bsSkinData, BusinessSkinForm, DB, ADODB, bsSkinCtrls,
ComCtrls, bsSkinTabs, ExtCtrls, StdCtrls, Menus, AppEvnts,inifiles,
jpeg, Mask, DBCtrls, NMUDP,ShellApi,Registry,
RxCombos, bsSkinBoxCtrls, RxMemDS,Winsock, wwdbedit, Wwdotdot, Wwdbcomb,
RxLookup, ActnList, Grids, Buttons, ToolWin,
DBActns,Regware2, IdComponent, IdTCPConnection,
IdTCPClient, IdMessageClient, IdSMTP, IdBaseComponent, IdMessage,Client_TLB,
IdExplicitTLSClientServerBase, IdSMTPBase;
type
//tloaddll=procedure(username:pchar); stdcall;
// tsendmsg=procedure(cmd,msgtitle,msg,revname:pchar); stdcall;
Tfrm_main = class(TForm)
db: TADOConnection;
bsBusinessSkinForm1: TbsBusinessSkinForm;
bsStoredSkin1: TbsStoredSkin;
ApplicationEvents1: TApplicationEvents;
imglMain: TImageList;
t_info_bulletin: TADOQuery;
t_info_bulletin1: TDataSource;
t_info_plan: TADOQuery;
t_info_plan1: TDataSource;
t_info_tell: TADOQuery;
t_info_tell1: TDataSource;
Timer1: TTimer;
t_chat_man: TRxMemoryData;
t_chat_man1: TDataSource;
t_info_leaveword: TADOQuery;
t_info_leaveword1: TDataSource;
t_sum_ctn: TRxMemoryData;
t_sys_message_no: TADOQuery;
t_sys_message_yes: TADOQuery;
t_sys_message_yes1: TDataSource;
t_do_shenhe_fee: TADOQuery;
t_do_shenhe_other: TADOQuery;
qryTmp: TADOQuery;
ActionList1: TActionList;
p_kaoqin: TADOStoredProc;
bsSkinData1: TbsSkinData;
qrytmp2: TADOQuery;
bsStoredSkin2: TbsStoredSkin;
bsStoredSkin3: TbsStoredSkin;
bsStoredSkin4: TbsStoredSkin;
Panel1: TPanel;
IdMsg: TIdMessage;
SMTP1: TIdSMTP;
RegwareII1: TRegwareII;
t_sys_soft_rg: TADOQuery;
Timer2: TTimer;
qrytmp3: TADOQuery;
webdb: TADOConnection;
qryweb: TADOQuery;
qryweb2: TADOQuery;
NMUDP: TNMUDP;
function SearchTabs(formName:string;formcaption:string;tabname:string=''):TtabSheet;//<2F><><EFBFBD><EFBFBD>TABҳ
procedure freeTabs(formName:string);//<2F><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ<EFBFBD>TABҳ
procedure view_momo(DataSource1:TDataSource;fi:string;b_ReadOnly:Boolean = false); //<2F><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ô<EFBFBD><C3B4><EFBFBD><EFBFBD>ݵ<EFBFBD><DDB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
procedure Timer1Timer(Sender: TObject);//<2F><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure NMUDPDataReceived(Sender: TComponent; NumberBytes: Integer;
FromIP: String; Port: Integer);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
procedure dxDBGrid4Click(Sender: TObject);
procedure ApplicationEvents1Exception(Sender: TObject; E: Exception); //<2F><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
procedure FormShow(Sender: TObject);
procedure dbBeforeConnect(Sender: TObject);
procedure ApplicationEvents1ShortCut(var Msg: TWMKey;
var Handled: Boolean);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݼ<EFBFBD>
procedure Timer2Timer(Sender: TObject);//<2F><><EFBFBD>ö<EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD>
procedure webdbBeforeConnect(Sender: TObject);//<2F><>ҳ<EFBFBD><D2B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
private
{ Private declarations }
procedure getview(t_project:boolean); //true<75><65>false<73>ɽ<EFBFBD><C9BD><EFBFBD>
procedure LoadView; //<2F><><EFBFBD><EFBFBD>Ƥ<EFBFBD><C6A4><EFBFBD>л<EFBFBD>
// procedure loaddsdll ;
// procedure Mymessage(var t:TWmCopyData);message WM_COPYDATA;
public
{ Public declarations }
end;
var
frm_main: Tfrm_main;
employee,department,subComp,emppassword,emailAddr,emptel,empmobil,employeecode:string;//<2F><>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD><EFBFBD>š<EFBFBD><C5A1>ֹ<EFBFBD>˾<EFBFBD><CBBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// sl_histroy:tstringlist;
EmpDr,EmpCr,EmpProfit,modify_all:boolean; //<2F><><EFBFBD><EFBFBD><EFBFBD>޸ı<DEB8><C4B1><EFBFBD>
if_ch_delete_do:boolean; //<2F>ж<EFBFBD><D0B6>Ƿ<EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD>ӷ<EFBFBD><D3B7><EFBFBD>
delete_do_type_num:integer; //ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if_log:boolean; //<2F>Ƿ<EFBFBD><C7B7>ѵ<EFBFBD>¼
LocalIP: String; //<2F><><EFBFBD><EFBFBD>IP<49><50>ַ
BroadCastIP: String; //<2F><EFBFBD><E3B2A5>Ϣ<EFBFBD><CFA2>ַ<EFBFBD><D6B7>
G_ZWCHK : String; //˰<><CBB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 109:TRUE <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FALSE <20><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
G_Arrivdate : String; //<2F><><EFBFBD>˼<EFBFBD><CBBC><EFBFBD> 110:true <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڲ<EFBFBD>Ϊ<EFBFBD><CEAA> false <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD>Ϊ<EFBFBD><CEAA>
backstate,orderState:string ; //<2F><><EFBFBD><EFBFBD> <20>˲<EFBFBD> ҵ<><D2B5>״̬
showprice:booLean ; //<2F>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD>
t_project:boolean ; //<2F><><EFBFBD><EFBFBD><EFBFBD>л<EFBFBD> True: tree , False:<3A>Ͻ<EFBFBD><CFBD><EFBFBD>
msgclient:Iimclient; //<2F><>ʱ<EFBFBD><CAB1>Ϣ<EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD>COM<4F>ӿ<EFBFBD>
isclosewoke,isopenwoke:string;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ر<EFBFBD><D8B1><EFBFBD><EFBFBD>ѿͻ<D1BF><CDBB><EFBFBD>
yctx:string ; //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD>
procedure getmsg(msg:widestring); //<2F><><EFBFBD>ռ<EFBFBD>ʱ<EFBFBD><CAB1>Ϣ<EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>Ϣ
implementation
uses u_sys_about, my_sys_function,u_data_share, u_op_memo,
u_sys_close,u_sys_progress, my_sys_chat,
u_sys_message_pri, u_info_tell, u_sys_login, u_sys_module, u_tree_main,
u_dxbar_main, u_chrat_message, U_op_fee_view, u_ch_fee_check_seae,
u_ch_fee_check_seai, u_ch_fee_check_aire, u_ch_fee_check_airi,
u_ch_fee_check_airtruck, u_ch_invoice_check, u_ch_invoice,
u_ch_check_check, U_op_state_view, u_op_seae_edi_cma, U_op_fee_view_all,
u_rp_op_ttl, U_SHIPINGBOX_SI;
{$R *.DFM}
procedure Tfrm_main.view_momo(DataSource1:TDataSource;fi:string;b_ReadOnly:Boolean=false); //<2F><EFBFBD>ֶ<EFBFBD><D6B6><EFBFBD><EFBFBD><EFBFBD>
begin
if DataSource1.DataSet.IsEmpty then
exit;
try
frm_op_memo:=Tfrm_op_memo.Create(self);
frm_op_memo.DBMemo1.DataSource:=DataSource1;
frm_op_memo.DBMemo1.DataField:=fi;
frm_op_memo.DBMemo1.ReadOnly:=b_ReadOnly;
frm_op_memo.caption:=fi;
frm_op_memo.ShowModal;
finally
frm_op_memo.free;
end;
end;
function Tfrm_main.SearchTabs(formName:string;formcaption:string;tabname:string=''):TtabSheet; //<2F><><EFBFBD><EFBFBD> <20><>Ӧtab
var
i:integer;
TabSheet: TbsSkinTabSheet;
curpagectl:TbsSkinPageControl;
begin
if t_project then curpagectl:=frm_tree_main.bsSkinPageControl1
else curpagectl:=frm_dxbar_main.bsSkinPageControl1 ;
for i:=0 to curpagectl.PageCount -1 do
begin
if curpagectl.Pages[i].TabVisible then
begin
if curpagectl.Pages[i].Hint=formName then
begin
curpagectl.ActivePageIndex :=i;
result:=curpagectl.Pages[curpagectl.ActivePageIndex] ;
exit;
end;
end ;
end;
TabSheet:=TbsSkinTabSheet.create(self);
TabSheet.PageControl:=curpagectl ;
curpagectl.ActivePageIndex :=curpagectl.PageCount-1;
curpagectl.Pages[curpagectl.ActivePageIndex].Hint:=formName;
if tabname<>'' then
curpagectl.Pages[curpagectl.ActivePageIndex].Name:='tab'+tabname;
curpagectl.Pages[curpagectl.ActivePageIndex].caption:=formcaption;
result:=curpagectl.Pages[curpagectl.ActivePageIndex] ;
end;
procedure Tfrm_main.freeTabs(formName:string);
var
i:integer;
curpagectl:TbsSkinPageControl;
begin
if t_project then curpagectl:=frm_tree_main.bsSkinPageControl1
else curpagectl:=frm_dxbar_main.bsSkinPageControl1 ;
for i:=0 to curpagectl.PageCount -1 do
begin
if curpagectl.Pages[i].TabVisible then
begin
if curpagectl.Pages[i].Hint=formName then
begin
curpagectl.Pages[i].free ;
break;
end;
end ;
end;
end;
procedure Tfrm_main.Timer1Timer(Sender: TObject);
var
now_str,tel_str:string;
get_str,do_str:integer;
begin
//<2F><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if t_info_tell.IsEmpty then
begin
Timer1.enabled:=false;
exit;
end;
do_str:=86400;
t_info_tell.first;
now_str:=FormatDateTime('yyyy',now)
+FormatDateTime('mm',now)
+FormatDateTime('dd',now)
+FormatDateTime('hh',now)
+FormatDateTime('nn',now);
while not t_info_tell.eof do
begin
tel_str:=FormatDateTime('yyyy',t_info_tell.fieldbyname('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').asdatetime)
+FormatDateTime('mm',t_info_tell.fieldbyname('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').asdatetime)
+FormatDateTime('dd',t_info_tell.fieldbyname('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').asdatetime)
+FormatDateTime('hh',t_info_tell.fieldbyname('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').asdatetime)
+FormatDateTime('nn',t_info_tell.fieldbyname('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').asdatetime);
if tel_str=now_str then
begin
try
Timer1.enabled:=false;
frm_info_tell:=tfrm_info_tell.Create (self);
frm_info_tell.ShowModal;
finally
frm_info_tell.Free;
frm_info_tell:= nil;
Timer1.Interval:=10000;
Timer1.enabled:=true;
end;
end
else
begin
if (FormatDateTime('yyyy',t_info_tell.fieldbyname('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').asdatetime)=FormatDateTime('yyyy',now))
and(FormatDateTime('mm',t_info_tell.fieldbyname('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').asdatetime)=FormatDateTime('mm',now))
and(FormatDateTime('dd',t_info_tell.fieldbyname('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').asdatetime)=FormatDateTime('dd',now)) then
begin
get_str:=(strtoint(FormatDateTime('hh',t_info_tell.fieldbyname('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').asdatetime))-
strtoint(FormatDateTime('hh',now)))*60*60+
(strtoint(FormatDateTime('nn',t_info_tell.fieldbyname('<27><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>').asdatetime))-
strtoint(FormatDateTime('nn',now)))*60;
if (get_str<do_str) and (get_str>0) then
do_str:=get_str;
end;
end;
t_info_tell.next;
end;
if do_str=86400 then
begin
Timer1.enabled:=false;
end
else if do_str<>0 then
begin
Timer1.enabled:=false;
Timer1.Interval:=1000*(do_str-1);
Timer1.enabled:=true;
end
else
begin
Timer1.enabled:=false;
end;
end;
procedure Tfrm_main.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
try
frm_sys_close:=Tfrm_sys_close.Create(self);
frm_sys_close.ShowModal;
if frm_sys_close.ModalResult = mrOk then
CanClose:=True
else
CanClose:=False;
finally
frm_sys_close.Free;
end;
end;
procedure Tfrm_main.NMUDPDataReceived(Sender: TComponent;
NumberBytes: Integer; FromIP: String; Port: Integer);
var
msg:array[1..255] of Char;
from_ip,from_type,from_emp:wideString;
i:integer;
tell_str:string;
begin
if not strtobool(get_parameters_value(192,'false')) then Exit;
//<2F><><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
if not if_log then
exit;
if employee='' then
exit;
NMUDP.ReadBuffer(msg,i);
from_ip:=Trim(Copy(Msg,1,16));
from_type:=Trim(Copy(Msg,17,2));
from_emp:=Trim(Copy(Msg,19,10));
tell_str:=Copy(Msg,29,i-28);
try
strtoint(from_type);
except
exit;
end;
case strtoint(from_type) of
1:
begin
if (from_ip<>LocalIP) and (from_emp=employee)then
begin
// showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʺ<EFBFBD><CABA>ڱ<EFBFBD><DAB1>ĵ<EFBFBD><C4B5><EFBFBD><EFBFBD>ϵ<EFBFBD>½<EFBFBD><C2BD><EFBFBD><EFBFBD><E3BDAB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD>');
// application.Terminate;
// exit;
end;
if (from_ip<>LocalIP) and (from_emp<>employee)then
begin
if t_chat_man.locate('<27><><EFBFBD><EFBFBD>ְԱ',from_emp,[]) then
begin
t_chat_man.edit;
t_chat_man['<27><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD>']:=from_ip;
t_chat_man.post;
end
else
begin
t_chat_man.insert;
t_chat_man['<27><><EFBFBD><EFBFBD>ְԱ']:=from_emp;
t_chat_man['<27><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD>']:=from_ip;
t_chat_man['<27><><EFBFBD><EFBFBD>']:=false;
if frm_data_share.t_sys_employee.locate('<27><><EFBFBD><EFBFBD>',from_emp,[]) then
begin
t_chat_man['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
t_chat_man.post;
end;
Sendlogtell(from_ip);
exit;
end;
if (from_ip=LocalIP) and (from_emp=employee)then
begin
Sendlogtell(from_ip);
exit;
end;
end;
2:
begin
if t_chat_man.locate('<27><><EFBFBD><EFBFBD>ְԱ',from_emp,[]) then
begin
t_chat_man.edit;
t_chat_man['<27><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD>']:=from_ip;
t_chat_man.post;
end
else
begin
t_chat_man.insert;
t_chat_man['<27><><EFBFBD><EFBFBD>ְԱ']:=from_emp;
if frm_data_share.t_sys_employee.locate('<27><><EFBFBD><EFBFBD>',from_emp,[]) then
begin
t_chat_man['<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>']:=frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
end;
t_chat_man['<27><><EFBFBD>ڵ<EFBFBD><DAB5><EFBFBD>']:=from_ip;
t_chat_man.post;
end;
end;
3:
begin
if t_chat_man.locate('<27><><EFBFBD><EFBFBD>ְԱ',from_emp,[]) then
begin
t_chat_man.delete;
end;
end;
4,5:
begin
if from_emp<>employee then
begin
frm_chart_message.ChatMsgRichEdit.lines.add(from_emp+'<27><><EFBFBD><EFBFBD>˵<EFBFBD><CBB5>('+datetimetostr(now)+')'+tell_str); //???
if frm_dxbar_main.bsSkinPageControl1.ActivePage.Hint='<27><> Ϣ <20><>' then //.bsSkinTabSheet2.Showing then
begin
t_sys_message_no.insert;
t_sys_message_no['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ';
t_sys_message_no['<27><><EFBFBD>ͷ<EFBFBD>']:=from_emp;
t_sys_message_no['<27><><EFBFBD>͵<EFBFBD>ַ']:=from_ip;
t_sys_message_no['<27><><EFBFBD>շ<EFBFBD>']:=employee;
t_sys_message_no['<27>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>']:=tell_str;
t_sys_message_no['<27>Ƿ<EFBFBD>֪<EFBFBD><D6AA>']:=1;
t_sys_message_no['ʱ<><CAB1>']:=now;
t_sys_message_no.post;
end
else
begin
t_sys_message_yes.insert;
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ';
t_sys_message_yes['<27><><EFBFBD>ͷ<EFBFBD>']:=from_emp;
t_sys_message_yes['<27><><EFBFBD>͵<EFBFBD>ַ']:=from_ip;
t_sys_message_yes['<27><><EFBFBD>շ<EFBFBD>']:=employee;
t_sys_message_yes['<27>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>']:=tell_str;
t_sys_message_yes['<27>Ƿ<EFBFBD>֪<EFBFBD><D6AA>']:=0;
t_sys_message_yes['ʱ<><CAB1>']:=now;
t_sys_message_yes.post;
tell_message(from_emp+'<27><><EFBFBD><EFBFBD>˵:'+tell_str);
end;
end;
end;
6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,27,28,29,30,31,32,33,34,
35,36,37,38,39,40,41,42,43,44,45,46,47,50,61,62,72:
begin
t_sys_message_yes.insert;
case strtoint(from_type)of
6:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1BDBB><EFBFBD><EFBFBD>';
end;
7:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>';
end;
8:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE>';
end;
9:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8>';
end;
10:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ò<EFBFBD><C3B2><EFBFBD><EFBFBD>ύ';
end;
11:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼<EFBFBD>޸<EFBFBD>';
end;
12:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ý<EFBFBD>ֹ<EFBFBD>޸<EFBFBD>';
end;
13:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>׼ɾ<D7BC><C9BE>';
end;
14:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ý<EFBFBD>ֹɾ<D6B9><C9BE>';
end;
15:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>Ʊ';
end;
16:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD>޸ķ<DEB8>Ʊ';
end;
17:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>֧<EFBFBD><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
18:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD>޸<EFBFBD>֧<EFBFBD><D6A7>';
end;
19:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
end;
20:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><>׼֧<D7BC><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
21:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><>׼<EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʊ';
end;
22:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뷢Ʊ';
end;
23:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><>׼<EFBFBD>޸ķ<DEB8>Ʊ';
end;
24:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><>ֹ<EFBFBD>޸ķ<DEB8>Ʊ';
end;
25:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD>뷢Ʊ<EBB7A2><C6B1><EFBFBD><EFBFBD>';
end;
26:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><>׼֧<D7BC><D6A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
27:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD><D6A7>';
end;
28:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><>׼<EFBFBD>޸<EFBFBD>֧<EFBFBD><D6A7>';
end;
29:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><>ֹ<EFBFBD>޸<EFBFBD>֧<EFBFBD><D6A7>';
end;
30:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27>շѺ<D5B7><D1BA><EFBFBD>֪ͨ';
end;
31:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27>շѺ<D5B7><D1BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
32:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27>շѺ<D5B7><D1BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
33:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27>շѺ<D5B7><D1BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
34:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>Ϳ<EFBFBD><CDBF><EFBFBD>';
end;
35:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>ȷ<EFBFBD>Ϸ<EFBFBD><CFB7><EFBFBD>';
end;
36:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ؿ<EFBFBD><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end;
37:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɳ<EFBFBD>';
end;
38:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD>ɳ<EFBFBD>';
end;
39:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˰ȷ<CBB0><C8B7>';
end;
40:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ȷ<EFBFBD><C8B7>';
end;
41:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='ҵ<><D2B5><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>';
end;
42:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>';
end;
43:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='ҵ<><D2B5><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>';
end;
44:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>';
end;
45:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>';
end;
46:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27>ͻ<EFBFBD>ת<EFBFBD><D7AA>ͨ<EFBFBD><CDA8>';
end;
47:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ؿͻ<D8BF>ת<EFBFBD><D7AA>';
end;
50:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD>˷<EFBFBD><CBB7>ý<EFBFBD><C3BD><EFBFBD>';
end;
61:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD>ó<EFBFBD><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end ;
62:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD>۶<EFBFBD><DBB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end ;
72:
begin
t_sys_message_yes['<27><><EFBFBD><EFBFBD>']:='<27><><EFBFBD>۶<EFBFBD><DBB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>';
end ;
end;
t_sys_message_yes['<27><><EFBFBD>ͷ<EFBFBD>']:=from_emp;
t_sys_message_yes['<27><><EFBFBD>͵<EFBFBD>ַ']:=from_ip;
t_sys_message_yes['<27><><EFBFBD>շ<EFBFBD>']:=employee;
t_sys_message_yes['<27>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>']:=tell_str;
t_sys_message_yes['<27>Ƿ<EFBFBD>֪<EFBFBD><D6AA>']:=0;
t_sys_message_yes['ʱ<><CAB1>']:=now;
t_sys_message_yes.post;
tell_message(from_emp+'<27><><EFBFBD><EFBFBD>˵:'+tell_str);
end;
48:
begin
tell_message(from_emp+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+tell_str);
t_info_bulletin.Requery();
end;
49:
begin
tell_message(from_emp+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+tell_str);
t_info_leaveword.Requery();
end;
51:
begin
if not strtobool(get_parameters_value(4,'false')) then
tell_message(from_emp+'<27><><EFBFBD>Ŀͻ<C4BF>:'+tell_str);
with frm_data_share do
begin
t_crm_client.Requery();
t_crm_client_all.Requery();
t_crm_client_ship.Requery();
t_crm_client_changzhan.Requery();
t_crm_client_truck.Requery();
t_crm_client_hangkong.Requery();
t_crm_client_baoguan.Requery();
t_crm_client_weituo.Requery();
t_crm_client_daili.Requery();
t_crm_client_huodai.Requery();
t_crm_client_shiper.Requery();
t_crm_client_shouhuo.Requery();
t_crm_client_tongzhi.Requery();
t_crm_client_other.Requery();
end;
end;
52:
begin
tell_message(from_emp+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:'+tell_str);
end;
53:
begin
if not strtobool(get_parameters_value(4,'false')) then
tell_message(from_emp+'<27>ͻ<EFBFBD>ͨ<EFBFBD><CDA8>:'+tell_str);
with frm_data_share do
begin
t_crm_client.Requery();
t_crm_client_all.Requery();
t_crm_client_ship.Requery();
t_crm_client_changzhan.Requery();
t_crm_client_truck.Requery();
t_crm_client_hangkong.Requery();
t_crm_client_baoguan.Requery();
t_crm_client_weituo.Requery();
t_crm_client_daili.Requery();
t_crm_client_huodai.Requery();
t_crm_client_shiper.Requery();
t_crm_client_shouhuo.Requery();
t_crm_client_tongzhi.Requery();
t_crm_client_other.Requery();
end;
end;
54:
begin
with frm_data_share do
begin
t_crm_client.Requery();
t_crm_client_all.Requery();
t_crm_client_ship.Requery();
t_crm_client_changzhan.Requery();
t_crm_client_truck.Requery();
t_crm_client_hangkong.Requery();
t_crm_client_baoguan.Requery();
t_crm_client_weituo.Requery();
t_crm_client_daili.Requery();
t_crm_client_huodai.Requery();
t_crm_client_shiper.Requery();
t_crm_client_shouhuo.Requery();
t_crm_client_tongzhi.Requery();
t_crm_client_other.Requery();
end;
end;
55:
begin
frm_data_share.t_sys_parameters_value.requery;
end;
56:
begin
frm_data_share.t_code_fee.requery;
end;
57:
begin
frm_data_share.t_code_currency.requery;
end;
58:
begin
frm_data_share.t_code_ctn.requery;
frm_data_share.t_code_ctn_de.requery;
frm_data_share.t_code_ctn_kind.requery;
end;
59:
begin
frm_data_share.t_sys_code_emp.Requery();
frm_data_share.t_sys_code_data.Requery();
end;
60:
begin
tell_message(from_emp+'<27>˲<EFBFBD><CBB2><EFBFBD><EFBFBD><EFBFBD>:'+tell_str);
t_sys_message_no.Requery();
end ;
161:
begin
tell_message(tell_str);
end;
end;
end;
procedure Tfrm_main.dxDBGrid4Click(Sender: TObject);
begin
{ if not t_chat_man.IsEmpty then
begin
RxDBLookupCombo1.DisplayValue:=t_chat_man.fieldbyname('<27><><EFBFBD><EFBFBD>ְԱ').asstring;
end
else
begin
RxDBLookupCombo1.ClearValue;
end;
}
end;
procedure Tfrm_main.ApplicationEvents1Exception(Sender: TObject;
E: Exception);
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if pos('PRIM',UpperCase(E.Message))<>0 then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܱ<EFBFBD><DCB1><EFBFBD><E6A3AC>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD><EFBFBD>ݺ<EFBFBD><DDBA><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>');
// exit;
end;
if pos('Ψһ<CEA8><D2BB><EFBFBD><EFBFBD>',UpperCase(E.Message))<>0 then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD><D8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܱ<EFBFBD><DCB1><EFBFBD><E6A3AC>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD><EFBFBD>ݺ<EFBFBD><DDBA><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>');
// exit;
end;
if pos('NULL',UpperCase(E.Message))<>0 then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EEB2BB>Ϊ<EFBFBD>գ<EFBFBD><D5A3><EFBFBD>ǰ<EFBFBD>޸IJ<DEB8><C4B2>ܱ<EFBFBD><DCB1><EFBFBD>'+#13#10+'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>');
// exit;
end;
if pos('SOME VALUES MAY HAVE BEEN CHANGED',UpperCase(E.Message))<>0 then
begin
showmessage('<27><><EFBFBD><EFBFBD><EFBFBD>Ѿ<EFBFBD><D1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>޸ģ<DEB8><C4A3><EFBFBD>ǰ<EFBFBD>޸IJ<DEB8><C4B2>ܱ<EFBFBD><DCB1><EFBFBD>'+#13#10+'<27><>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD><EFBFBD>ݺ<EFBFBD><DDBA><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>');
// exit;
end;
if (pos('connection', lowercase(E.Message))<>0) or (pos('dbnmp', lowercase(E.Message))<>0) then
begin
showmessage('<27><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD>Ӵ<EFBFBD><D3B4><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>򣡣<EFBFBD>');
// application.Terminate;
// exit;
end;
update_wenti(E);
end;
procedure Tfrm_main.FormShow(Sender: TObject);
begin
// bsSkinData1.LoadFromFile(ExtractFilePath(ParamStr(0))+'skins\skin.ini');
if not if_log then
begin
try
frm_sys_login:=tfrm_sys_login.Create (application);
frm_sys_login.ShowModal;
finally
frm_sys_login.Free;
frm_sys_login:=NIL;
end;
end;
G_ZWCHK:=get_parameters_value(109,'FALSE') ;
G_Arrivdate:=get_parameters_value(110,'false') ;
orderState:=get_parameters_value(114,'<27><><EFBFBD><EFBFBD>') ;
backstate:=get_parameters_value(113,'<27>˲<EFBFBD>') ;
getview(t_project);
// if not if_log then exit;
try
t_chat_man.close;
t_sys_message_no.close;
t_sys_message_yes.close;
t_do_shenhe_fee.close;
t_do_shenhe_other.close;
t_chat_man.open;
t_sys_message_no.open;
t_sys_message_yes.Parameters[0].value:=employee;
t_sys_message_yes.open;
t_do_shenhe_fee.sql.text:='select <20><>Ա,Ȩ<>޴<EFBFBD><DEB4><EFBFBD> from t_sys_code_emp'
+' where Ȩ<>޴<EFBFBD><DEB4><EFBFBD> in (''025'',''026'',''058'',''059'',''077'',''078'',''085'',''086'') and <20>Ƿ<EFBFBD><C7B7>ɲ<EFBFBD><C9B2><EFBFBD>=1'
+' and <20><>Ա in (select distinct <20><>Ա from t_sys_code_data where <20>Ƿ<EFBFBD><C7B7>ɲ<EFBFBD><C9B2><EFBFBD>=1 '
+' and <20><><EFBFBD><EFBFBD> in(''0011'',''0012'',''0013'',''0014'') and ְԱ='''+employee+''')';
t_do_shenhe_fee.open;
t_do_shenhe_other.open;
finally
LocalIp:=GetLocalIP;
SetBroadCastIP;
SendlogIn();
end;
{$IFDEF Primary}
caption := '<27><>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>ϵͳ(<28>ռ<EFBFBD><D5BC><EFBFBD>)';
{$ENDIF}
{$IFDEF Stand}
caption := '<27><>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>ϵͳ(<28><>׼<EFBFBD><D7BC>)';
{$ENDIF}
{$IFDEF Support}
caption := '<27><>ʤ<EFBFBD><CAA4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>ϵͳ '+subComp+' '+employee;
{$ENDIF}
Application.Title:=caption;
/////////////////<2F><><EFBFBD><EFBFBD> dll ģ<><C4A3>
//<2F><><EFBFBD>ݸ<EFBFBD><DDB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD><D0B6>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD>
if frm_data_share.t_sys_employee.Locate('<27><><EFBFBD><EFBFBD>',employee,[]) then begin
yctx:=frm_data_share.t_sys_employee.fieldbyname('Զ<><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD>').asstring;
isclosewoke:=frm_data_share.t_sys_employee.fieldbyname('<27><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7>涫ʤ<E6B6AB>ر<EFBFBD>').asstring;
end else yctx:='<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>' ;
if (yctx='<27><><EFBFBD><EFBFBD>') then
begin
end ;
end;
procedure Tfrm_main.dbBeforeConnect(Sender: TObject);
begin
db.ConnectionString:=connect_string('main.ini');
end;
procedure Tfrm_main.getview(t_project: boolean);
begin
if t_project then
begin
//<2F>½<EFBFBD><C2BD><EFBFBD>
LoadView ;
if not assigned(frm_tree_main) then
frm_tree_main:=tfrm_tree_main.Create (self);
frm_tree_main.ManualDock(Panel1,nil,alClient);
frm_tree_main.show;
end
else
begin
//<2F>ɽ<EFBFBD><C9BD><EFBFBD>
bsSkinData1.StoredSkin:=bsStoredSkin1 ;
if not assigned(frm_dxbar_main) then
frm_dxbar_main:=tfrm_dxbar_main.Create (self);
frm_dxbar_main.ManualDock(Panel1,nil,alClient);
frm_dxbar_main.show;
end ;
end;
procedure Tfrm_main.LoadView;
var inifile1:Tinifile;
skinName:string ;
begin
inifile1:=Tinifile.Create(ExtractFilePath(application.ExeName)+'main.ini');
skinName:=inifile1.readString('View','Viewskin','1') ;
if skinName='1' then frm_main.bsSkinData1.StoredSkin:=frm_main.bsStoredSkin1
else if skinName='2' then frm_main.bsSkinData1.StoredSkin:=frm_main.bsStoredSkin2
else if skinName='3' then frm_main.bsSkinData1.StoredSkin:=frm_main.bsStoredSkin3
else if skinName='4' then frm_main.bsSkinData1.StoredSkin:=frm_main.bsStoredSkin4 ;
inifile1.Free ;
end;
procedure Tfrm_main.ApplicationEvents1ShortCut(var Msg: TWMKey;
var Handled: Boolean);
var Shift : TShiftState;
begin
//<2F><><EFBFBD>ݼ<EFBFBD>
Shift:=KeyDataToShiftState(Msg.KeyData);
if Shift=[ssCtrl,ssShift] then begin
//CTRL+SHIFT+F12
case Msg.CharCode of
VK_F12 : begin
if not assigned(frm_sys_module) then
frm_sys_module:=tfrm_sys_module.Create (self);
frm_sys_module.ManualDock(frm_main.SearchTabs('frm_sys_module',frm_sys_module.caption),nil,alClient);
frm_sys_module.show;
end;
end;
end;
if Shift=[ssCtrl] then begin
case Msg.CharCode of
//CTRL+F1
VK_F1: begin
if not assigned(frm_op_fee_view) then
frm_op_fee_view:=tfrm_op_fee_view.Create (self);
frm_op_fee_view.ManualDock(frm_main.SearchTabs('frm_op_fee_view',frm_op_fee_view.caption),nil,alClient);
frm_op_fee_view.show;
end;
//CTRL+F2
VK_F2: begin
if if_reg(3001) and (not vold) then
begin
if not if_open('312') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
if not assigned(frm_op_state_view) then
frm_op_state_view:=tfrm_op_state_view.Create (self);
frm_op_state_view.ManualDock(frm_main.SearchTabs('frm_op_state_view',frm_op_state_view.caption),nil,alClient);
frm_op_state_view.show;
end;
end;
VK_F3: begin
if not assigned(frm_op_fee_view_all) then
frm_op_fee_view_all:=tfrm_op_fee_view_all.Create (self);
frm_op_fee_view_all.ManualDock(frm_main.SearchTabs('frm_op_fee_view_all',frm_op_fee_view_all.caption),nil,alClient);
frm_op_fee_view_all.show;
end;
VK_F5: begin
if not assigned(FRM_SHIPINGBOX_SI) then
FRM_SHIPINGBOX_SI:=tFRM_SHIPINGBOX_SI.Create (self);
FRM_SHIPINGBOX_SI.ManualDock(frm_main.SearchTabs('FRM_SHIPINGBOX_SI',FRM_SHIPINGBOX_SI.caption),nil,alClient);
FRM_SHIPINGBOX_SI.show;
end;
end;
end;
end;
{
procedure Tfrm_main.loaddsdll;
begin
DLLHandle := LoadLibrary('dsdll.dll');
try
if DLLHandle =0 then
begin
showmessage('<27><><EFBFBD><EFBFBD>dsdllʧ<6C>ܣ<EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>ͨѶ<CDA8><D1B6>');
exit ;
end ;
@funcload:= GetProcAddress(DLLHandle,'loaddllmsg');
@funcsend := GetProcAddress(DLLHandle,'senddllmsg');
if assigned(@funcload) then begin
// funcloadthreahhand:=CreateThread(nil,0,@funcload(pchar(employee)),nil,0,ThreadId);
funcload(pchar(employee));
end;
except
showmessage('<27><><EFBFBD><EFBFBD>dsdllʧ<6C>ܣ<EFBFBD>ϵͳ<CFB5><CDB3><EFBFBD><EFBFBD><EFBFBD>ܶ<EFBFBD><DCB6><EFBFBD>ͨѶ<CDA8><D1B6>');
exit ;
end;
end;
}
procedure getmsg(msg:widestring);
var
str,
stype,
bl,
bsno,
ttype:string;
RDATA:Boolean;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD>ͻ<EFBFBD><CDBB><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
str:=trim(msg);
if str='' then exit;
if pos('DSHUODAI',str)>0 then
str:=copy(str,pos('DSHUODAI',str)+8,length(str)-(pos('DSHUODAI',str)+7));
if str='' then exit;
stype:=copy(str,1,3);// <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD>
bl:=copy(str,4,1); // <20>Ƿ<EFBFBD>ֻ<EFBFBD>򿪴<EFBFBD>Ʊ
ttype:=copy(str,5,1);// ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
bsno:=copy(str,6,length(str)-5);// ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if (stype='006') or (stype='007') or (stype='008') then
begin
if ttype='1' then
begin
if not if_open('024') then
begin
exit;
end;
RDATA:=true;
if not assigned(frm_ch_fee_check_seae) then begin
frm_ch_fee_check_seae:=tfrm_ch_fee_check_seae.Create(Application);
RDATA:=false;
end;
frm_ch_fee_check_seae.ManualDock(frm_main.SearchTabs('frm_ch_fee_check_seae',frm_ch_fee_check_seae.caption,'30101'),nil,alClient);
frm_ch_fee_check_seae.show;
if RDATA then
frm_ch_fee_check_seae.t_op_seae.Requery();
if bsno<>'' then begin
frm_ch_fee_check_seae.t_op_seae.Locate('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',bsno,[]);
end;
end
else
if ttype='2' then
begin
if not if_open('060') then
begin
exit;
end;
RDATA:=true;
if not assigned(frm_ch_fee_check_seai) then begin
frm_ch_fee_check_seai:=tfrm_ch_fee_check_seai.Create (Application);
RDATA:=false;
end;
frm_ch_fee_check_seai.ManualDock(frm_main.SearchTabs('frm_ch_fee_check_seai',frm_ch_fee_check_seai.caption,'30102'),nil,alClient);
frm_ch_fee_check_seai.show;
if RDATA then
frm_ch_fee_check_seai.t_op_seai.requery();
if bsno<>'' then begin
frm_ch_fee_check_seai.t_op_seai.Locate('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',bsno,[]);
end;
end
else
if ttype='3' then
begin
if not if_open('076') then
begin
exit;
end;
RDATA:=true;
if not assigned(frm_ch_fee_check_aire) then begin
frm_ch_fee_check_aire:=tfrm_ch_fee_check_aire.Create (Application);
RDATA:=false;
end;
frm_ch_fee_check_aire.ManualDock(frm_main.SearchTabs('frm_ch_fee_check_aire',frm_ch_fee_check_aire.caption,'30103'),nil,alClient);
frm_ch_fee_check_aire.show;
if RDATA then
frm_ch_fee_check_aire.t_op_aire.requery();
if bsno<>'' then begin
frm_ch_fee_check_aire.t_op_aire.Locate('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',bsno,[]);
end;
end
else
if ttype='4'
then
begin
if not if_open('084') then
begin
exit;
end;
RDATA:=true;
if not assigned(frm_ch_fee_check_airi) then begin
frm_ch_fee_check_airi:=tfrm_ch_fee_check_airi.Create (Application);
RDATA:=false;
end;
frm_ch_fee_check_airi.ManualDock(frm_main.SearchTabs('frm_ch_fee_check_airi',frm_ch_fee_check_airi.caption,'30104'),nil,alClient);
frm_ch_fee_check_airi.show;
if RDATA then
frm_ch_fee_check_airi.t_op_airi.requery();
if bsno<>'' then begin
frm_ch_fee_check_airi.t_op_airi.Locate('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',bsno,[]);
end;
end
else
if ttype='5' then
begin
{$IFDEF JGCHE}
if not if_open('234') then
begin
exit;
end;
RDATA:=true;
if not assigned(frm_ch_fee_check_airtruck) then begin
frm_ch_fee_check_airtruck:=tfrm_ch_fee_check_airtruck.Create (Application);
RDATA:=false;
end;
frm_ch_fee_check_airtruck.ManualDock(frm_main.SearchTabs('frm_ch_fee_check_airtruck',frm_ch_fee_check_airtruck.caption,'306'),nil,alClient);
frm_ch_fee_check_airtruck.show;
if RDATA then
frm_ch_fee_check_airtruck.t_op_airtruck.requery();
if bsno<>'' then begin
frm_ch_fee_check_airtruck.t_op_airtruck.Locate('ҵ<><D2B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',bsno,[]);
end;
{$ENDIF}
end;
end else if (stype='015') or (stype='016') or (stype='019') then
begin
if strtobool(get_parameters_value(1,'false')) then begin
{$IFDEF FPSHENQING}
if not if_open('029') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
RDATA:=true;
if not assigned(frm_ch_invoice_check) then begin
frm_ch_invoice_check:=tfrm_ch_invoice_check.Create (Application);
RDATA:=false;
end;
frm_ch_invoice_check.ManualDock(frm_main.SearchTabs('frm_ch_invoice_check',frm_ch_invoice_check.caption,'412'),nil,alClient);
frm_ch_invoice_check.show;
if RDATA then
frm_ch_invoice_check.t_ch_invoice_shen.requery();
if bsno<>'' then begin
frm_ch_invoice_check.t_ch_invoice_shen.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',bsno,[]);
end;
{$ENDIF}
end
else
begin
if not if_open('030') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
RDATA:=true;
if not assigned(frm_ch_invoice) then begin
frm_ch_invoice:=tfrm_ch_invoice.Create (Application);
RDATA:=false;
end;
frm_ch_invoice.ManualDock(frm_main.SearchTabs('frm_ch_invoice',frm_ch_invoice.caption,'413'),nil,alClient);
frm_ch_invoice.show;
frm_ch_invoice.bsSkinPageControl1.ActivePageIndex:=2;
if RDATA then
frm_ch_invoice.t_ch_invoice_shen.requery();
if bsno<>'' then begin
frm_ch_invoice.t_ch_invoice_shen.Locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',bsno,[]);
end;
end;
end
else
if (stype='017') or (stype='018') then
begin
{$IFDEF FFLIUCHENG}
if not if_open('037') then
begin
showmessage('<27>Բ<EFBFBD><D4B2><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>д<EFBFBD>ģ<EFBFBD><C4A3><EFBFBD>IJ<EFBFBD><C4B2><EFBFBD>Ȩ<EFBFBD>ޣ<EFBFBD>');
exit;
end;
RDATA:=true;
if not assigned(frm_ch_check_check) then begin
frm_ch_check_check:=tfrm_ch_check_check.Create (Application);
RDATA:=false;
end;
frm_ch_check_check.ManualDock(frm_main.SearchTabs('frm_ch_check_check',frm_ch_check_check.caption,'452'),nil,alClient);
frm_ch_check_check.show;
if RDATA then
frm_ch_check_check.t_ch_check.requery();
if bsno<>'' then begin
frm_ch_check_check.t_ch_check.locate('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',bsno,[]);
end;
{$ENDIF}
end
else if (stype='100') then
begin
if not assigned(frm_op_fee_view) then begin
frm_op_fee_view:=tfrm_op_fee_view.Create (Application);
end;
frm_op_fee_view.ManualDock(frm_main.SearchTabs('frm_op_fee_view',frm_op_fee_view.caption),nil,alClient);
frm_op_fee_view.show;
frm_op_fee_view.Edit16.Text:=bsno;
frm_op_fee_view.bsSkinButton44.OnClick(nil);
end;
Application.Restore;
end;
procedure Tfrm_main.Timer2Timer(Sender: TObject);
begin
try
qrytmp3.Close;
qrytmp3.sql.Add('select <20><EFBFBD><E6B1BE> from t_sys_soft');
qrytmp3.open;
except
end;
end;
procedure Tfrm_main.webdbBeforeConnect(Sender: TObject);
var connstr:string;
begin
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣʱ<CFA2><CAB1>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD>ݿ⣬<DDBF><E2A3AC><EFBFBD><EFBFBD>ͬ<EFBFBD><CDAC><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>INI
connstr:=get_parameters_value(159,'false');
if strtobool(get_parameters_value(154,'false')) then
webdb.ConnectionString:=connstr
else
webdb.ConnectionString:=connect_string('main.ini')
end;
end.