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.

1213 lines
37 KiB
Plaintext

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{$INCLUDE t_main.inc}
unit u_main;
//Ö÷´°Ìå
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, IdHTTP;
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;
NMUDP: TNMUDP;
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;
subdb: TADOConnection;
db_file: TADOConnection;
db_rpt: TADOConnection;
IdHTTP1: TIdHTTP;
function SearchTabs(formName:string;formcaption:string;tabname:string=''):TtabSheet;//´´½¨TABÒ³
procedure freeTabs(formName:string);//¸ù¾Ý´°ÌåÃû³ÆÊÍ·ÅTABÒ³
procedure view_momo(DataSource1:TDataSource;fi:string;b_ReadOnly:Boolean=false); //±à¼­×Ö¶ÎÄÚÈÝ ¹«ÓôóÊý¾Ýµ¯³ö´°Ìå
procedure Timer1Timer(Sender: TObject);//¶¨Ê±¼ìË÷¼ÆʱÌáÐÑÐÅÏ¢
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure NMUDPDataReceived(Sender: TComponent; NumberBytes: Integer;
FromIP: String; Port: Integer);//½ÓÊÕÏûÏ¢ÌáÐÑ
procedure dxDBGrid4Click(Sender: TObject);
procedure ApplicationEvents1Exception(Sender: TObject; E: Exception); //´íÎóʼþ´¦Àí
procedure FormShow(Sender: TObject);
procedure dbBeforeConnect(Sender: TObject);
procedure ApplicationEvents1ShortCut(var Msg: TWMKey;
var Handled: Boolean);//³ÌÐò¿ì½Ý¼ü
procedure Timer2Timer(Sender: TObject);//×÷Óö¨Ê±¼ìË÷Êý¾Ý¿â·ÀÖ¹¶ÏÏß
procedure webdbBeforeConnect(Sender: TObject);
procedure subdbBeforeConnect(Sender: TObject);
procedure db_fileBeforeConnect(Sender: TObject);
procedure db_rptBeforeConnect(Sender: TObject);//ÍøÒ³¶ÀÁ¢Êý¾Ý¿âµÄÊý¾Ý¿âÁ¬½ÓÉèÖÃ
private
{ Private declarations }
procedure getview(t_project:boolean); //trueÐÂfalse¾É½çÃæ
procedure LoadView; //³ÌÐòƤ·ôÇл»
// procedure loaddsdll ;
// procedure Mymessage(var t:TWmCopyData);message WM_COPYDATA;
public
{ Public declarations }
end;
var
frm_main: Tfrm_main;
employee,department,subComp,emppassword,FeeControl,OpFeeName,MailAddress,MailPw,MailSignName:string;//ÈËÔ±¡¢²¿ÃÅ¡¢·Ö¹«Ë¾¡¢ÃÜÂë¡¢¸öÈËÇ©Ãû
// sl_histroy:tstringlist;
EmpDr,EmpCr,EmpProfit,modify_all,b_Submit:boolean; //ÔÊÐíÐ޸ıê¼Ç
if_ch_delete_do:boolean; //ÅжÏÊÇ·ñÈ¡ÏûÌí¼Ó·ÑÓÃ
delete_do_type_num:integer; //È¡Ïû·ÑÓÃÌí¼ÓÒµÎñÀàÐÍ
if_log:boolean; //ÊÇ·ñÒѵǼ
LocalIP: String; //±¾»úIPµØÖ·
BroadCastIP: String; //¹ã²¥ÏûÏ¢µØÖ·¶Î
G_ZWCHK : String; //Ë°Îñ»ü²é 109:TRUE Òþ²ØÕÊÎñ FALSE ÏÔʾÕÊÎñ
G_Arrivdate : String; //ÉóºË¼ì²é 110:true ¼ì²éÉóºËʱµ½´ïÈÕÆÚ²»Îª¿Õ false µ½´ïÈÕÆÚ¿ÉÒÔΪ¿Õ
backstate,orderState:string ; //¶©²Õ ÍË²Õ ÒµÎñ״̬
showprice:booLean ; //¿Í»§ÐÅÓþ·µ»ØÌؼÓ
t_project:boolean ; //½çÃæÇл» True: tree , False:ÀϽçÃæ
msgclient:Iimclient; //¼´Ê±ÏûÏ¢¿Í»§¶ËCOM½Ó¿Ú
isclosewoke,isopenwoke:string;//ÊÇ·ñËæ³ÌÐò¹Ø±ÕÌáÐÑ¿Í»§¶Ë
yctx:string ; //ÆôÓà ²»ÆôÓÃÏûÏ¢¿Í»§¶Ë
SelectedMulti :Boolean;
procedure getmsg(msg:widestring); //½ÓÊÕ¼´Ê±ÏûÏ¢¿Í»§¶ËÏûÏ¢
implementation
uses u_sys_about, my_sys_function,u_data_share, u_op_memo,
u_sys_close,u_sys_progress,
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_invoice_check, u_ch_invoice,
u_ch_check_check, U_op_state_view, u_op_seae_edi_cma, u_rp_cdfxg_total;
{$R *.DFM}
procedure Tfrm_main.view_momo(DataSource1:TDataSource;fi:string;b_ReadOnly:Boolean=false); //±à¼­×Ö¶ÎÄÚÈÝ
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.caption:=fi;
frm_op_memo.ShowModal;
finally
frm_op_memo.free;
end;
end;
function Tfrm_main.SearchTabs(formName:string;formcaption:string;tabname:string=''):TtabSheet; //²éÕÒ ÏàÓ¦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
//¼ÆʱÌáÐÑÄÚÈÝ
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('ÌáÐÑʱ¼ä').asdatetime)
+FormatDateTime('mm',t_info_tell.fieldbyname('ÌáÐÑʱ¼ä').asdatetime)
+FormatDateTime('dd',t_info_tell.fieldbyname('ÌáÐÑʱ¼ä').asdatetime)
+FormatDateTime('hh',t_info_tell.fieldbyname('ÌáÐÑʱ¼ä').asdatetime)
+FormatDateTime('nn',t_info_tell.fieldbyname('ÌáÐÑʱ¼ä').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('ÌáÐÑʱ¼ä').asdatetime)=FormatDateTime('yyyy',now))
and(FormatDateTime('mm',t_info_tell.fieldbyname('ÌáÐÑʱ¼ä').asdatetime)=FormatDateTime('mm',now))
and(FormatDateTime('dd',t_info_tell.fieldbyname('ÌáÐÑʱ¼ä').asdatetime)=FormatDateTime('dd',now)) then
begin
get_str:=(strtoint(FormatDateTime('hh',t_info_tell.fieldbyname('ÌáÐÑʱ¼ä').asdatetime))-
strtoint(FormatDateTime('hh',now)))*60*60+
(strtoint(FormatDateTime('nn',t_info_tell.fieldbyname('ÌáÐÑʱ¼ä').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 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('¶Ô²»Æð£¬ÄãµÄÕʺÅÔÚ±ðµÄµçÄÔÉϵǽ£¬Ä㽫±»Öð³öϵͳ£¡£¡');
// application.Terminate;
//exit;
end;
if (from_ip<>LocalIP) and (from_emp<>employee)then
begin
if t_chat_man.locate('ÔÚÏßÖ°Ô±',from_emp,[]) then
begin
t_chat_man.edit;
t_chat_man['ËùÔÚµçÄÔ']:=from_ip;
t_chat_man.post;
end
else
begin
t_chat_man.insert;
t_chat_man['ÔÚÏßÖ°Ô±']:=from_emp;
t_chat_man['ËùÔÚµçÄÔ']:=from_ip;
t_chat_man['·¢²¼']:=false;
if frm_data_share.t_sys_employee.locate('ÐÕÃû',from_emp,[]) then
begin
t_chat_man['ËùÊô²¿ÃÅ']:=frm_data_share.t_sys_employee.fieldbyname('²¿ÃÅÃû³Æ').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('ÔÚÏßÖ°Ô±',from_emp,[]) then
begin
t_chat_man.edit;
t_chat_man['ËùÔÚµçÄÔ']:=from_ip;
t_chat_man.post;
end
else
begin
t_chat_man.insert;
t_chat_man['ÔÚÏßÖ°Ô±']:=from_emp;
if frm_data_share.t_sys_employee.locate('ÐÕÃû',from_emp,[]) then
begin
t_chat_man['ËùÊô²¿ÃÅ']:=frm_data_share.t_sys_employee.fieldbyname('²¿ÃÅÃû³Æ').asstring;
end;
t_chat_man['ËùÔÚµçÄÔ']:=from_ip;
t_chat_man.post;
end;
end;
3:
begin
if t_chat_man.locate('ÔÚÏßÖ°Ô±',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+'¶ÔÄú˵£º('+datetimetostr(now)+')'+tell_str); //???
if frm_dxbar_main.bsSkinPageControl1.ActivePage.Hint='Ïû Ï¢ ÊÒ' then //.bsSkinTabSheet2.Showing then
begin
t_sys_message_no.insert;
t_sys_message_no['ÀàÐÍ']:='ÁÄÌìÐÅÏ¢';
t_sys_message_no['·¢ËÍ·½']:=from_emp;
t_sys_message_no['·¢Ë͵ØÖ·']:=from_ip;
t_sys_message_no['½ÓÊÕ·½']:=employee;
t_sys_message_no['ʼþÃèÊö']:=tell_str;
t_sys_message_no['ÊÇ·ñÖªµÀ']:=1;
t_sys_message_no['ʱ¼ä']:=now;
t_sys_message_no.post;
end
else
begin
t_sys_message_yes.insert;
t_sys_message_yes['ÀàÐÍ']:='ÁÄÌìÐÅÏ¢';
t_sys_message_yes['·¢ËÍ·½']:=from_emp;
t_sys_message_yes['·¢Ë͵ØÖ·']:=from_ip;
t_sys_message_yes['½ÓÊÕ·½']:=employee;
t_sys_message_yes['ʼþÃèÊö']:=tell_str;
t_sys_message_yes['ÊÇ·ñÖªµÀ']:=0;
t_sys_message_yes['ʱ¼ä']:=now;
t_sys_message_yes.post;
// tell_message(from_emp+'¶ÔÄú˵:'+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['ÀàÐÍ']:='·ÑÓÃÌá½»ÉóºË';
end;
7:
begin
t_sys_message_yes['ÀàÐÍ']:='·ÑÓÃÉêÇëÐÞ¸Ä';
end;
8:
begin
t_sys_message_yes['ÀàÐÍ']:='·ÑÓÃÉêÇëɾ³ý';
end;
9:
begin
t_sys_message_yes['ÀàÐÍ']:='·ÑÓÃÉóºËͨ¹ý';
end;
10:
begin
t_sys_message_yes['ÀàÐÍ']:='·ÑÓòµ»ØÌá½»';
end;
11:
begin
t_sys_message_yes['ÀàÐÍ']:='·ÑÓÃÅú×¼ÐÞ¸Ä';
end;
12:
begin
t_sys_message_yes['ÀàÐÍ']:='·ÑÓýûÖ¹ÐÞ¸Ä';
end;
13:
begin
t_sys_message_yes['ÀàÐÍ']:='·ÑÓÃÅú׼ɾ³ý';
end;
14:
begin
t_sys_message_yes['ÀàÐÍ']:='·ÑÓýûֹɾ³ý';
end;
15:
begin
t_sys_message_yes['ÀàÐÍ']:='ÉêÇëÒµÎñ·¢Æ±';
end;
16:
begin
t_sys_message_yes['ÀàÐÍ']:='ÉêÇëÐ޸ķ¢Æ±';
end;
17:
begin
t_sys_message_yes['ÀàÐÍ']:='ÉêÇëÖ§¸¶·ÑÓÃ';
end;
18:
begin
t_sys_message_yes['ÀàÐÍ']:='ÉêÇëÐÞ¸ÄÖ§¸¶';
end;
19:
begin
t_sys_message_yes['ÀàÐÍ']:='Åú×¼¿ª³ö·¢Æ±';
end;
20:
begin
t_sys_message_yes['ÀàÐÍ']:='Åú×¼Ö§¸¶·ÑÓÃ';
end;
21:
begin
t_sys_message_yes['ÀàÐÍ']:='Åú×¼¿ª³ö·¢Æ±';
end;
22:
begin
t_sys_message_yes['ÀàÐÍ']:='²µ»ØÉêÇ뷢Ʊ';
end;
23:
begin
t_sys_message_yes['ÀàÐÍ']:='Åú×¼Ð޸ķ¢Æ±';
end;
24:
begin
t_sys_message_yes['ÀàÐÍ']:='½ûÖ¹Ð޸ķ¢Æ±';
end;
25:
begin
t_sys_message_yes['ÀàÐÍ']:='ÉêÇ뷢Ʊ¿ª³ö';
end;
26:
begin
t_sys_message_yes['ÀàÐÍ']:='Åú×¼Ö§¸¶·ÑÓÃ';
end;
27:
begin
t_sys_message_yes['ÀàÐÍ']:='²µ»ØÉêÇëÖ§¸¶';
end;
28:
begin
t_sys_message_yes['ÀàÐÍ']:='Åú×¼ÐÞ¸ÄÖ§¸¶';
end;
29:
begin
t_sys_message_yes['ÀàÐÍ']:='½ûÖ¹ÐÞ¸ÄÖ§¸¶';
end;
30:
begin
t_sys_message_yes['ÀàÐÍ']:='ÊշѺËÏú֪ͨ';
end;
31:
begin
t_sys_message_yes['ÀàÐÍ']:='ÊշѺËÏúÍê±Ï';
end;
32:
begin
t_sys_message_yes['ÀàÐÍ']:='ÊշѺËÏúÍê±Ï';
end;
33:
begin
t_sys_message_yes['ÀàÐÍ']:='ÊշѺËÏúÉóºË';
end;
34:
begin
t_sys_message_yes['ÀàÐÍ']:='ÉêÇë·¢ËÍ¿ìµÝ';
end;
35:
begin
t_sys_message_yes['ÀàÐÍ']:='¿ìµÝÈ·ÈÏ·¢³ö';
end;
36:
begin
t_sys_message_yes['ÀàÐÍ']:='²µ»Ø¿ìµÝÉêÇë';
end;
37:
begin
t_sys_message_yes['ÀàÐÍ']:='ÉêÇëµ÷¶ÈÅɳµ';
end;
38:
begin
t_sys_message_yes['ÀàÐÍ']:='µ÷¶ÈÈ·ÈÏÅɳµ';
end;
39:
begin
t_sys_message_yes['ÀàÐÍ']:='º£ÔËÍËË°È·ÈÏ';
end;
40:
begin
t_sys_message_yes['ÀàÐÍ']:='º£ÔËÇ©µ¥È·ÈÏ';
end;
41:
begin
t_sys_message_yes['ÀàÐÍ']:='ÒµÎñÐÅÏ¢·âÕÊ';
end;
42:
begin
t_sys_message_yes['ÀàÐÍ']:='·ÑÓÃÐÅÏ¢·âÕÊ';
end;
43:
begin
t_sys_message_yes['ÀàÐÍ']:='ÒµÎñÐÅÏ¢½â·â';
end;
44:
begin
t_sys_message_yes['ÀàÐÍ']:='·ÑÓÃÐÅÏ¢½â·â';
end;
45:
begin
t_sys_message_yes['ÀàÐÍ']:='¿Í»§ÉêÇëתÕý';
end;
46:
begin
t_sys_message_yes['ÀàÐÍ']:='¿Í»§×ªÕýͨ¹ý';
end;
47:
begin
t_sys_message_yes['ÀàÐÍ']:='²µ»Ø¿Í»§×ªÕý';
end;
50:
begin
t_sys_message_yes['ÀàÐÍ']:='º£ÔË·ÑÓýâËø';
end;
61:
begin
t_sys_message_yes['ÀàÐÍ']:='·ÑÓó¬ÆÚÌáÐÑ';
end ;
62:
begin
t_sys_message_yes['ÀàÐÍ']:='ÏúÊÛ¶©²ÕÌáÐÑ';
end ;
72:
begin
t_sys_message_yes['ÀàÐÍ']:='ÏúÊÛ¶©²ÕÌáÐÑ';
end ;
end;
t_sys_message_yes['·¢ËÍ·½']:=from_emp;
t_sys_message_yes['·¢Ë͵ØÖ·']:=from_ip;
t_sys_message_yes['½ÓÊÕ·½']:=employee;
t_sys_message_yes['ʼþÃèÊö']:=tell_str;
t_sys_message_yes['ÊÇ·ñÖªµÀ']:=0;
t_sys_message_yes['ʱ¼ä']:=now;
t_sys_message_yes.post;
// tell_message(from_emp+'¶ÔÄú˵:'+tell_str);
end;
48:
begin
// tell_message(from_emp+'·¢²¼¹«¸æ:'+tell_str);
t_info_bulletin.Requery();
end;
49:
begin
// tell_message(from_emp+'¸øÄãÁôÑÔ:'+tell_str);
t_info_leaveword.Requery();
end;
51:
begin
// if not strtobool(get_parameters_value(4,'false')) then
// tell_message(from_emp+'¸ü¸Ä¿Í»§:'+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+'Éý¼¶Èí¼þ:'+tell_str);
end;
53:
begin
// if not strtobool(get_parameters_value(4,'false')) then
// tell_message(from_emp+'¿Í»§Í¨¸æ:'+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+'Í˲ÕÌáÐÑ:'+tell_str);
t_sys_message_no.Requery();
end ;
end;
end;
procedure Tfrm_main.dxDBGrid4Click(Sender: TObject);
begin
{ if not t_chat_man.IsEmpty then
begin
RxDBLookupCombo1.DisplayValue:=t_chat_man.fieldbyname('ÔÚÏßÖ°Ô±').asstring;
end
else
begin
RxDBLookupCombo1.ClearValue;
end;
}
end;
procedure Tfrm_main.ApplicationEvents1Exception(Sender: TObject;
E: Exception);
begin
//´íÎó´¦Àí
if pos('PRIM',UpperCase(E.Message))<>0 then
begin
showmessage('Ö÷¼üÖظ´£¬²»Äܱ£´æ£¬ÇëË¢ÐÂÊý¾ÝºóÖØмÈë');
// exit;
end;
if pos('ΨһË÷Òý',UpperCase(E.Message))<>0 then
begin
showmessage('Ö÷¼üÖظ´£¬²»Äܱ£´æ£¬ÇëË¢ÐÂÊý¾ÝºóÖØмÈë');
// exit;
end;
if pos('NULL',UpperCase(E.Message))<>0 then
begin
showmessage('Êý¾ÝÏî²»ÄÜΪ¿Õ£¬µ±Ç°Ð޸IJ»Äܱ£´æ'+#13#10+'ÇëÖØмÈë');
// exit;
end;
if pos('SOME VALUES MAY HAVE BEEN CHANGED',UpperCase(E.Message))<>0 then
begin
showmessage('Êý¾ÝÒѾ­±»ÆäËüÓû§Ð޸ģ¬µ±Ç°Ð޸IJ»Äܱ£´æ'+#13#10+'ÇëË¢ÐÂÊý¾ÝºóÖØмÈë');
// exit;
end;
if (pos('connection', lowercase(E.Message))<>0) and (pos('socket error', lowercase(E.Message))=0) and (pos('gracefully', lowercase(E.Message))=0) then
begin
showmessage('Êý¾Ý¿âÁ¬½Ó´íÎó,ÇëÖØÐÂÆô¶¯³ÌÐò£¡£¡');
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,'¶©²Õ') ;
backstate:=get_parameters_value(113,'Í˲Õ') ;
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 ÈËÔ±,ȨÏÞ´úÂë from t_sys_code_emp'
+' where ȨÏÞ´úÂë in (''025'',''026'',''058'',''059'',''077'',''078'',''085'',''086'') and ÊÇ·ñ¿É²Ù×÷=1'
+' and ÈËÔ± in (select distinct ÈËÔ± from t_sys_code_data where ÊÇ·ñ¿É²Ù×÷=1 '
+' and ÊôÐÔ 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 := '¶«Ê¤ÎïÁ÷ÐÅÏ¢¹ÜÀíϵͳ(ÆÕ¼°°æ)';
{$ENDIF}
{$IFDEF Stand}
caption := '¶«Ê¤ÎïÁ÷ÐÅÏ¢¹ÜÀíϵͳ(±ê×¼°æ)';
{$ENDIF}
{$IFDEF Support}
caption := '¶«Ê¤ÎïÁ÷ÐÅÏ¢¹ÜÀíϵͳ';
{$ENDIF}
/////////////////µ÷Èë dll Ä£¿é
//¸ù¾Ý¸öÈËÉèÖÃÅжÏÊÇ·ñÆô¶¯ÏûÏ¢¿Í»§¶Ë
if frm_data_share.t_sys_employee.Locate('ÐÕÃû',employee,[]) then begin
yctx:=frm_data_share.t_sys_employee.fieldbyname('Ô¶³ÌÌáÐÑ').asstring;
isclosewoke:=frm_data_share.t_sys_employee.fieldbyname('ÌáÐÑÊÇ·ñË涫ʤ¹Ø±Õ').asstring;
end else yctx:='²»ÆôÓÃ' ;
if (yctx='ÆôÓÃ') 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
//нçÃæ
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
//¾É½çÃæ
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
//¿ì½Ý¼ü
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('¶Ô²»ÆðÄãûÓдËÄ£¿éµÄ²Ù×÷ȨÏÞ£¡');
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;
end;
end;
end;
{
procedure Tfrm_main.loaddsdll;
begin
DLLHandle := LoadLibrary('dsdll.dll');
try
if DLLHandle =0 then
begin
showmessage('µ÷Èëdsdllʧ°Ü£¬ÏµÍ³½«²»ÄܶÔÍâͨѶ£¡');
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('µ÷Èëdsdllʧ°Ü£¬ÏµÍ³½«²»ÄܶÔÍâͨѶ£¡');
exit ;
end;
end;
}
procedure getmsg(msg:widestring);
var
str,
stype,
bl,
bsno,
ttype:string;
RDATA:Boolean;
begin
//½ÓÊÜÏûÏ¢¿Í»§¶ËÏûÏ¢´¦Àí
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);// ÏûÏ¢ÀàÐÍ
bl:=copy(str,4,1); // ÊÇ·ñÖ»´ò¿ª´ËƱ
ttype:=copy(str,5,1);// ÒµÎñÀàÐÍ
bsno:=copy(str,6,length(str)-5);// ÒµÎñ±àºÅ
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('ÒµÎñ±àºÅ',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('ÒµÎñ±àºÅ',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('ÒµÎñ±àºÅ',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('ÒµÎñ±àºÅ',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('ÒµÎñ±àºÅ',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('¶Ô²»ÆðÄãûÓдËÄ£¿éµÄ²Ù×÷ȨÏÞ£¡');
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('ÉêÇë±àºÅ',bsno,[]);
end;
{$ENDIF}
end else begin
if not if_open('030') then
begin
showmessage('¶Ô²»ÆðÄãûÓдËÄ£¿éµÄ²Ù×÷ȨÏÞ£¡');
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('ÉêÇë±àºÅ',bsno,[]);
end;
end;
end else if (stype='017') or (stype='018') then begin
{$IFDEF FFLIUCHENG}
if not if_open('037') then
begin
showmessage('¶Ô²»ÆðÄãûÓдËÄ£¿éµÄ²Ù×÷ȨÏÞ£¡');
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('ÉêÇë±àºÅ',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
{
qrytmp3.Close;
qrytmp3.sql.Add('select °æ±¾ºÅ from t_sys_soft');
qrytmp3.open;
}
end;
procedure Tfrm_main.webdbBeforeConnect(Sender: TObject);
var connstr:string;
begin
//Èç¹ûÊÇÍøÉÏÐÅϢʱ²»Í¬µÄÊý¾Ý¿â£¬Á¬²»Í¬µÄÊý¾Ý¿â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;
procedure Tfrm_main.subdbBeforeConnect(Sender: TObject);
var connstr:string;
begin
connstr:=get_parameters_value(159,'false');
subdb.ConnectionString:=connstr
end;
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\HYD²ÆÎñÈí¼þ½Ó¿Ú\u_cw_pingzheng.pas' {frm_cw_pingzheng}, //¸÷¼Ò²ÆÎñ½Ó¿Ú
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\°Ù¡ÃÀÑǽðµûK3½Ó¿Ú\u_cw_pingzheng.pas' {frm_cw_pingzheng}, //ÑÅÂõ
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\¿¡½Ý½ðµûK3½Ó¿Ú\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\Ïéºê½ðµûÃÔÄã½Ó¿Ú\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\ÀÖ´ï½ðµûÃÔÄã½Ó¿Ú\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\ʢͨÔË´ï½ðµûÃÔÄã½Ó¿Ú\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\È«ºã½ðµûÃÔÄã½Ó¿Ú\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\´óÁ¬¼ÑÓþºã½ðµûÃÔÄã½Ó¿Ú\u_cw_pingzheng.pas' {frm_cw_pingzheng},
//u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\ÅôÍþ½ðµûÃÔÄã½Ó¿Ú\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\Ì«Ò»½ðµûÃÔÄã½Ó¿Ú\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\º£ÇÅÓÃÓѽӿÚ\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\»ª¼ÑÓÃÓÑÈí¼þ½Ó¿Ú\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\¼Î¼ÑÓÃÓѽӿÚ\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\ººÑôÓÃÓѽӿÚ\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\×ðöèÓÃÓѽӿÚ\u_cw_pingzheng.pas' {frm_cw_pingzheng},
//u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\³¿»ªÓÃÓѽӿÚ\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\³¿ÐÇÓÃÓѽӿÚ\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\½ðµúÂó¿Ë½Ó¿Ú\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\ËÄ·½ÍâÔ˽ðµû½Ó¿Ú\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\Ϋ·»Áª½Ý½ðµûK3½Ó¿Ú\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\Êлõ´úÀ˳±½Ó¿Ú\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\Á¬ÔƸÛнõ½­ÓÃÓѽӿÚ\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\ÊÀŵÓÃÓѽӿÚ\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\ÈíͨÓÃÓÑÈí¼þ\u_cw_pingzheng.pas' {frm_cw_pingzheng},
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\ÌìºÍÐ˽ðµûÃÔÄã½Ó¿Ú\u_cw_pingzheng.pas' {frm_cw_pingzheng}, // ±ê×¼½Ó¿Ú
// u_cw_pingzheng in '..\²ÆÎñ½Ó¿Ú\½Ý·á½Ó¿Ú\u_cw_pingzheng.pas' {frm_cw_pingzheng}, // ½Ý·á½Ó¿Ú
procedure Tfrm_main.db_fileBeforeConnect(Sender: TObject);
var connstr:string;
begin
//Èç¹ûÊÇÍøÉÏÐÅϢʱ²»Í¬µÄÊý¾Ý¿â£¬Á¬²»Í¬µÄÊý¾Ý¿âINI
connstr:=get_parameters_value(174,'false');
db_file.ConnectionString:=connstr;
end;
procedure Tfrm_main.db_rptBeforeConnect(Sender: TObject);
begin
db_rpt.ConnectionString:=connect_string('main.ini');
end;
end.