2025-02-27 16:58:16 +08:00
// FGAddress.cpp : implementation file
//
# include "stdafx.h"
# include "CorpSms.h"
# include "FGAddress.h"
# ifdef _DEBUG
# define new DEBUG_NEW
# undef THIS_FILE
static char THIS_FILE [ ] = __FILE__ ;
# endif
/////////////////////////////////////////////////////////////////////////////
// CFGAddress dialog
# include "MainFrm.h"
# include "ProcessSocket.h"
# include "DLG_User_Modify.h"
# include "DLG_User_Modify2.h"
# include "DLG_Group_Modify.h"
# include "FuncView.h"
# include "DLG_User_Inport2.h"
# include "DLG_User_ModifyP.h"
# include "DLG_User_Log.h"
# include "DLG_User_InportP2.h"
# include "..\public\StringSort\StringSort.h"
CFGAddress : : CFGAddress ( CWnd * pParent /*=NULL*/ )
: CDialog ( CFGAddress : : IDD , pParent )
{
//{{AFX_DATA_INIT(CFGAddress)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_bInit = false ;
m_bRefresh = false ;
m_pInUser = NULL ;
m_bInUser = false ; //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> ڲ<EFBFBD> <DAB2> <EFBFBD> <EFBFBD> û<EFBFBD>
m_lUserID = 0 ;
m_bFind2 = false ;
memset ( m_szGroupID , 0 , sizeof ( m_szGroupID ) ) ;
memset ( m_szLocal , 0 , sizeof ( m_szLocal ) ) ;
//<2F> <> <EFBFBD> ƣ<EFBFBD> ճ<EFBFBD> <D5B3> <EFBFBD> <EFBFBD> <EFBFBD> õ<EFBFBD> <C3B5> ı <EFBFBD> <C4B1> <EFBFBD>
m_Copy_UserID = 0 ;
memset ( m_Copy_GroupID , 0 , sizeof ( m_Copy_GroupID ) ) ;
m_Copy_Count = 0 ;
m_Copy_Type = 0 ;
m_Copy_Data = NULL ;
m_FindPro . m_bName = TRUE ;
m_FindPro . m_bNickName = TRUE ;
m_FindPro . m_bJob = TRUE ;
m_FindPro . m_bTel = TRUE ;
m_FindPro . m_bMobile = TRUE ;
m_FindPro . m_bEmail = TRUE ;
m_FindPro . m_bSex = TRUE ;
m_FindPro . m_bBZ = TRUE ;
m_FindPro . m_bLTD = TRUE ;
}
void CFGAddress : : DoDataExchange ( CDataExchange * pDX )
{
CDialog : : DoDataExchange ( pDX ) ;
//{{AFX_DATA_MAP(CFGAddress)
DDX_Control ( pDX , IDC_GADDRESS_LIST , m_wndList ) ;
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP ( CFGAddress , CDialog )
//{{AFX_MSG_MAP(CFGAddress)
ON_WM_SIZE ( )
ON_NOTIFY ( NM_DBLCLK , IDC_GADDRESS_LIST , OnDblclkGaddressList )
ON_NOTIFY ( NM_RCLICK , IDC_GADDRESS_LIST , OnRclickGaddressList )
ON_WM_TIMER ( )
ON_NOTIFY ( LVN_KEYDOWN , IDC_GADDRESS_LIST , OnKeydownGaddressList )
ON_WM_DESTROY ( )
//}}AFX_MSG_MAP
ON_MESSAGE ( LIST_DROP_BEGIN , On_List_DropBegin )
ON_COMMAND ( MENU_GADDRESS_ADD , On_User_Add )
ON_COMMAND ( MENU_GADDRESS_ADDADDR , On_User_AddAddr )
ON_COMMAND ( MENU_GADDRESS_ADDGROUP , On_User_AddGroup )
ON_COMMAND ( MENU_GADDRESS_MODIFY , On_User_Modify )
ON_COMMAND ( MENU_GADDRESS_DEL , On_User_Del )
ON_COMMAND ( MENU_GADDRESS_FIND , On_User_Find )
ON_COMMAND ( MENU_GADDRESS_ADDTOLIST , On_User_AddToList )
ON_COMMAND ( MENU_GADDRESS_ADDTOLIST_FAX , On_User_AddToList_Fax )
ON_COMMAND ( MENU_GADDRESS_ADDTOLIST_MMS , On_User_AddToList_Mms )
ON_COMMAND ( MENU_GADDRESS_INPORT , On_User_Inport )
ON_COMMAND ( MENU_GADDRESS_EXPORT , On_User_Export )
ON_COMMAND ( MENU_GADDRESS_REFRESH , On_User_Refresh )
ON_COMMAND ( MENU_GADDRESS_LOG , On_User_Log )
ON_COMMAND ( MENU_GADDRESS_CUT , On_User_Cut )
ON_COMMAND ( MENU_GADDRESS_PASTE , On_User_Paste )
ON_COMMAND ( MENU_GADDRESS_MODIFYUSED , On_User_ModifyUsed )
END_MESSAGE_MAP ( )
/////////////////////////////////////////////////////////////////////////////
// CFGAddress message handlers
BOOL CFGAddress : : OnInitDialog ( )
{
CDialog : : OnInitDialog ( ) ;
//ȡ<> ù<EFBFBD> <C3B9> ò<EFBFBD> <C3B2> <EFBFBD>
//CMainFrame * pFrame = static_cast <CMainFrame *>((CMainFrame *)AfxGetMainWnd());
this - > GetParent ( ) - > GetParentFrame ( ) ;
m_pMainFrame = ( CMainFrame * ) this - > GetParent ( ) - > GetParentFrame ( ) ;
m_pSocket = & m_pMainFrame - > m_Socket ;
m_AdoRS . SetAdoConnection ( & m_pMainFrame - > m_adoConnection ) ;
SetTimer ( 1 , 200 , NULL ) ; //Ϊ<> <CEAA> ȡ<EFBFBD> <C8A1> m_pFuncView;
//<2F> <> ʼ <EFBFBD> <CABC> List
m_Image . Create ( 16 , 16 , ILC_COLOR32 | ILC_MASK , 5 , 5 ) ;
m_Image . Add ( AfxGetApp ( ) - > LoadIcon ( IDI_L_USERM ) ) ;
m_Image . Add ( AfxGetApp ( ) - > LoadIcon ( IDI_L_USERW ) ) ;
m_Image . Add ( AfxGetApp ( ) - > LoadIcon ( IDI_L_USERN ) ) ; //<2F> ֲ<EFBFBD> <D6B2> <EFBFBD> <EFBFBD> Ա<EFBFBD> <D4B1> ģ<EFBFBD> <C4A3> <EFBFBD> <EFBFBD> <EFBFBD> ͼ<EFBFBD> <CDBC>
m_Image . Add ( AfxGetApp ( ) - > LoadIcon ( IDI_L_LOCK ) ) ;
m_wndList . SubClassWindow2 ( ) ;
# ifdef SUPPER_FUNC_MMS
# ifdef SHOWBZ_VER
m_wndList . SetHeadings ( _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,50;<3B> <> ¼<EFBFBD> <C2BC> ,80;<3B> ط<EFBFBD> <D8B7> <EFBFBD> ,80;<3B> <> <EFBFBD> ö<EFBFBD> <C3B6> <EFBFBD> ,80;<3B> <> <EFBFBD> ò<EFBFBD> <C3B2> <EFBFBD> ,80;<3B> ʺ<EFBFBD> <CABA> <EFBFBD> <EFBFBD> <EFBFBD> ,90;<3B> <> ¼<EFBFBD> <C2BC> <EFBFBD> <EFBFBD> ,80; <20> <> <EFBFBD> <EFBFBD> ,80; <20> dz<EFBFBD> ,80;<3B> ֻ<EFBFBD> ,100;<3B> 绰,80; <20> <> <EFBFBD> <EFBFBD> ,90;ְ<> <D6B0> ,80;Email,80;<3B> <> ע,120;" ) ) ;
# else
m_wndList . SetHeadings ( _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,50;<3B> <> ¼<EFBFBD> <C2BC> ,80;<3B> ط<EFBFBD> <D8B7> <EFBFBD> ,80;<3B> <> <EFBFBD> ö<EFBFBD> <C3B6> <EFBFBD> ,80;<3B> <> <EFBFBD> ò<EFBFBD> <C3B2> <EFBFBD> ,80;<3B> ʺ<EFBFBD> <CABA> <EFBFBD> <EFBFBD> <EFBFBD> ,90;<3B> <> ¼<EFBFBD> <C2BC> <EFBFBD> <EFBFBD> ,80; <20> <> <EFBFBD> <EFBFBD> ,80; <20> dz<EFBFBD> ,80;<3B> ֻ<EFBFBD> ,100;<3B> 绰,80; <20> <> <EFBFBD> <EFBFBD> ,90;ְ<> <D6B0> ,80;Email,80;" ) ) ;
# endif
# else
# ifdef SHOWBZ_VER
m_wndList . SetHeadings ( _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,50;<3B> <> ¼<EFBFBD> <C2BC> ,80;<3B> ط<EFBFBD> <D8B7> <EFBFBD> ,80;<3B> <> <EFBFBD> ö<EFBFBD> <C3B6> <EFBFBD> ,80;<3B> ʺ<EFBFBD> <CABA> <EFBFBD> <EFBFBD> <EFBFBD> ,90;<3B> <> ¼<EFBFBD> <C2BC> <EFBFBD> <EFBFBD> ,80; <20> <> <EFBFBD> <EFBFBD> ,80; <20> dz<EFBFBD> ,80;<3B> ֻ<EFBFBD> ,100;<3B> 绰,80; <20> <> <EFBFBD> <EFBFBD> ,90;ְ<> <D6B0> ,80;Email,80;<3B> <> ע,120;" ) ) ;
# else
m_wndList . SetHeadings ( _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,50;<3B> <> ¼<EFBFBD> <C2BC> ,80;<3B> ط<EFBFBD> <D8B7> <EFBFBD> ,80;<3B> <> <EFBFBD> ö<EFBFBD> <C3B6> <EFBFBD> ,80;<3B> ʺ<EFBFBD> <CABA> <EFBFBD> <EFBFBD> <EFBFBD> ,90;<3B> <> ¼<EFBFBD> <C2BC> <EFBFBD> <EFBFBD> ,80; <20> <> <EFBFBD> <EFBFBD> ,80; <20> dz<EFBFBD> ,80;<3B> ֻ<EFBFBD> ,100;<3B> 绰,80; <20> <> <EFBFBD> <EFBFBD> ,90;ְ<> <D6B0> ,80;Email,80;" ) ) ;
# endif
# endif
m_wndList . SetGridLines ( true ) ;
m_wndList . SetImageList ( & m_Image , LVSIL_SMALL ) ;
//m_wndList.SetBkColor( RGB(237,191,175) );
//m_wndList.SetTextBkColor( RGB(237,191,175) );
m_bInit = true ;
return TRUE ; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
BOOL CFGAddress : : ReHide ( )
{
ShowWindow ( SW_HIDE ) ;
return true ;
}
BOOL CFGAddress : : ReShow ( BOOL bRefresh )
{
ShowWindow ( SW_SHOW ) ;
if ( bRefresh | | ! m_bRefresh )
{
RefreshInfo ( ) ;
}
return true ;
}
BOOL CFGAddress : : RefreshInfo ( )
{
return true ;
}
void CFGAddress : : OnSize ( UINT nType , int cx , int cy )
{
CDialog : : OnSize ( nType , cx , cy ) ;
if ( m_bInit )
{
m_wndList . MoveWindow ( 0 , 0 , cx , cy ) ;
}
}
long CFGAddress : : ShowUser ( long lUserID )
{
m_bFind2 = false ;
m_wndList . ShowWindow ( SW_HIDE ) ; //Ϊ<> ˼ӿ<CBBC> <D3BF> <EFBFBD> ʾ <EFBFBD> ٶ<EFBFBD>
m_wndList . DeleteAllItems ( ) ;
TCHAR szSelect [ 128 ] = { 0 } ;
CString str ;
m_lUserID = lUserID ;
memset ( m_szGroupID , 0 , sizeof ( m_szGroupID ) ) ;
if ( lUserID ! = - 1 ) //<2F> <> <EFBFBD> <EFBFBD> -1<> Ǵ<EFBFBD> <C7B4> <EFBFBD> <EFBFBD> <EFBFBD>
{
_stprintf ( szSelect , _T ( " select GroupID from users where UserID=%d AND UserType='0' " ) , lUserID ) ; //<2F> <> ѯ<EFBFBD> û<EFBFBD> ID<49> <44> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ֻ<EFBFBD> <D6BB> Ϊ<EFBFBD> <CEAA>
BOOL b = m_AdoRS . Open ( szSelect ) ;
long lCount = m_AdoRS . GetRecordCount ( ) ;
if ( b & & lCount )
{
m_AdoRS . MoveFirst ( ) ;
m_AdoRS . GetCollect ( _T ( " GroupID " ) , m_szGroupID ) ;
}
else
{
m_wndList . ShowWindow ( SW_SHOW ) ; //Ϊ<> ˼ӿ<CBBC> <D3BF> <EFBFBD> ʾ <EFBFBD> ٶ<EFBFBD>
return 0 ;
}
}
GetLocal ( m_szLocal , m_szGroupID ) ; //ȡ<> û<EFBFBD> ·<EFBFBD> <C2B7>
if ( lUserID = = - 1 ) //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> Ǹ<EFBFBD> <C7B8> <EFBFBD> <EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> ΪNULL
_tcscpy ( szSelect , _T ( " select * from users where GroupID is null or len(GroupID)=0 and UserType='1' order by UserID " ) ) ; //<2F> <> <EFBFBD> Ҵ<EFBFBD> <D2B4> <EFBFBD> <EFBFBD> µ<EFBFBD> <C2B5> û<EFBFBD>
else
_stprintf ( szSelect , _T ( " Select * from users where GroupID='%s' AND UserType='1' order by UserID " ) , m_szGroupID ) ; //<2F> <> <EFBFBD> Ҵ<EFBFBD> <D2B4> <EFBFBD> <EFBFBD> µ<EFBFBD> <C2B5> û<EFBFBD>
BOOL b = m_AdoRS . Open ( szSelect ) ;
long lCount = m_AdoRS . GetRecordCount ( ) ;
if ( b & & lCount )
{
COleDateTime t ;
CString str ;
m_AdoRS . MoveFirst ( ) ;
for ( int i = 0 ; i < lCount ; i + + )
{
ANS_GAddress_SeeData user = { 0 } ;
m_AdoRS . GetCollect ( _T ( " UserID " ) , user . lUserID ) ;
m_AdoRS . GetCollect ( _T ( " UserType " ) , user . szUserType ) ;
m_AdoRS . GetCollect ( _T ( " GroupID " ) , user . szGroupID ) ;
m_AdoRS . GetCollect ( _T ( " Name " ) , user . szName ) ;
m_AdoRS . GetCollect ( _T ( " NickName " ) , user . szNickName ) ;
m_AdoRS . GetCollect ( _T ( " Sex " ) , user . szSex ) ;
m_AdoRS . GetCollect ( _T ( " Birthday " ) , t ) ; t . GetAsSystemTime ( user . tBirthday ) ;
m_AdoRS . GetCollect ( _T ( " Job " ) , user . szJob ) ;
m_AdoRS . GetCollect ( _T ( " Tel " ) , user . szTel ) ;
m_AdoRS . GetCollect ( _T ( " Fax " ) , user . szFax ) ;
m_AdoRS . GetCollect ( _T ( " Email " ) , user . szEmail ) ;
m_AdoRS . GetCollect ( _T ( " Mobile " ) , user . szMobile ) ;
m_AdoRS . GetCollect ( _T ( " QQ " ) , user . szQQ ) ;
m_AdoRS . GetCollect ( _T ( " Email " ) , user . szEmail ) ;
m_AdoRS . GetCollect ( _T ( " LoginName " ) , user . szLoginName ) ;
m_AdoRS . GetCollect ( _T ( " PurviewType " ) , user . ulPurviewType ) ;
m_AdoRS . GetCollect ( _T ( " Purview " ) , user . ulPurview ) ;
m_AdoRS . GetCollect ( _T ( " LoginCount " ) , user . lLoginCount ) ;
m_AdoRS . GetCollect ( _T ( " SMSNum " ) , user . szSMSNum ) ;
m_AdoRS . GetCollect ( _T ( " LoginTime " ) , t ) ; t . GetAsSystemTime ( user . tLoginTime ) ;
m_AdoRS . GetCollect ( _T ( " SMSUsed " ) , user . lSMSUsed ) ;
m_AdoRS . GetCollect ( _T ( " SMSSendAll " ) , user . lSMSSendAll ) ;
m_AdoRS . GetCollect ( _T ( " MmsUsed " ) , user . lMmsUsed ) ;
m_AdoRS . GetCollect ( _T ( " MmsSendAll " ) , user . lMmsSendAll ) ;
//m_AdoRS.GetCollect( _T("OvrTime"), t); t.GetAsSystemTime(user.tOvrTime);
m_AdoRS . GetCollect ( _T ( " CreateUser " ) , user . szCreateUser ) ;
m_AdoRS . GetCollect ( _T ( " CreateTime " ) , t ) ; t . GetAsSystemTime ( user . tCreateTime ) ;
m_AdoRS . GetCollect ( _T ( " BZ " ) , user . szBZ ) ;
m_AdoRS . GetCollect ( _T ( " AccessGroup " ) , user . lAccessGroupID ) ;
m_AdoRS . MoveNext ( ) ;
//m_wndList.SetHeadings(_T("<22> <> <EFBFBD> <EFBFBD> ,50;<3B> <> ¼<EFBFBD> <C2BC> ,80;<3B> ط<EFBFBD> <D8B7> <EFBFBD> ,80;<3B> <> <EFBFBD> ö<EFBFBD> <C3B6> <EFBFBD> ,80;<3B> ѷ<EFBFBD> <D1B7> <EFBFBD> <EFBFBD> <EFBFBD> ,80;<3B> ʺ<EFBFBD> <CABA> <EFBFBD> <EFBFBD> <EFBFBD> ,90;<3B> <> ¼<EFBFBD> <C2BC> <EFBFBD> <EFBFBD> ,80; <20> <> <EFBFBD> <EFBFBD> ,80; <20> dz<EFBFBD> ,80;<3B> ֻ<EFBFBD> ,100;<3B> 绰,80; <20> <> <EFBFBD> <EFBFBD> ,90;ְ<> <D6B0> ,80;Email,80;"));
m_wndList . InsertItem ( i , _itot ( i + 1 , szSelect , 10 ) ) ; //<2F> <> <EFBFBD> <EFBFBD>
long lIcon = 2 ;
if ( _tcscmp ( user . szSex , _T ( " <EFBFBD> <EFBFBD> " ) ) = = 0 )
lIcon = 0 ;
if ( _tcscmp ( user . szSex , _T ( " Ů " ) ) = = 0 )
lIcon = 1 ;
m_wndList . SetIconIndex ( i , lIcon ) ;
m_wndList . SetItemData ( i , user . lUserID ) ;
long lTemp = 1 ;
m_wndList . SetItemText ( i , lTemp + + , user . szLoginName ) ;
m_wndList . SetItemText ( i , lTemp + + , user . szSMSNum ) ;
if ( user . lSMSUsed = = - 100 )
str = _T ( " <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) ;
else
str . Format ( _T ( " %8d " ) , user . lSMSUsed ) ;
m_wndList . SetItemText ( i , lTemp + + , str ) ;
# ifdef SUPPER_FUNC_MMS
if ( user . lMmsUsed = = - 100 )
str = _T ( " <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) ;
else
str . Format ( _T ( " %8d " ) , user . lMmsUsed ) ;
m_wndList . SetItemText ( i , lTemp + + , str ) ;
# endif
switch ( user . ulPurviewType )
{
case PURVIEWTYPE_ADMIN :
str = _T ( " ϵͳ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ա " ) ;
break ;
case PURVIEWTYPE_KF :
str = _T ( " <EFBFBD> ͻ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ա" ) ;
break ;
case PURVIEWTYPE_USERS :
str = _T ( " һ <EFBFBD> <EFBFBD> Ա<EFBFBD> <EFBFBD> " ) ;
break ;
case PURVIEWTYPE_INPUT :
str = _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ¼<EFBFBD> <EFBFBD> Ա" ) ;
break ;
case PURVIEWTYPE_ADDRESS :
default :
str = _T ( " <EFBFBD> <EFBFBD> ͨѶ¼" ) ;
break ;
}
m_wndList . SetItemText ( i , lTemp + + , str ) ;
str . Format ( _T ( " %8d " ) , user . lLoginCount ) ;
m_wndList . SetItemText ( i , lTemp + + , str ) ;
m_wndList . SetItemText ( i , lTemp + + , user . szName ) ;
m_wndList . SetItemText ( i , lTemp + + , user . szNickName ) ;
m_wndList . SetItemText ( i , lTemp + + , user . szMobile ) ;
m_wndList . SetItemText ( i , lTemp + + , user . szTel ) ;
COleDateTime t ( user . tBirthday ) ;
if ( t . GetStatus ( ) = = COleDateTime : : valid )
{
str . Format ( _T ( " %04d.%02d.%02d " ) , t . GetYear ( ) , t . GetMonth ( ) , t . GetDay ( ) ) ;
m_wndList . SetItemText ( i , lTemp + + , str ) ;
}
else
{
m_wndList . SetItemText ( i , lTemp + + , _T ( " " ) ) ;
}
m_wndList . SetItemText ( i , lTemp + + , user . szJob ) ;
m_wndList . SetItemText ( i , lTemp + + , user . szEmail ) ;
# ifdef SHOWBZ_VER
m_wndList . SetItemText ( i , lTemp + + , user . szBZ ) ;
# endif
}
//return lCount;
}
m_wndList . ShowWindow ( SW_SHOW ) ; //Ϊ<> ˼ӿ<CBBC> <D3BF> <EFBFBD> ʾ <EFBFBD> ٶ<EFBFBD>
return 0 ;
}
void CFGAddress : : On_User_Add ( )
{
if ( ! m_pMainFrame - > GetUserPurview ( PURVIEW_USER_MANAGER ) )
{
return ;
}
if ( m_bFind2 ) //<2F> <> <EFBFBD> ڲ<EFBFBD> ѯ<EFBFBD> <D1AF> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> ˲<EFBFBD> <CBB2> <EFBFBD> <EFBFBD> <EFBFBD> Ч
return ;
if ( isAddressFull ( ) ) //ͨѶ¼<D1B6> <C2BC> <EFBFBD> <EFBFBD>
return ;
// if ( m_pMainFrame->GetUserPurview( PURVIEW_GADDRESS_MODIFY,false ) && //Ҫ<> <D2AA> <EFBFBD> <EFBFBD> Ȩ<EFBFBD> <C8A8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ȩ<EFBFBD> <EFBFBD> Ȩ<EFBFBD> <EFBFBD> <DEB2> ܴ<EFBFBD> <DCB4> <EFBFBD> רҵ<D7A8> <D2B5> <EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> <DEB8> <EFBFBD>
// m_pMainFrame->GetUserPurview( PURVIEW_GADDRESS_MODIFYPURVIEW,false ) )
// {
ANS_GAddress_SeeData Address = { 0 } ;
_tcscpy ( Address . szGroupID , m_szGroupID ) ;
Address . lCorpID = m_pMainFrame - > m_lCorpID ;
//Address.ulPurviewType = m_pMainFrame->m_ulPurviewType;
//Address.ulPurview = m_pMainFrame->m_ulPurview; //Ȩ<> <C8A8> <EFBFBD> <EFBFBD> <EFBFBD> Լ<EFBFBD> <D4BC> <EFBFBD> <EFBFBD> <EFBFBD> ͬ
//Address.ulPurviewType = PURVIEWTYPE_ADDRESS; //<2F> <> <EFBFBD> <EFBFBD> ¼<EFBFBD> <C2BC> Ա<EFBFBD> <D4B1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ӵ<EFBFBD> <D3B4> 绰<EFBFBD> <E7BBB0> <EFBFBD> ĵ<EFBFBD> ַ
//Address.ulPurview = 0; //û<> <C3BB> <EFBFBD> κ<EFBFBD> Ȩ<EFBFBD> <C8A8>
Address . ulPurviewType = PURVIEWTYPE_KF ;
Address . ulPurview = PURVIEW_LOGIN | PURVIEW_SENDG | PURVIEW_SENDP | PURVIEW_RECVP | PURVIEW_GADDRESS_SEE | PURVIEW_PADDRESS | PURVIEW_SMSEMAIL | PURVIEW_CALENDAR | PURVIEW_SMSSP ;
Address . szUserType [ 0 ] = ' 1 ' ; //<2F> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD>
DLG_User_Modify dlg ( this ) ;
dlg . SetParam ( Address , m_pMainFrame - > m_ulPurviewType , m_pMainFrame - > m_ulPurview , Address . lCorpID , m_pMainFrame - > m_lUserID , m_pMainFrame - > m_strLoginIP , m_szLocal , true ) ;
dlg . DoModal ( ) ;
/*
}
else
{
ANS_GAddress_SeeData Address = { 0 } ;
_tcscpy ( Address . szGroupID , m_szGroupID ) ;
Address . lCorpID = m_pMainFrame - > m_lCorpID ;
Address . ulPurviewType = PURVIEWTYPE_ADDRESS ; //<2F> <> <EFBFBD> <EFBFBD> ¼<EFBFBD> <C2BC> Ա<EFBFBD> <D4B1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ӵ<EFBFBD> <D3B4> 绰<EFBFBD> <E7BBB0> <EFBFBD> ĵ<EFBFBD> ַ
Address . ulPurview = 0 ; //û<> <C3BB> <EFBFBD> κ<EFBFBD> Ȩ<EFBFBD> <C8A8>
Address . szUserType [ 0 ] = ' 1 ' ; //<2F> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD>
DLG_User_Modify2 dlg ( this ) ;
dlg . SetParam ( Address , m_pMainFrame - > m_ulPurview , m_szLocal , true ) ;
dlg . DoModal ( ) ;
}
*/
}
void CFGAddress : : On_User_AddAddr ( )
{
if ( ! m_pMainFrame - > GetUserPurview ( PURVIEW_USER_MANAGER ) )
{
return ;
}
/*
if ( m_bFind2 ) //<2F> <> <EFBFBD> ڲ<EFBFBD> ѯ<EFBFBD> <D1AF> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> ˲<EFBFBD> <CBB2> <EFBFBD> <EFBFBD> <EFBFBD> Ч
return ;
if ( isAddressFull ( ) ) //ͨѶ¼<D1B6> <C2BC> <EFBFBD> <EFBFBD>
return ;
ANS_GAddress_SeeData Address = { 0 } ;
_tcscpy ( Address . szGroupID , m_szGroupID ) ;
Address . lCorpID = m_pMainFrame - > m_lCorpID ;
Address . ulPurviewType = PURVIEWTYPE_ADDRESS ; //<2F> <> <EFBFBD> <EFBFBD> ¼<EFBFBD> <C2BC> Ա<EFBFBD> <D4B1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ӵ<EFBFBD> <D3B4> 绰<EFBFBD> <E7BBB0> <EFBFBD> ĵ<EFBFBD> ַ
Address . ulPurview = 0 ; //û<> <C3BB> <EFBFBD> κ<EFBFBD> Ȩ<EFBFBD> <C8A8>
Address . szUserType [ 0 ] = ' 1 ' ; //<2F> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD>
DLG_User_Modify2 dlg ( this ) ;
dlg . SetParam ( Address , m_pMainFrame - > m_ulPurview , m_szLocal , true ) ;
dlg . DoModal ( ) ;
*/
}
void CFGAddress : : On_User_AddGroup ( )
{
if ( ! m_pMainFrame - > GetUserPurview ( PURVIEW_USER_MANAGER ) )
{
return ;
}
if ( m_bFind2 ) //<2F> <> <EFBFBD> ڲ<EFBFBD> ѯ<EFBFBD> <D1AF> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> ˲<EFBFBD> <CBB2> <EFBFBD> <EFBFBD> <EFBFBD> Ч
return ;
if ( isAddressFull ( ) ) //ͨѶ¼<D1B6> <C2BC> <EFBFBD> <EFBFBD>
return ;
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ܽ<EFBFBD> 12<31> <32> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
if ( _tcslen ( m_szGroupID ) > 12 )
{
MessageBox ( _T ( " <EFBFBD> Բ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ŀ¼<EFBFBD> <EFBFBD> <EFBFBD> Ѳ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ½<EFBFBD> <EFBFBD> û<EFBFBD> <EFBFBD> <EFBFBD> !" ) , _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) , MB_ICONWARNING ) ;
return ;
}
ANS_GAddress_Group_AddData GAdd = { 0 } ;
//<2F> <> <EFBFBD> ҿ<EFBFBD> <D2BF> е <EFBFBD> <D0B5> <EFBFBD> ID
long lGroupLen = _tcslen ( m_szGroupID ) ;
TCHAR szSelect [ 128 ] = { 0 } ;
_stprintf ( szSelect , _T ( " select GroupID from users where GroupID like '%s_' AND UserType='0' " ) , m_szGroupID ) ; //<2F> <> <EFBFBD> ҵ<EFBFBD> ǰ<EFBFBD> <C7B0> <EFBFBD> µĵ<C2B5> һ <EFBFBD> <D2BB>
BOOL b = m_AdoRS . Open ( szSelect ) ;
CStringSort sort ;
CString strTemp ;
while ( ! m_AdoRS . IsEOF ( ) )
{
m_AdoRS . GetCollect ( _T ( " GroupID " ) , strTemp ) ;
sort . Add ( strTemp ) ;
m_AdoRS . MoveNext ( ) ;
}
long lCount = sort . GetCount ( ) ;
long lAllCount = GROUPID_END - GROUPID_BEGIN ;
if ( lCount > = GROUPID_END - GROUPID_BEGIN )
{
MessageBox ( _T ( " <EFBFBD> Բ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ŀ¼<EFBFBD> <EFBFBD> <EFBFBD> Ѳ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ½<EFBFBD> <EFBFBD> û<EFBFBD> <EFBFBD> <EFBFBD> !" ) , _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) , MB_ICONWARNING ) ;
return ;
}
TCHAR szGroupID [ 16 ] = { 0 } ;
_tcscpy ( szGroupID , m_szGroupID ) ;
//<2F> <> ס <EFBFBD> <D7A1> <EFBFBD> е <EFBFBD> <D0B5> <EFBFBD> ID
TCHAR szAllID [ 200 ] [ 24 ] = { 0 } ;
for ( int i = 0 ; i < lCount ; i + + )
{
_tcscpy ( szAllID [ i ] , sort . GetAt ( i ) ) ;
}
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ID
for ( i = 0 ; i < lCount ; i + + )
{
BOOL bFound = false ;
for ( int j = 0 ; j < lCount ; j + + )
{
if ( szAllID [ j ] [ lGroupLen ] = = GROUPID_BEGIN + i )
{
bFound = true ;
}
}
if ( ! bFound )
break ;
}
szGroupID [ lGroupLen ] = GROUPID_BEGIN + i ; //<2F> µ<EFBFBD> <C2B5> <EFBFBD> ID
//<2F> µ<EFBFBD> <C2B5> <EFBFBD> IDӦ<44> ɷ<EFBFBD> <C9B7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ɣ <EFBFBD> <C9A3> <EFBFBD> ȥ<EFBFBD> <C8A5> <EFBFBD> <EFBFBD> ĸID,<2C> <> <EFBFBD> ص<EFBFBD> <D8B5> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ID
//_tcscpy( GAdd.szGroupID , szGroupID );
_tcscpy ( GAdd . szGroupID , m_szGroupID ) ;
_tcscpy ( GAdd . szCreateUser , m_pMainFrame - > m_pCurUser - > szUser ) ;
: : GetLocalTime ( & GAdd . tCreateTime ) ;
DLG_Group_Modify dlg ( this ) ;
dlg . SetParam ( GAdd , m_szLocal , _T ( " users " ) ) ;
if ( dlg . DoModal ( ) = = IDOK )
{
long lSize = sizeof ( REQ_GAddress_Group_Add ) + sizeof ( ANS_GAddress_Group_AddData ) ;
BYTE * pAddData = new BYTE [ lSize ] ; memset ( pAddData , 0 , lSize ) ;
REQ_GAddress_Group_Add * pAdd = ( REQ_GAddress_Group_Add * ) pAddData ; //ͷ
ANS_GAddress_Group_AddData * pGAdd = ( ANS_GAddress_Group_AddData * ) ( pAddData + sizeof ( REQ_GAddress_Group_Add ) ) ;
* pGAdd = dlg . GetParam ( ) ;
pAdd - > lCorpID = m_pMainFrame - > m_lCorpID ;
pAdd - > lCount = 1 ;
m_pMainFrame - > SendFrame ( SMSFUNC_GADDRESS_GROUP_ADD , pAddData , lSize ) ;
}
}
void CFGAddress : : On_User_Modify ( )
{
if ( ! m_pMainFrame - > GetUserPurview ( PURVIEW_USER_MANAGER ) )
{
return ;
}
long lItem = GetCurrentSelected ( ) ;
if ( lItem < 0 )
return ;
if ( isLockItem ( lItem ) )
{
return ;
}
long lUserID = m_wndList . GetItemData ( lItem ) ;
ANS_GAddress_SeeData Address = GetUserData ( lUserID ) ;
if ( _tcslen ( Address . szLoginName ) > 0 & & Address . ulPurviewType = = PURVIEWTYPE_ADMIN ) //Ҫɾ<D2AA> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ա
{
if ( ! m_pMainFrame - > GetUserPurview ( PURVIEW_USER_MODIFY , false ) ) //û<> <C3BB> ɾ<EFBFBD> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ա<EFBFBD> <D4B1> Ȩ<EFBFBD> <C8A8>
{
MessageBox ( _T ( " <EFBFBD> Բ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> <EFBFBD> Ȩ<EFBFBD> <EFBFBD> <EFBFBD> Ĺ<EFBFBD> <EFBFBD> <EFBFBD> Ա<EFBFBD> ʺţ<EFBFBD> " ) , _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) , MB_ICONWARNING ) ;
return ;
}
}
// if (_tcslen(Address.szName) >0 || _tcslen(Address.szLoginName))
// {
// if ( m_pMainFrame->GetUserPurview( PURVIEW_GADDRESS_MODIFY,false ) && //Ҫ<> <D2AA> <EFBFBD> <EFBFBD> Ȩ<EFBFBD> <C8A8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ȩ<EFBFBD> <EFBFBD> Ȩ<EFBFBD> <EFBFBD> <DEB2> ܴ<EFBFBD> <DCB4> <EFBFBD> רҵ<D7A8> <D2B5> <EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> <DEB8> <EFBFBD>
// m_pMainFrame->GetUserPurview( PURVIEW_GADDRESS_MODIFYPURVIEW,false ) )
// {
DLG_User_Modify dlg ( this ) ;
TCHAR szLocal [ 128 ] = { 0 } ;
GetLocal ( szLocal , Address . szGroupID ) ; //ȡ<> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> λ<EFBFBD> <CEBB>
dlg . SetParam ( Address , m_pMainFrame - > m_ulPurviewType , m_pMainFrame - > m_ulPurview , m_pMainFrame - > m_lCorpID , m_pMainFrame - > m_lUserID , m_pMainFrame - > m_strLoginIP , szLocal , false ) ;
if ( dlg . DoModal ( ) = = IDOK )
{
SetLockItem ( lItem , true ) ;
long lSize = sizeof ( REQ_GAddress_Modify ) + sizeof ( ANS_GAddress_SeeData ) ;
BYTE * pModifyData = new BYTE [ lSize ] ; memset ( pModifyData , 0 , lSize ) ;
REQ_GAddress_Modify * pModify = ( REQ_GAddress_Modify * ) pModifyData ; //ͷ
ANS_GAddress_SeeData * pAddress = ( ANS_GAddress_SeeData * ) ( pModifyData + sizeof ( REQ_GAddress_Modify ) ) ;
* pAddress = dlg . GetParam ( ) ;
pModify - > lCorpID = m_pMainFrame - > m_lCorpID ;
pModify - > lItem = lItem ;
pModify - > lCount = 1 ;
m_pMainFrame - > SendFrame ( SMSFUNC_GADDRESS_MODIFY , pModifyData , lSize ) ;
}
/*
}
else
{
//ֻ<> ܴ<EFBFBD> <DCB4> <EFBFBD> һ <EFBFBD> <D2BB> <EFBFBD> <EFBFBD> <EFBFBD> Ĵ<DEB8> <C4B4> <EFBFBD>
DLG_User_Modify2 dlg ( this ) ;
dlg . SetParam ( Address , m_pMainFrame - > m_ulPurview , m_szLocal , false ) ;
if ( dlg . DoModal ( ) = = IDOK )
{
SetLockItem ( lItem , true ) ;
long lSize = sizeof ( REQ_GAddress_Modify ) + sizeof ( ANS_GAddress_SeeData ) ;
BYTE * pModifyData = new BYTE [ lSize ] ; memset ( pModifyData , 0 , lSize ) ;
REQ_GAddress_Modify * pModify = ( REQ_GAddress_Modify * ) pModifyData ; //ͷ
ANS_GAddress_SeeData * pAddress = ( ANS_GAddress_SeeData * ) ( pModifyData + sizeof ( REQ_GAddress_Modify ) ) ;
* pAddress = dlg . GetParam ( ) ;
pModify - > lCorpID = m_pMainFrame - > m_lCorpID ;
pModify - > lItem = lItem ;
pModify - > lCount = 1 ;
m_pMainFrame - > SendFrame ( SMSFUNC_GADDRESS_MODIFY , pModifyData , lSize ) ;
}
}
}
*/
}
void CFGAddress : : On_User_Del ( )
{
if ( ! m_pMainFrame - > GetUserPurview ( PURVIEW_USER_MANAGER ) )
{
return ;
}
long lRet = MessageBox ( _T ( " ȷʵҪɾ<EFBFBD> <EFBFBD> ѡ <EFBFBD> е <EFBFBD> <EFBFBD> û<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) , _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) , MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON2 ) ;
if ( lRet ! = IDYES )
return ;
long lCount = m_wndList . GetSelectedCount ( ) ;
long lSize = sizeof ( REQ_GAddress_Del ) + sizeof ( ANS_GAddress_DelData ) * lCount ;
BYTE * pDelSend = new BYTE [ lSize ] ; memset ( pDelSend , 0 , lSize ) ;
REQ_GAddress_Del * pDel = ( REQ_GAddress_Del * ) pDelSend ; //ͷ
ANS_GAddress_DelData * pDelData = ( ANS_GAddress_DelData * ) ( pDelSend + sizeof ( REQ_GAddress_Del ) ) ;
pDel - > lCount = lCount ;
POSITION pos = m_wndList . GetFirstSelectedItemPosition ( ) ;
while ( pos )
{
long lItem = m_wndList . GetNextSelectedItem ( pos ) ;
long lUserID = m_wndList . GetItemData ( lItem ) ;
ANS_GAddress_SeeData Address = GetUserData ( lUserID ) ;
CString strLogin = m_wndList . GetItemText ( lItem , 1 ) ;
if ( lUserID = = m_pMainFrame - > m_lUserID )
{
long lRet = MessageBox ( _T ( " Ҫɾ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> <EFBFBD> а <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ǰ<EFBFBD> <EFBFBD> ¼<EFBFBD> û<EFBFBD> <EFBFBD> <EFBFBD> ɾ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 㽫<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ͨ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʺŵ<EFBFBD> ¼<EFBFBD> <EFBFBD> \r \n <EFBFBD> Ƿ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ɾ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʺţ<EFBFBD> " ) , _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) , MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON2 ) ;
if ( lRet ! = IDYES )
continue ;
}
if ( _tcslen ( Address . szLoginName ) > 0 & & Address . ulPurviewType = = PURVIEWTYPE_ADMIN ) //Ҫɾ<D2AA> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ա
{
if ( ! m_pMainFrame - > GetUserPurview ( PURVIEW_USER_MODIFY , false ) ) //û<> <C3BB> ɾ<EFBFBD> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ա<EFBFBD> <D4B1> Ȩ<EFBFBD> <C8A8>
{
CString str ;
str . Format ( _T ( " Ҫɾ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> <EFBFBD> а <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ա<EFBFBD> ʺ<EFBFBD> :%s<> <73> <EFBFBD> <EFBFBD> ɾ<EFBFBD> <C9BE> <EFBFBD> <EFBFBD> " ) , Address . szLoginName ) ;
MessageBox ( str , _T ( " <EFBFBD> <EFBFBD> ʾ " ) , MB_ICONINFORMATION ) ;
continue ;
}
else
{
CString str ;
str . Format ( _T ( " Ҫɾ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> <EFBFBD> а <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ա<EFBFBD> ʺ<EFBFBD> :%s<> <73> <EFBFBD> Ƿ<EFBFBD> <C7B7> <EFBFBD> <EFBFBD> <EFBFBD> ɾ<EFBFBD> <C9BE> <EFBFBD> <EFBFBD> <EFBFBD> ʺţ<CABA> " ) , Address . szLoginName ) ;
long lRet = MessageBox ( str , _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) , MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON2 ) ;
if ( lRet ! = IDYES )
continue ;
}
/*
if ( strLogin = = _T ( " Admin " ) )
{
MessageBox ( _T ( " Ҫɾ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> <EFBFBD> а <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ա<EFBFBD> ʺţ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʺŲ<EFBFBD> <EFBFBD> <EFBFBD> ɾ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) , _T ( " <EFBFBD> <EFBFBD> ʾ " ) , MB_ICONINFORMATION ) ;
continue ;
}
*/
}
pDelData - > lItem = lItem ;
pDelData - > lUserID = lUserID ;
this - > SetLockItem ( lItem , true ) ; //<2F> <> <EFBFBD> <EFBFBD>
pDelData + + ;
}
m_pMainFrame - > SendFrame ( SMSFUNC_GADDRESS_DEL , pDelSend , lSize ) ;
}
void CFGAddress : : On_User_Find ( )
{
DLG_FindUser dlg ( this ) ;
dlg . SetParam ( m_FindPro ) ;
if ( dlg . DoModal ( ) = = IDOK )
{
m_FindPro = dlg . m_FindPro ;
On_User_Find2 ( & dlg ) ;
}
return ;
/*
m_wndList . UnSelectAllItems ( ) ;
DLG_FindUser dlg ( this ) ;
if ( dlg . DoModal ( ) = = IDOK )
{
if ( dlg . m_bFindAll )
{
On_User_Find2 ( & dlg ) ;
return ;
}
long lFindItem = - 1 ;
BOOL bFind ;
char szFind [ 32 ] = { 0 } ;
_tcscpy ( szFind , dlg . m_strMsg ) ;
long lCount = m_wndList . GetItemCount ( ) ;
char szMsg [ 64 ] ;
for ( int i = 0 ; i < lCount ; i + + )
{
bFind = false ;
if ( dlg . m_bName ) //name
{
memset ( szMsg , 0 , sizeof ( szMsg ) ) ;
m_wndList . GetItemText ( i , 3 , szMsg , sizeof ( szMsg ) ) ;
bFind = FoundChar ( szMsg , szFind , _tcslen ( szMsg ) ) ;
}
if ( ! bFind & & dlg . m_bNickName ) //nickname
{
memset ( szMsg , 0 , sizeof ( szMsg ) ) ;
m_wndList . GetItemText ( i , 4 , szMsg , sizeof ( szMsg ) ) ;
bFind = FoundChar ( szMsg , szFind , _tcslen ( szMsg ) ) ;
}
if ( ! bFind & & dlg . m_bSex ) //sex
{
memset ( szMsg , 0 , sizeof ( szMsg ) ) ;
m_wndList . GetItemText ( i , 4 , szMsg , sizeof ( szMsg ) ) ;
bFind = FoundChar ( szMsg , szFind , _tcslen ( szMsg ) ) ;
}
if ( ! bFind & & dlg . m_bJob ) //job
{
memset ( szMsg , 0 , sizeof ( szMsg ) ) ;
m_wndList . GetItemText ( i , 8 , szMsg , sizeof ( szMsg ) ) ;
bFind = FoundChar ( szMsg , szFind , _tcslen ( szMsg ) ) ;
}
if ( ! bFind & & dlg . m_bTel ) //Tel
{
memset ( szMsg , 0 , sizeof ( szMsg ) ) ;
m_wndList . GetItemText ( i , 6 , szMsg , sizeof ( szMsg ) ) ;
bFind = FoundChar ( szMsg , szFind , _tcslen ( szMsg ) ) ;
}
if ( ! bFind & & dlg . m_bMobile ) //Mobile
{
memset ( szMsg , 0 , sizeof ( szMsg ) ) ;
m_wndList . GetItemText ( i , 5 , szMsg , sizeof ( szMsg ) ) ;
bFind = FoundChar ( szMsg , szFind , _tcslen ( szMsg ) ) ;
}
if ( ! bFind & & dlg . m_bEmail ) //Email
{
memset ( szMsg , 0 , sizeof ( szMsg ) ) ;
m_wndList . GetItemText ( i , 9 , szMsg , sizeof ( szMsg ) ) ;
bFind = FoundChar ( szMsg , szFind , _tcslen ( szMsg ) ) ;
}
if ( bFind )
{
if ( lFindItem = = - 1 )
lFindItem = i ; //<2F> <> ¼<EFBFBD> <C2BC> һ <EFBFBD> <D2BB> <EFBFBD> ҵ<EFBFBD> <D2B5> ļ<EFBFBD> ¼
m_wndList . SelectItem ( i ) ;
}
}
if ( lFindItem ! = - 1 ) //<2F> <> ʾ <EFBFBD> <CABE> һ <EFBFBD> <D2BB> <EFBFBD> ҵ<EFBFBD> <D2B5> <EFBFBD>
{
m_wndList . EnsureVisible ( lFindItem , false ) ;
m_wndList . SetFocus ( ) ;
}
else
{
MessageBox ( " <EFBFBD> Բ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> <EFBFBD> <EFBFBD> ҵ<EFBFBD> <EFBFBD> <EFBFBD> Ӧ<EFBFBD> ļ<EFBFBD> ¼<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ²<EFBFBD> ѯ<EFBFBD> <EFBFBD> " , " <EFBFBD> <EFBFBD> Ϣ" , MB_ICONINFORMATION ) ;
}
}
*/
}
void CFGAddress : : On_User_AddToList ( )
{
On_User_AddToList_Public ( 0 ) ;
}
void CFGAddress : : On_User_AddToList_Fax ( )
{
On_User_AddToList_Public ( 1 ) ;
}
void CFGAddress : : On_User_AddToList_Mms ( )
{
On_User_AddToList_Public ( 2 ) ;
}
void CFGAddress : : On_User_AddToList_Public ( long lSendType )
{
if ( ! m_pMainFrame - > GetUserPurview ( PURVIEW_SENDG ) )
{
return ;
}
long lCount = m_wndList . GetSelectedCount ( ) ;
if ( lCount < = 0 )
return ;
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
long lSize = sizeof ( Send_User ) * lCount ;
BYTE * pS = new BYTE [ lSize ] ;
memset ( pS , 0 , lSize ) ;
Send_User * pUser = ( Send_User * ) pS ;
TCHAR szSelect [ 128 ] = { 0 } ;
POSITION pos = m_wndList . GetFirstSelectedItemPosition ( ) ;
while ( pos )
{
long lItem = m_wndList . GetNextSelectedItem ( pos ) ;
long lUserID = m_wndList . GetItemData ( lItem ) ;
if ( lUserID > 0 )
{
_stprintf ( szSelect , _T ( " select * from users where UserID=%d " ) , lUserID ) ;
BOOL b = m_AdoRS . Open ( szSelect ) ;
if ( b & & m_AdoRS . GetRecordCount ( ) )
{
m_AdoRS . MoveFirst ( ) ;
m_AdoRS . GetCollect ( _T ( " Name " ) , pUser - > szName ) ;
m_AdoRS . GetCollect ( _T ( " NickName " ) , pUser - > szNickName ) ;
if ( lSendType = = 1 ) //<2F> <> <EFBFBD> <EFBFBD>
m_AdoRS . GetCollect ( _T ( " Fax " ) , pUser - > szMobile ) ;
else
m_AdoRS . GetCollect ( _T ( " Mobile " ) , pUser - > szMobile ) ;
m_AdoRS . GetCollect ( _T ( " BZ " ) , pUser - > szBZ ) ;
}
}
pUser + + ;
}
switch ( lSendType )
{
case 0 :
m_pFuncView - > On_User_List_AddUser ( lCount , ( Send_User * ) pS ) ;
break ;
case 1 :
m_pFuncView - > On_User_List_AddUser_Fax ( lCount , ( Send_User * ) pS ) ;
break ;
case 2 :
m_pFuncView - > On_User_List_AddUser_Mms ( lCount , ( Send_User * ) pS ) ;
break ;
}
delete pS ;
}
void CFGAddress : : On_User_Inport ( )
{
/*
if ( m_bFind2 ) //<2F> <> <EFBFBD> ڲ<EFBFBD> ѯ<EFBFBD> <D1AF> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> ˲<EFBFBD> <CBB2> <EFBFBD> <EFBFBD> <EFBFBD> Ч
return ;
Inport_Field Field [ ] =
{
{ _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) , 0 , 0 , - 1 } ,
{ _T ( " <EFBFBD> dz<EFBFBD> " ) , 0 , 1 , - 1 } ,
{ _T ( " <EFBFBD> Ա<EFBFBD> " ) , 0 , 2 , - 1 } ,
{ _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) , 0 , 3 , - 1 } ,
//{_T("<22> <> ˾"),0,4,-1},
{ _T ( " ְ<EFBFBD> <EFBFBD> " ) , 0 , 5 , - 1 } ,
//{_T("<22> <> ַ"),0,6,-1},
{ _T ( " <EFBFBD> ֻ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) , 0 , 7 , - 1 } ,
{ _T ( " <EFBFBD> 绰<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) , 0 , 8 , - 1 } ,
{ _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) , 0 , 9 , - 1 } ,
{ _T ( " Email " ) , 0 , 10 , - 1 } ,
{ _T ( " QQ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) , 0 , 11 , - 1 } ,
{ _T ( " <EFBFBD> <EFBFBD> ע" ) , 0 , 12 , - 1 } ,
} ;
DLG_User_InportP2 dlg ( this ) ;
dlg . SetParam ( & Field [ 0 ] , sizeof ( Field ) / sizeof ( Inport_Field ) , 1 ) ;
//DLG_User_Inport dlg(this);
//dlg.SetInport(NULL,&m_wndList,true,false);
if ( dlg . DoModal ( ) = = IDOK )
{
if ( m_pInUser )
{ delete m_pInUser ; m_pInUser = NULL ; } ;
m_lInUserCount = dlg . m_User . GetCount ( ) ;
m_lInUserIndex = 0 ;
if ( m_lInUserCount > 0 )
{
//ȡ<> <C8A1> Ϣ
m_pInUser = new ANS_GAddress_SeeData [ m_lInUserCount ] ;
memset ( m_pInUser , 0 , sizeof ( ANS_GAddress_SeeData ) * m_lInUserCount ) ;
POSITION pos = dlg . m_User . GetHeadPosition ( ) ;
long i = 0 ;
while ( pos )
{
PAddress pAddress = * dlg . m_User . GetNext ( pos ) ;
m_pInUser [ i ] . ulPurviewType = PURVIEWTYPE_ADDRESS ;
_tcscpy ( m_pInUser [ i ] . szName , pAddress . szName ) ;
_tcscpy ( m_pInUser [ i ] . szSex , pAddress . szSex ) ;
_tcscpy ( m_pInUser [ i ] . szNickName , pAddress . szNickName ) ;
_tcscpy ( m_pInUser [ i ] . szMobile , pAddress . szMobile ) ;
_tcscpy ( m_pInUser [ i ] . szTel , pAddress . szTel ) ;
_tcscpy ( m_pInUser [ i ] . szFax , pAddress . szFax ) ;
m_pInUser [ i ] . tBirthday = pAddress . tBirthday ;
_tcscpy ( m_pInUser [ i ] . szJob , pAddress . szJob ) ;
_tcscpy ( m_pInUser [ i ] . szEmail , pAddress . szEmail ) ;
_tcscpy ( m_pInUser [ i ] . szQQ , pAddress . szQQ ) ;
_tcscpy ( m_pInUser [ i ] . szBZ , pAddress . szBZ ) ;
i + + ;
}
m_bInUser = true ; //<2F> <> <EFBFBD> ڵ<EFBFBD> <DAB5> <EFBFBD> <EFBFBD> <EFBFBD> ַ<EFBFBD> <D6B7>
m_DLGGetUser . SetProcessTitle ( _T ( " <EFBFBD> <EFBFBD> <EFBFBD> ڵ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ַ<EFBFBD> <EFBFBD> ,<2C> <> <EFBFBD> Ժ<EFBFBD> ..." ) ) ;
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ӵ<EFBFBD> ַ<EFBFBD> <D6B7> <EFBFBD> <EFBFBD> Ϣ
Inport_Next ( ) ;
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
m_DLGGetUser . DoModal ( ) ;
delete m_pInUser ;
m_pInUser = NULL ;
m_bInUser = false ; //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> ڵ<EFBFBD> <DAB5> <EFBFBD> <EFBFBD> <EFBFBD> ַ<EFBFBD> <D6B7>
}
TCHAR Buf [ 64 ] = { 0 } ;
_stprintf ( Buf , _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ַ<EFBFBD> <EFBFBD> <EFBFBD> ɹ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> %d<> <64> <EFBFBD> <EFBFBD> Ч<EFBFBD> û<EFBFBD> !" ) , m_lInUserIndex ) ;
MessageBox ( Buf , _T ( " <EFBFBD> <EFBFBD> Ϣ" ) , MB_ICONASTERISK ) ;
}
dlg . Close ( ) ; //<2F> ر<EFBFBD> <D8B1> <EFBFBD> <EFBFBD> <EFBFBD>
*/
}
void CFGAddress : : On_User_Export ( )
{
DLG_User_Inport2 dlg ( this ) ;
dlg . SetInport ( & m_AdoRS , m_szGroupID , false , false ) ;
dlg . SetOutportName ( m_strGroupName ) ;
dlg . DoModal ( ) ;
}
void CFGAddress : : On_User_Refresh ( )
{
ShowUser ( m_lUserID ) ; //ˢ<> <CBA2>
}
void CFGAddress : : On_User_Copy ( )
{
if ( m_bFind2 ) //<2F> <> <EFBFBD> ڲ<EFBFBD> ѯ<EFBFBD> <D1AF> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> ˲<EFBFBD> <CBB2> <EFBFBD> <EFBFBD> <EFBFBD> Ч
return ;
long lCount = m_wndList . GetSelectedCount ( ) ;
if ( lCount < = 0 )
return ;
m_Copy_UserID = m_lUserID ;
_tcscpy ( m_Copy_GroupID , m_szGroupID ) ;
m_Copy_Count = lCount ;
if ( m_Copy_Data )
{
delete m_Copy_Data ;
m_Copy_Data = NULL ;
}
m_Copy_Data = new ANS_GAddress_SeeData [ lCount ] ;
memset ( m_Copy_Data , 0 , sizeof ( ANS_GAddress_SeeData ) * lCount ) ;
POSITION pos = m_wndList . GetFirstSelectedItemPosition ( ) ;
long i = 0 ;
long lItem = 0 ;
long lUserID = 0 ;
while ( pos )
{
lItem = m_wndList . GetNextSelectedItem ( pos ) ;
lUserID = m_wndList . GetItemData ( lItem ) ;
m_Copy_Data [ i ] = GetUserData ( lUserID ) ;
i + + ;
}
m_Copy_Count = i ;
m_Copy_Type = GADDRESS_COPYTYPE_COPY ;
}
void CFGAddress : : On_User_Cut ( )
{
On_User_Copy ( ) ;
m_Copy_Type = GADDRESS_COPYTYPE_CUT ;
}
void CFGAddress : : On_User_Paste ( )
{
//if (m_bFind2 || m_lUserID==m_Copy_UserID || m_Copy_Count<=0) //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
// return ;
if ( m_bFind2 | | m_Copy_Count < = 0 | | ( m_lUserID = = m_Copy_UserID & & m_Copy_Type = = GADDRESS_COPYTYPE_CUT ) ) //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
return ;
CString str ;
if ( m_Copy_Type = = GADDRESS_COPYTYPE_CUT ) //<2F> <> <EFBFBD> <EFBFBD> ,ֱ<> Ӹ<EFBFBD> <D3B8> <EFBFBD> <EFBFBD> <EFBFBD> ID<49> <44> <EFBFBD> <EFBFBD>
{
for ( int i = 0 ; i < m_Copy_Count ; i + + )
{
str . Format ( _T ( " Update users set GroupID='%s' where UserID=%d " ) , m_szGroupID , m_Copy_Data [ i ] . lUserID ) ;
m_AdoRS . Open ( str ) ;
m_AdoRS . Close ( ) ;
}
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ֪<EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> ƶ<EFBFBD>
long lSize = sizeof ( REQ_GAddress_User_Move ) + sizeof ( REQ_GAddress_User_Move_Data ) * m_Copy_Count ;
BYTE * pData = new BYTE [ lSize ] ;
memset ( pData , 0 , lSize ) ;
REQ_GAddress_User_Move * pMove = ( REQ_GAddress_User_Move * ) pData ;
REQ_GAddress_User_Move_Data * pMoveData = ( REQ_GAddress_User_Move_Data * ) ( pData + sizeof ( REQ_GAddress_User_Move ) ) ;
pMove - > lCount = m_Copy_Count ;
_tcscpy ( pMove - > szTagGroup , m_szGroupID ) ;
for ( i = 0 ; i < m_Copy_Count ; i + + )
{
pMoveData - > lUserID = m_Copy_Data [ i ] . lUserID ;
pMoveData + + ;
}
this - > m_pMainFrame - > SendFrame ( SMSFUNC_GADDRESS_USER_MOVE , pData , lSize ) ;
}
/*
else
{
if ( m_AdoRS . Open ( " users " , adCmdTable ) )
{
for ( int i = 0 ; i < m_Copy_Count ; i + + )
{
m_AdoRS . AddNew ( ) ;
m_AdoRS . PutCollect ( " UserID " , m_Copy_Data [ i ] . lUserID ) ;
m_AdoRS . PutCollect ( " CorpID " , m_Copy_Data [ i ] . lCorpID ) ;
m_AdoRS . PutCollect ( " UserType " , m_Copy_Data [ i ] . szUserType ) ;
m_AdoRS . PutCollect ( " GroupID " , m_Copy_Data [ i ] . szGroupID ) ;
m_AdoRS . PutCollect ( " Name " , m_Copy_Data [ i ] . szName ) ;
m_AdoRS . PutCollect ( " NickName " , m_Copy_Data [ i ] . szNickName ) ;
m_AdoRS . PutCollect ( " Sex " , m_Copy_Data [ i ] . szSex ) ;
m_AdoRS . PutCollect ( " Birthday " , m_Copy_Data [ i ] . tBirthday ) ;
m_AdoRS . PutCollect ( " Job " , m_Copy_Data [ i ] . szJob ) ;
m_AdoRS . PutCollect ( " Tel " , m_Copy_Data [ i ] . szTel ) ;
m_AdoRS . PutCollect ( " Fax " , m_Copy_Data [ i ] . szFax ) ;
m_AdoRS . PutCollect ( " Email " , m_Copy_Data [ i ] . szEmail ) ;
m_AdoRS . PutCollect ( " Mobile " , m_Copy_Data [ i ] . szMobile ) ;
m_AdoRS . PutCollect ( " QQ " , m_Copy_Data [ i ] . szQQ ) ;
//m_AdoRS.PutCollect( "LoginName" , m_Copy_Data[i].szLoginName);
//m_AdoRS.PutCollect( "Passwd" , m_Copy_Data[i].szPasswd);
//m_AdoRS.PutCollect( "PurviewType", m_Copy_Data[i].ulPurviewType);
//m_AdoRS.PutCollect( "Purview" , m_Copy_Data[i].ulPurview);
//m_AdoRS.PutCollect( "LoginCount" , m_Copy_Data[i].lLoginCount);
//m_AdoRS.PutCollect( "LoginTime" , m_Copy_Data[i].tLoginTime);
//m_AdoRS.PutCollect( "SMSNum" , m_Copy_Data[i].szSMSNum);
//m_AdoRS.PutCollect( "SMSUsed" , m_Copy_Data[i].lSMSUsed);
//m_AdoRS.PutCollect( "SMSSendAll" , m_Copy_Data[i].lSMSSendAll);
//m_AdoRS.PutCollect( "OvrTime" , m_Copy_Data[i].tOvrTime);
m_AdoRS . PutCollect ( " CreateUser " , m_Copy_Data [ i ] . szCreateUser ) ;
m_AdoRS . PutCollect ( " CreateTime " , m_Copy_Data [ i ] . tCreateTime ) ;
m_AdoRS . PutCollect ( " BZ " , m_Copy_Data [ i ] . szBZ ) ;
m_AdoRS . Update ( ) ;
m_AdoRS . GetCollect ( " UserID " , m_Copy_Data [ i ] . lUserID ) ; //ȡ<> <C8A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ӵ<EFBFBD> UserID
}
m_AdoRS . Close ( ) ;
}
}
*/
//<2F> <> ʾ <EFBFBD> <CABE> <EFBFBD> <EFBFBD>
for ( int i = 0 ; i < m_Copy_Count ; i + + )
{
TCHAR szBuf [ 32 ] = { 0 } ;
long lCount = m_wndList . GetItemCount ( ) ;
m_wndList . InsertItem ( lCount , _itot ( lCount + 1 , szBuf , 10 ) ) ; //<2F> <> <EFBFBD> <EFBFBD>
long lIcon = 2 ;
if ( _tcscmp ( m_Copy_Data [ i ] . szSex , _T ( " <EFBFBD> <EFBFBD> " ) ) = = 0 )
lIcon = 0 ;
if ( _tcscmp ( m_Copy_Data [ i ] . szSex , _T ( " Ů " ) ) = = 0 )
lIcon = 1 ;
m_wndList . SetIconIndex ( lCount , lIcon ) ;
m_wndList . SetItemData ( lCount , m_Copy_Data [ i ] . lUserID ) ;
long lTemp = 1 ;
m_wndList . SetItemText ( lCount , lTemp + + , m_Copy_Data [ i ] . szLoginName ) ;
m_wndList . SetItemText ( lCount , lTemp + + , m_Copy_Data [ i ] . szSMSNum ) ;
if ( m_Copy_Data [ i ] . lSMSUsed = = - 100 )
str = _T ( " <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) ;
else
str . Format ( _T ( " %8d " ) , m_Copy_Data [ i ] . lSMSUsed ) ;
m_wndList . SetItemText ( lCount , lTemp + + , str ) ;
# ifdef SUPPER_FUNC_MMS
if ( m_Copy_Data [ i ] . lMmsUsed = = - 100 )
str = _T ( " <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) ;
else
str . Format ( _T ( " %8d " ) , m_Copy_Data [ i ] . lMmsUsed ) ;
m_wndList . SetItemText ( lCount , lTemp + + , str ) ;
# endif
# ifdef YQ_VER_JL
str . Format ( _T ( " %8d " ) , m_Copy_Data [ i ] . lSMSSendAll ) ;
m_wndList . SetItemText ( lCount , lTemp + + , str ) ;
# endif
switch ( m_Copy_Data [ i ] . ulPurviewType )
{
case PURVIEWTYPE_ADMIN :
str = _T ( " ϵͳ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ա " ) ;
break ;
case PURVIEWTYPE_KF :
str = _T ( " <EFBFBD> ͻ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ա" ) ;
break ;
case PURVIEWTYPE_USERS :
str = _T ( " һ <EFBFBD> <EFBFBD> Ա<EFBFBD> <EFBFBD> " ) ;
break ;
case PURVIEWTYPE_INPUT :
str = _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ¼<EFBFBD> <EFBFBD> Ա" ) ;
break ;
case PURVIEWTYPE_ADDRESS :
default :
str = _T ( " <EFBFBD> <EFBFBD> ͨѶ¼" ) ;
break ;
}
m_wndList . SetItemText ( lCount , lTemp + + , str ) ;
str . Format ( _T ( " %8d " ) , m_Copy_Data [ i ] . lLoginCount ) ;
m_wndList . SetItemText ( lCount , lTemp + + , str ) ;
m_wndList . SetItemText ( lCount , lTemp + + , m_Copy_Data [ i ] . szName ) ;
m_wndList . SetItemText ( lCount , lTemp + + , m_Copy_Data [ i ] . szNickName ) ;
m_wndList . SetItemText ( lCount , lTemp + + , m_Copy_Data [ i ] . szMobile ) ;
m_wndList . SetItemText ( lCount , lTemp + + , m_Copy_Data [ i ] . szTel ) ;
COleDateTime t ( m_Copy_Data [ i ] . tBirthday ) ;
if ( t . GetStatus ( ) = = COleDateTime : : valid )
{
str . Format ( _T ( " %04d.%02d.%02d " ) , t . GetYear ( ) , t . GetMonth ( ) , t . GetDay ( ) ) ;
m_wndList . SetItemText ( lCount , lTemp + + , str ) ;
}
else
{
m_wndList . SetItemText ( lCount , lTemp + + , _T ( " " ) ) ;
}
m_wndList . SetItemText ( lCount , lTemp + + , m_Copy_Data [ i ] . szJob ) ;
m_wndList . SetItemText ( lCount , lTemp + + , m_Copy_Data [ i ] . szEmail ) ;
# ifdef SHOWBZ_VER
m_wndList . SetItemText ( lCount , lTemp + + , m_Copy_Data [ i ] . szBZ ) ;
# endif
m_wndList . SetItemData ( lCount , m_Copy_Data [ i ] . lUserID ) ;
}
if ( m_Copy_Type = = GADDRESS_COPYTYPE_CUT )
{
//ÿ<> <C3BF> ֻ<EFBFBD> <D6BB> <EFBFBD> <EFBFBD> һ <EFBFBD> β<EFBFBD> <CEB2> <EFBFBD>
m_Copy_UserID = 0 ;
memset ( m_Copy_GroupID , 0 , sizeof ( m_Copy_GroupID ) ) ;
m_Copy_Count = 0 ;
m_Copy_Type = 0 ;
m_Copy_Data = NULL ;
}
}
void CFGAddress : : On_User_Log ( )
{
if ( ! m_pMainFrame - > GetUserPurview ( PURVIEW_USER_MANAGER ) )
{
return ;
}
long lItem = GetCurrentSelected ( ) ;
if ( lItem < 0 )
return ;
CString strMobile = m_wndList . GetItemText ( lItem , 8 ) ;
DLG_User_Log dlg ( this ) ;
dlg . SetParam ( & m_AdoRS , strMobile ) ;
dlg . DoModal ( ) ;
}
long CFGAddress : : GetCurrentSelected ( )
{
POSITION pos = m_wndList . GetFirstSelectedItemPosition ( ) ;
if ( pos )
{
return m_wndList . GetNextSelectedItem ( pos ) ;
}
return - 1 ;
}
BOOL CFGAddress : : isLockItem ( long lItem , BOOL bShowWarning )
{
BOOL b = ( m_wndList . GetIconIndex ( lItem ) = = 3 ) ;
if ( b & & bShowWarning )
{
MessageBox ( _T ( " <EFBFBD> <EFBFBD> ¼<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ȴ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> غ<EFBFBD> <EFBFBD> ٲ<EFBFBD> <EFBFBD> <EFBFBD> !" ) , _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) , MB_ICONINFORMATION ) ;
}
return b ;
}
void CFGAddress : : SetLockItem ( long lItem , BOOL bLock )
{
if ( bLock )
m_wndList . SetIconIndex ( lItem , 3 ) ;
else
{
m_wndList . SetIconIndex ( lItem , 2 ) ; //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <DEB7> ֳ<EFBFBD> <D6B3> <EFBFBD> Ů<EFBFBD> <C5AE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Եı <D4B5> ʾ
}
}
void CFGAddress : : ShowRMenu ( )
{
if ( ! m_pMainFrame - > GetUserPurview ( PURVIEW_USER_MANAGER , false ) ) //û<> в鿴Ȩ<E9BFB4> <C8A8>
return ;
CMenu menu ;
menu . CreatePopupMenu ( ) ;
BOOL bLock = false ;
long lItem = this - > GetCurrentSelected ( ) ;
if ( lItem > = 0 )
bLock = isLockItem ( lItem , false ) ; //ȡ<> <C8A1> <EFBFBD> Ƿ<EFBFBD> <C7B7> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
/*
//<2F> <> <EFBFBD> <EFBFBD>
if ( m_pMainFrame - > GetUserPurview ( PURVIEW_GADDRESS_ADD , false ) & & ! m_bFind2 )
{
if ( m_pMainFrame - > GetUserPurview ( PURVIEW_GADDRESS_MODIFY , false ) & & //Ҫ<> <D2AA> <EFBFBD> <EFBFBD> Ȩ<EFBFBD> <C8A8> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ȩ<EFBFBD> <EFBFBD> Ȩ<EFBFBD> <EFBFBD> <DEB2> ܴ<EFBFBD> <DCB4> <EFBFBD> רҵ<D7A8> <D2B5> <EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> <DEB8> <EFBFBD>
m_pMainFrame - > GetUserPurview ( PURVIEW_GADDRESS_MODIFYPURVIEW , false ) )
{
*/
menu . AppendMenu ( MF_STRING , MENU_GADDRESS_ADD , _T ( " <20> <> <EFBFBD> ӵ<EFBFBD> ¼<EFBFBD> ʺ<EFBFBD> " ) ) ;
/*
}
else
{
menu . AppendMenu ( MF_STRING | MF_DISABLED | MF_GRAYED , MENU_GADDRESS_ADD , _T ( " <20> <> <EFBFBD> ӵ<EFBFBD> ¼<EFBFBD> ʺ<EFBFBD> " ) ) ;
}
//menu.AppendMenu(MF_STRING , MENU_GADDRESS_ADDADDR, _T(" <20> <> <EFBFBD> <EFBFBD> ͨѶ¼ ") );
menu . AppendMenu ( MF_STRING , MENU_GADDRESS_ADDGROUP , _T ( " <20> <> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> " ) ) ;
}
else
{
menu . AppendMenu ( MF_STRING | MF_DISABLED | MF_GRAYED , MENU_GADDRESS_ADD , _T ( " <20> <> <EFBFBD> ӵ<EFBFBD> ¼<EFBFBD> ʺ<EFBFBD> " ) ) ;
//menu.AppendMenu(MF_STRING|MF_DISABLED|MF_GRAYED , MENU_GADDRESS_ADDADDR, _T(" <20> <> <EFBFBD> <EFBFBD> ͨѶ¼ ") );
menu . AppendMenu ( MF_STRING | MF_DISABLED | MF_GRAYED , MENU_GADDRESS_ADDGROUP , _T ( " <20> <> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> " ) ) ;
}
*/
menu . AppendMenu ( MF_SEPARATOR ) ;
//<2F> <EFBFBD>
if ( m_pMainFrame - > GetUserPurview ( PURVIEW_USER_MANAGER , false ) & & lItem > = 0 & & ! bLock )
{
menu . AppendMenu ( MF_STRING , MENU_GADDRESS_MODIFY , _T ( " <20> <> <20> <> " ) ) ;
}
else
{
menu . AppendMenu ( MF_STRING | MF_DISABLED | MF_GRAYED , MENU_GADDRESS_MODIFY , _T ( " <20> <> <20> <> " ) ) ;
}
//ɾ<> <C9BE>
if ( m_pMainFrame - > GetUserPurview ( PURVIEW_USER_MANAGER , false ) & & lItem > = 0 & & ! bLock )
{
menu . AppendMenu ( MF_STRING , MENU_GADDRESS_DEL , _T ( " ɾ <20> <> " ) ) ;
}
else
{
menu . AppendMenu ( MF_STRING | MF_DISABLED | MF_GRAYED , MENU_GADDRESS_DEL , _T ( " ɾ <20> <> " ) ) ;
}
menu . AppendMenu ( MF_SEPARATOR ) ;
//<2F> <> <EFBFBD> Ͷ<EFBFBD> <CDB6> <EFBFBD>
if ( m_pMainFrame - > GetUserPurview ( PURVIEW_SENDG , false ) & & lItem > = 0 & & ! bLock )
{
menu . AppendMenu ( MF_STRING , MENU_GADDRESS_ADDTOLIST , _T ( " <20> <> <EFBFBD> Ͷ<EFBFBD> <CDB6> <EFBFBD> " ) ) ;
# ifdef SUPPER_FUNC_FAX
menu . AppendMenu ( MF_STRING , MENU_GADDRESS_ADDTOLIST_FAX , _T ( " <20> <> <EFBFBD> ʹ <EFBFBD> <CDB4> <EFBFBD> " ) ) ;
# endif
# ifdef SUPPER_FUNC_MMS
menu . AppendMenu ( MF_STRING , MENU_GADDRESS_ADDTOLIST_MMS , _T ( " <20> <> <EFBFBD> Ͳ<EFBFBD> <CDB2> <EFBFBD> " ) ) ;
# endif
}
else
{
menu . AppendMenu ( MF_STRING | MF_DISABLED | MF_GRAYED , MENU_GADDRESS_ADDTOLIST , _T ( " <20> <> <EFBFBD> Ͷ<EFBFBD> <CDB6> <EFBFBD> " ) ) ;
# ifdef SUPPER_FUNC_FAX
menu . AppendMenu ( MF_STRING | MF_DISABLED | MF_GRAYED , MENU_GADDRESS_ADDTOLIST_FAX , _T ( " <20> <> <EFBFBD> ʹ <EFBFBD> <CDB4> <EFBFBD> " ) ) ;
# endif
# ifdef SUPPER_FUNC_MMS
menu . AppendMenu ( MF_STRING | MF_DISABLED | MF_GRAYED , MENU_GADDRESS_ADDTOLIST_MMS , _T ( " <20> <> <EFBFBD> Ͳ<EFBFBD> <CDB2> <EFBFBD> " ) ) ;
# endif
}
menu . AppendMenu ( MF_SEPARATOR ) ;
//if ( !m_bFind2 )
menu . AppendMenu ( MF_STRING , MENU_GADDRESS_FIND , _T ( " <20> <> <EFBFBD> <EFBFBD> ... " ) ) ;
//else
// menu.AppendMenu(MF_STRING|MF_DISABLED|MF_GRAYED , MENU_GADDRESS_FIND, _T(" <20> <> <EFBFBD> <EFBFBD> ... ") );
if ( lItem > = 0 )
menu . AppendMenu ( MF_STRING , MENU_GADDRESS_LOG , _T ( " <20> շ<EFBFBD> <D5B7> <EFBFBD> ־... " ) ) ;
else
menu . AppendMenu ( MF_STRING | MF_DISABLED | MF_GRAYED , MENU_GADDRESS_LOG , _T ( " <20> շ<EFBFBD> <D5B7> <EFBFBD> ־... " ) ) ;
menu . AppendMenu ( MF_SEPARATOR ) ;
if ( lItem > = 0 & & ! m_bFind2 )
{
menu . AppendMenu ( MF_STRING , MENU_GADDRESS_CUT , _T ( " <20> <> <20> <> " ) ) ;
}
else
{
menu . AppendMenu ( MF_STRING | MF_DISABLED | MF_GRAYED , MENU_GADDRESS_CUT , _T ( " <20> <> <20> <> " ) ) ;
}
//if (!m_bFind2 && m_lUserID!=m_Copy_UserID&&m_Copy_Count>0)
if ( ! m_bFind2 & & m_Copy_Count > 0 & & ! ( m_lUserID = = m_Copy_UserID & & m_Copy_Type = = GADDRESS_COPYTYPE_CUT ) )
menu . AppendMenu ( MF_STRING , MENU_GADDRESS_PASTE , _T ( " ճ <20> <> " ) ) ;
else
menu . AppendMenu ( MF_STRING | MF_DISABLED | MF_GRAYED , MENU_GADDRESS_PASTE , _T ( " ճ <20> <> " ) ) ;
menu . AppendMenu ( MF_SEPARATOR ) ;
/*
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD>
if ( m_pMainFrame - > GetUserPurview ( PURVIEW_GADDRESS_ADD , false ) & & ! m_bFind2 )
{
menu . AppendMenu ( MF_STRING , MENU_GADDRESS_INPORT , _T ( " <20> <> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> " ) ) ;
}
else
{
menu . AppendMenu ( MF_STRING | MF_DISABLED | MF_GRAYED , MENU_GADDRESS_INPORT , _T ( " <20> <> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> " ) ) ;
}
*/
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD>
if ( m_pMainFrame - > GetUserPurview ( PURVIEW_GADDRESS_MODIFY , false ) )
{
menu . AppendMenu ( MF_STRING , MENU_GADDRESS_EXPORT , _T ( " <20> <> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> " ) ) ;
}
else
{
menu . AppendMenu ( MF_STRING | MF_DISABLED | MF_GRAYED , MENU_GADDRESS_EXPORT , _T ( " <20> <> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> " ) ) ;
}
menu . AppendMenu ( MF_SEPARATOR ) ;
//ˢ<> <CBA2>
menu . AppendMenu ( MF_STRING , MENU_GADDRESS_REFRESH , _T ( " ˢ <20> <> " ) ) ;
//<2F> <> ʾ <EFBFBD> ˵<EFBFBD>
POINT pt ;
: : GetCursorPos ( & pt ) ;
//this->ClientToScreen( &pt);
menu . TrackPopupMenu ( TPM_LEFTBUTTON | TPM_RIGHTBUTTON , pt . x , pt . y , this , NULL ) ;
menu . DestroyMenu ( ) ;
}
ANS_GAddress_SeeData CFGAddress : : GetUserData ( long lUserID )
{
ANS_GAddress_SeeData Address = { 0 } ;
TCHAR szSelect [ 128 ] = { 0 } ;
_stprintf ( szSelect , _T ( " Select * from users where UserID=%d AND UserType='1' " ) , lUserID ) ;
BOOL b = m_AdoRS . Open ( szSelect ) ;
if ( b & & m_AdoRS . GetRecordCount ( ) )
{
COleDateTime t ;
m_AdoRS . MoveFirst ( ) ;
m_AdoRS . GetCollect ( _T ( " UserID " ) , Address . lUserID ) ;
m_AdoRS . GetCollect ( _T ( " CorpID " ) , Address . lCorpID ) ;
m_AdoRS . GetCollect ( _T ( " UserType " ) , Address . szUserType ) ;
m_AdoRS . GetCollect ( _T ( " GroupID " ) , Address . szGroupID ) ;
m_AdoRS . GetCollect ( _T ( " Name " ) , Address . szName ) ;
m_AdoRS . GetCollect ( _T ( " NickName " ) , Address . szNickName ) ;
m_AdoRS . GetCollect ( _T ( " Sex " ) , Address . szSex ) ;
m_AdoRS . GetCollect ( _T ( " Birthday " ) , t ) ; t . GetAsSystemTime ( Address . tBirthday ) ;
m_AdoRS . GetCollect ( _T ( " Job " ) , Address . szJob ) ;
m_AdoRS . GetCollect ( _T ( " Tel " ) , Address . szTel ) ;
m_AdoRS . GetCollect ( _T ( " Fax " ) , Address . szFax ) ;
m_AdoRS . GetCollect ( _T ( " Email " ) , Address . szEmail ) ;
m_AdoRS . GetCollect ( _T ( " Mobile " ) , Address . szMobile ) ;
m_AdoRS . GetCollect ( _T ( " QQ " ) , Address . szQQ ) ;
m_AdoRS . GetCollect ( _T ( " LoginName " ) , Address . szLoginName ) ;
m_AdoRS . GetCollect ( _T ( " Passwd " ) , Address . szPasswd ) ;
m_AdoRS . GetCollect ( _T ( " PurviewType " ) , Address . ulPurviewType ) ;
m_AdoRS . GetCollect ( _T ( " Purview " ) , Address . ulPurview ) ;
m_AdoRS . GetCollect ( _T ( " LoginCount " ) , Address . lLoginCount ) ;
m_AdoRS . GetCollect ( _T ( " LoginTime " ) , t ) ; t . GetAsSystemTime ( Address . tLoginTime ) ;
m_AdoRS . GetCollect ( _T ( " SMSNum " ) , Address . szSMSNum ) ;
m_AdoRS . GetCollect ( _T ( " SMSUsed " ) , Address . lSMSUsed ) ;
m_AdoRS . GetCollect ( _T ( " SMSSendAll " ) , Address . lSMSSendAll ) ;
m_AdoRS . GetCollect ( _T ( " MmsUsed " ) , Address . lMmsUsed ) ;
m_AdoRS . GetCollect ( _T ( " MmsSendAll " ) , Address . lMmsSendAll ) ;
//m_AdoRS.GetCollect( _T("OvrTime"), t); t.GetAsSystemTime(Address.tOvrTime);
m_AdoRS . GetCollect ( _T ( " CreateUser " ) , Address . szCreateUser ) ;
m_AdoRS . GetCollect ( _T ( " CreateTime " ) , t ) ; t . GetAsSystemTime ( Address . tCreateTime ) ;
m_AdoRS . GetCollect ( _T ( " BZ " ) , Address . szBZ ) ;
m_AdoRS . GetCollect ( _T ( " AccessGroup " ) , Address . lAccessGroupID ) ;
}
return Address ;
}
void CFGAddress : : OnDblclkGaddressList ( NMHDR * pNMHDR , LRESULT * pResult )
{
On_User_Modify ( ) ;
* pResult = 0 ;
}
BOOL CFGAddress : : ProcessSocket ( Socket_Head * pHead )
{
CString str ;
//<2F> Ĺ<DEB8> <C4B9> õ<EFBFBD> ַ<EFBFBD> <D6B7>
if ( pHead - > lFuncType = = SMSFUNC_GADDRESS_MODIFY )
{
ANS_GAddress_Modify * pModify = ( ANS_GAddress_Modify * ) pHead - > pFrame ;
ANS_GAddress_SeeData * pData = ( ANS_GAddress_SeeData * ) ( pHead - > pFrame + sizeof ( ANS_GAddress_Modify ) ) ;
SetLockItem ( pModify - > lItem , false ) ; //<2F> <> <EFBFBD> <EFBFBD>
if ( pModify - > lCount = = 1 ) //<2F> <> <EFBFBD> <EFBFBD> 1ʱ<31> <CAB1> ʾ <EFBFBD> ijɹ<C4B3>
{
long lUserID = m_wndList . GetItemData ( pModify - > lItem ) ;
if ( lUserID = = pData - > lUserID )
{
//m_wndList.SetHeadings(_T("<22> <> <EFBFBD> <EFBFBD> ,50;<3B> <> ¼<EFBFBD> <C2BC> ,80;<3B> ط<EFBFBD> <D8B7> <EFBFBD> ,80;<3B> <> <EFBFBD> ö<EFBFBD> <C3B6> <EFBFBD> ,80;<3B> ѷ<EFBFBD> <D1B7> <EFBFBD> <EFBFBD> <EFBFBD> ,80;<3B> ʺ<EFBFBD> <CABA> <EFBFBD> <EFBFBD> <EFBFBD> ,90;<3B> <> ¼<EFBFBD> <C2BC> <EFBFBD> <EFBFBD> ,80; <20> <> <EFBFBD> <EFBFBD> ,80; <20> dz<EFBFBD> ,80;<3B> ֻ<EFBFBD> ,100;<3B> 绰,80; <20> <> <EFBFBD> <EFBFBD> ,90;ְ<> <D6B0> ,80;Email,80;"));
long lIcon = 2 ;
if ( _tcscmp ( pData - > szSex , _T ( " <EFBFBD> <EFBFBD> " ) ) = = 0 )
lIcon = 0 ;
if ( _tcscmp ( pData - > szSex , _T ( " Ů " ) ) = = 0 )
lIcon = 1 ;
m_wndList . SetIconIndex ( pModify - > lItem , lIcon ) ;
long lTemp = 1 ;
m_wndList . SetItemText ( pModify - > lItem , lTemp + + , pData - > szLoginName ) ;
m_wndList . SetItemText ( pModify - > lItem , lTemp + + , pData - > szSMSNum ) ;
if ( pData - > lSMSUsed = = - 100 )
str = _T ( " <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) ;
else
str . Format ( _T ( " %8d " ) , pData - > lSMSUsed ) ;
m_wndList . SetItemText ( pModify - > lItem , lTemp + + , str ) ;
# ifdef SUPPER_FUNC_MMS
if ( pData - > lMmsUsed = = - 100 )
str = _T ( " <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) ;
else
str . Format ( _T ( " %8d " ) , pData - > lMmsUsed ) ;
m_wndList . SetItemText ( pModify - > lItem , lTemp + + , str ) ;
# endif
switch ( pData - > ulPurviewType )
{
case PURVIEWTYPE_ADMIN :
str = _T ( " ϵͳ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ա " ) ;
break ;
case PURVIEWTYPE_KF :
str = _T ( " <EFBFBD> ͻ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ա" ) ;
break ;
case PURVIEWTYPE_USERS :
str = _T ( " һ <EFBFBD> <EFBFBD> Ա<EFBFBD> <EFBFBD> " ) ;
break ;
case PURVIEWTYPE_INPUT :
str = _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ¼<EFBFBD> <EFBFBD> Ա" ) ;
break ;
case PURVIEWTYPE_ADDRESS :
default :
str = _T ( " <EFBFBD> <EFBFBD> ͨѶ¼" ) ;
break ;
}
m_wndList . SetItemText ( pModify - > lItem , lTemp + + , str ) ;
str . Format ( _T ( " %8d " ) , pData - > lLoginCount ) ;
m_wndList . SetItemText ( pModify - > lItem , lTemp + + , str ) ;
m_wndList . SetItemText ( pModify - > lItem , lTemp + + , pData - > szName ) ;
m_wndList . SetItemText ( pModify - > lItem , lTemp + + , pData - > szNickName ) ;
m_wndList . SetItemText ( pModify - > lItem , lTemp + + , pData - > szMobile ) ;
m_wndList . SetItemText ( pModify - > lItem , lTemp + + , pData - > szTel ) ;
COleDateTime t ( pData - > tBirthday ) ;
if ( t . GetStatus ( ) = = COleDateTime : : valid )
{
str . Format ( _T ( " %04d.%02d.%02d " ) , t . GetYear ( ) , t . GetMonth ( ) , t . GetDay ( ) ) ;
m_wndList . SetItemText ( pModify - > lItem , lTemp + + , str ) ;
}
else
{
m_wndList . SetItemText ( pModify - > lItem , lTemp + + , _T ( " " ) ) ;
}
m_wndList . SetItemText ( pModify - > lItem , lTemp + + , pData - > szJob ) ;
m_wndList . SetItemText ( pModify - > lItem , lTemp + + , pData - > szEmail ) ;
# ifdef SHOWBZ_VER
m_wndList . SetItemText ( pModify - > lItem , lTemp + + , pData - > szBZ ) ;
# endif
}
//<2F> <> <EFBFBD> µ<EFBFBD> <C2B5> <EFBFBD> <EFBFBD> <EFBFBD> д<EFBFBD> 뱾<EFBFBD> <EBB1BE> <EFBFBD> <EFBFBD> <EFBFBD> ݿ<EFBFBD>
TCHAR szSelect [ 128 ] = { 0 } ;
_stprintf ( szSelect , _T ( " select * from users where UserID=%d " ) , pData - > lUserID ) ;
BOOL b = m_AdoRS . Open ( szSelect ) ;
if ( b & & m_AdoRS . GetRecordCount ( ) )
{
m_AdoRS . MoveFirst ( ) ;
m_AdoRS . PutCollect ( _T ( " GroupID " ) , pData - > szGroupID ) ;
m_AdoRS . PutCollect ( _T ( " Name " ) , pData - > szName ) ;
m_AdoRS . PutCollect ( _T ( " NickName " ) , pData - > szNickName ) ;
m_AdoRS . PutCollect ( _T ( " Sex " ) , pData - > szSex ) ;
m_AdoRS . PutCollect ( _T ( " Birthday " ) , pData - > tBirthday ) ;
m_AdoRS . PutCollect ( _T ( " Job " ) , pData - > szJob ) ;
m_AdoRS . PutCollect ( _T ( " Tel " ) , pData - > szTel ) ;
m_AdoRS . PutCollect ( _T ( " Fax " ) , pData - > szFax ) ;
m_AdoRS . PutCollect ( _T ( " Mobile " ) , pData - > szMobile ) ;
m_AdoRS . PutCollect ( _T ( " Email " ) , pData - > szEmail ) ;
m_AdoRS . PutCollect ( _T ( " QQ " ) , pData - > szQQ ) ;
m_AdoRS . PutCollect ( _T ( " LoginName " ) , pData - > szLoginName ) ;
m_AdoRS . PutCollect ( _T ( " Passwd " ) , pData - > szPasswd ) ;
m_AdoRS . PutCollect ( _T ( " PurviewType " ) , pData - > ulPurviewType ) ;
m_AdoRS . PutCollect ( _T ( " Purview " ) , pData - > ulPurview ) ;
m_AdoRS . PutCollect ( _T ( " SMSNum " ) , pData - > szSMSNum ) ;
m_AdoRS . PutCollect ( _T ( " SMSUsed " ) , pData - > lSMSUsed ) ;
m_AdoRS . PutCollect ( _T ( " MmsUsed " ) , pData - > lMmsUsed ) ;
m_AdoRS . PutCollect ( _T ( " MmsSendAll " ) , pData - > lMmsSendAll ) ;
//m_AdoRS.PutCollect(_T("OvrTime") ,pData->tOvrTime);
m_AdoRS . PutCollect ( _T ( " BZ " ) , pData - > szBZ ) ;
m_AdoRS . PutCollect ( _T ( " AccessGroup " ) , pData - > lAccessGroupID ) ;
m_AdoRS . Update ( ) ;
m_AdoRS . Close ( ) ;
}
}
return true ;
}
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD>
if ( pHead - > lFuncType = = SMSFUNC_GADDRESS_ADD )
{
ANS_GAddress_Add * pAdd = ( ANS_GAddress_Add * ) pHead - > pFrame ;
ANS_GAddress_SeeData * pData = ( ANS_GAddress_SeeData * ) ( pHead - > pFrame + sizeof ( ANS_GAddress_Add ) ) ;
if ( pAdd - > lCount = = 1 & & pData - > lUserID > 0 ) //<2F> <> <EFBFBD> <EFBFBD> 1ʱ<31> <CAB1> ʾ <EFBFBD> ijɹ<C4B3>
{
long lCount = m_wndList . GetItemCount ( ) ;
TCHAR Buf [ 32 ] ;
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> µ<EFBFBD> <C2B5> <EFBFBD> <EFBFBD> <EFBFBD>
m_wndList . InsertItem ( lCount , _itot ( lCount + 1 , Buf , 10 ) ) ; //<2F> <> <EFBFBD> <EFBFBD>
long lIcon = 2 ;
if ( _tcscmp ( pData - > szSex , _T ( " <EFBFBD> <EFBFBD> " ) ) = = 0 )
lIcon = 0 ;
if ( _tcscmp ( pData - > szSex , _T ( " Ů " ) ) = = 0 )
lIcon = 1 ;
m_wndList . SetIconIndex ( lCount , lIcon ) ;
m_wndList . SetItemData ( lCount , pData - > lUserID ) ;
long lTemp = 1 ;
m_wndList . SetItemText ( lCount , lTemp + + , pData - > szLoginName ) ;
m_wndList . SetItemText ( lCount , lTemp + + , pData - > szSMSNum ) ;
if ( pData - > lSMSUsed = = - 100 )
str = _T ( " <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) ;
else
str . Format ( _T ( " %8d " ) , pData - > lSMSUsed ) ;
m_wndList . SetItemText ( lCount , lTemp + + , str ) ;
# ifdef SUPPER_FUNC_MMS
if ( pData - > lMmsUsed = = - 100 )
str = _T ( " <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) ;
else
str . Format ( _T ( " %8d " ) , pData - > lMmsUsed ) ;
m_wndList . SetItemText ( lCount , lTemp + + , str ) ;
# endif
switch ( pData - > ulPurviewType )
{
case PURVIEWTYPE_ADMIN :
str = _T ( " ϵͳ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ա " ) ;
break ;
case PURVIEWTYPE_KF :
str = _T ( " <EFBFBD> ͻ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ա" ) ;
break ;
case PURVIEWTYPE_USERS :
str = _T ( " һ <EFBFBD> <EFBFBD> Ա<EFBFBD> <EFBFBD> " ) ;
break ;
case PURVIEWTYPE_INPUT :
str = _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ¼<EFBFBD> <EFBFBD> Ա" ) ;
break ;
case PURVIEWTYPE_ADDRESS :
default :
str = _T ( " <EFBFBD> <EFBFBD> ͨѶ¼" ) ;
break ;
}
m_wndList . SetItemText ( lCount , lTemp + + , str ) ;
str . Format ( _T ( " %8d " ) , pData - > lLoginCount ) ;
m_wndList . SetItemText ( lCount , lTemp + + , str ) ;
m_wndList . SetItemText ( lCount , lTemp + + , pData - > szName ) ;
m_wndList . SetItemText ( lCount , lTemp + + , pData - > szNickName ) ;
m_wndList . SetItemText ( lCount , lTemp + + , pData - > szMobile ) ;
m_wndList . SetItemText ( lCount , lTemp + + , pData - > szTel ) ;
COleDateTime t ( pData - > tBirthday ) ;
if ( t . GetStatus ( ) = = COleDateTime : : valid )
{
str . Format ( _T ( " %04d.%02d.%02d " ) , t . GetYear ( ) , t . GetMonth ( ) , t . GetDay ( ) ) ;
m_wndList . SetItemText ( lCount , lTemp + + , str ) ;
}
else
{
m_wndList . SetItemText ( lCount , lTemp + + , _T ( " " ) ) ;
}
m_wndList . SetItemText ( lCount , lTemp + + , pData - > szJob ) ;
m_wndList . SetItemText ( lCount , lTemp + + , pData - > szEmail ) ;
# ifdef SHOWBZ_VER
m_wndList . SetItemText ( lCount , lTemp + + , pData - > szBZ ) ;
# endif
//<2F> <> <EFBFBD> ӵ<EFBFBD> <D3B5> <EFBFBD> <EFBFBD> ݿ<EFBFBD> <DDBF> <EFBFBD>
BOOL b = m_AdoRS . Open ( _T ( " users " ) , adCmdTable ) ;
if ( b )
{
m_AdoRS . AddNew ( ) ;
m_AdoRS . PutCollect ( _T ( " UserID " ) , pData - > lUserID ) ;
m_AdoRS . PutCollect ( _T ( " CorpID " ) , pData - > lCorpID ) ;
m_AdoRS . PutCollect ( _T ( " UserType " ) , pData - > szUserType ) ;
m_AdoRS . PutCollect ( _T ( " GroupID " ) , pData - > szGroupID ) ;
m_AdoRS . PutCollect ( _T ( " Name " ) , pData - > szName ) ;
m_AdoRS . PutCollect ( _T ( " NickName " ) , pData - > szNickName ) ;
m_AdoRS . PutCollect ( _T ( " Sex " ) , pData - > szSex ) ;
m_AdoRS . PutCollect ( _T ( " Birthday " ) , pData - > tBirthday ) ;
m_AdoRS . PutCollect ( _T ( " Job " ) , pData - > szJob ) ;
m_AdoRS . PutCollect ( _T ( " Tel " ) , pData - > szTel ) ;
m_AdoRS . PutCollect ( _T ( " Fax " ) , pData - > szFax ) ;
m_AdoRS . PutCollect ( _T ( " Mobile " ) , pData - > szMobile ) ;
m_AdoRS . PutCollect ( _T ( " Email " ) , pData - > szEmail ) ;
m_AdoRS . PutCollect ( _T ( " QQ " ) , pData - > szQQ ) ;
m_AdoRS . PutCollect ( _T ( " LoginName " ) , pData - > szLoginName ) ;
m_AdoRS . PutCollect ( _T ( " Passwd " ) , pData - > szPasswd ) ;
m_AdoRS . PutCollect ( _T ( " PurviewType " ) , pData - > ulPurviewType ) ;
m_AdoRS . PutCollect ( _T ( " Purview " ) , pData - > ulPurview ) ;
m_AdoRS . PutCollect ( _T ( " SMSNum " ) , pData - > szSMSNum ) ;
m_AdoRS . PutCollect ( _T ( " SMSUsed " ) , pData - > lSMSUsed ) ;
m_AdoRS . PutCollect ( _T ( " SMSSendAll " ) , pData - > lSMSSendAll ) ;
m_AdoRS . PutCollect ( _T ( " MmsUsed " ) , pData - > lMmsUsed ) ;
m_AdoRS . PutCollect ( _T ( " MmsSendAll " ) , pData - > lMmsSendAll ) ;
//m_AdoRS.PutCollect(_T("OvrTime") ,pData->tOvrTime);
m_AdoRS . PutCollect ( _T ( " LoginCount " ) , pData - > lLoginCount ) ;
m_AdoRS . PutCollect ( _T ( " LoginTime " ) , pData - > tLoginTime ) ;
m_AdoRS . PutCollect ( _T ( " CreateUser " ) , pData - > szCreateUser ) ;
m_AdoRS . PutCollect ( _T ( " CreateTime " ) , pData - > tCreateTime ) ;
m_AdoRS . PutCollect ( _T ( " BZ " ) , pData - > szBZ ) ;
m_AdoRS . PutCollect ( _T ( " AccessGroup " ) , pData - > lAccessGroupID ) ;
m_AdoRS . Update ( ) ;
}
m_AdoRS . Close ( ) ;
}
if ( m_bInUser ) //<2F> ǵ<EFBFBD> <C7B5> <EFBFBD> <EFBFBD> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD> Ҫ<EFBFBD> <D2AA> ʾ <EFBFBD> <CABE> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ,<2C> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> һ <EFBFBD> <D2BB>
{
m_lInUserIndex + + ;
m_DLGGetUser . SetProcess ( m_lInUserCount , m_lInUserIndex ) ;
Inport_Next ( ) ;
}
return true ;
}
//ɾ<> <C9BE> <EFBFBD> û<EFBFBD>
if ( pHead - > lFuncType = = SMSFUNC_GADDRESS_DEL )
{
ANS_GAddress_Del * pDel = ( ANS_GAddress_Del * ) pHead - > pFrame ;
ANS_GAddress_DelData * pDelData = ( ANS_GAddress_DelData * ) ( pHead - > pFrame + sizeof ( ANS_GAddress_Del ) ) ;
m_wndList . ShowWindow ( SW_HIDE ) ; //Ϊ<> ˼ӿ<CBBC> <D3BF> <EFBFBD> ʾ <EFBFBD> ٶ<EFBFBD>
for ( int i = pDel - > lCount - 1 ; i > = 0 ; i - - )
{
if ( pDelData [ i ] . lItem > = 0 )
{
long lUserID = m_wndList . GetItemData ( pDelData [ i ] . lItem ) ;
if ( pDelData [ i ] . lUserID & & lUserID = = pDelData [ i ] . lUserID ) //ɾ<> <C9BE> <EFBFBD> ɹ<EFBFBD>
{
m_wndList . DeleteItem ( pDelData [ i ] . lItem ) ; //<2F> <> ListCtrl<72> <6C> ɾ<EFBFBD> <C9BE>
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> ݿ<EFBFBD> <DDBF> <EFBFBD> ɾ<EFBFBD> <C9BE>
TCHAR szSelect [ 128 ] = { 0 } ;
_stprintf ( szSelect , _T ( " delete from users where UserID=%d " ) , pDelData [ i ] . lUserID ) ;
m_AdoRS . Open ( szSelect ) ;
m_AdoRS . Close ( ) ;
}
else
{
this - > SetLockItem ( pDelData [ i ] . lItem , false ) ; //<2F> <> <EFBFBD> <EFBFBD>
}
}
}
m_wndList . ShowWindow ( SW_SHOW ) ; //Ϊ<> ˼ӿ<CBBC> <D3BF> <EFBFBD> ʾ <EFBFBD> ٶ<EFBFBD>
return true ;
}
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> <C3BB> <EFBFBD>
if ( pHead - > lFuncType = = SMSFUNC_GADDRESS_GROUP_ADD )
{
ANS_GAddress_Group_Add * pAdd = ( ANS_GAddress_Group_Add * ) pHead - > pFrame ;
ANS_GAddress_Group_AddData * pData = ( ANS_GAddress_Group_AddData * ) ( pHead - > pFrame + sizeof ( ANS_GAddress_Group_Add ) ) ;
if ( pAdd - > lCount = = 1 & & pData - > lUserID > 0 ) //<2F> <> <EFBFBD> <EFBFBD> 1ʱ<31> <CAB1> ʾ <EFBFBD> <CABE> <EFBFBD> ӳɹ<D3B3>
{
//<2F> <> <EFBFBD> ӵ<EFBFBD> <D3B5> <EFBFBD>
m_pFuncView - > AddGGroup ( pData - > szGroupName , m_lUserID , pData - > lUserID ) ;
//<2F> <> <EFBFBD> ӵ<EFBFBD> <D3B5> <EFBFBD> <EFBFBD> ݿ<EFBFBD> <DDBF> <EFBFBD>
BOOL b = m_AdoRS . Open ( _T ( " users " ) , adCmdTable ) ;
if ( b )
{
m_AdoRS . AddNew ( ) ;
m_AdoRS . PutCollect ( _T ( " UserID " ) , pData - > lUserID ) ;
m_AdoRS . PutCollect ( _T ( " CorpID " ) , m_pMainFrame - > m_lCorpID ) ;
m_AdoRS . PutCollect ( _T ( " UserType " ) , _T ( " 0 " ) ) ; //<2F> û<EFBFBD> <C3BB> <EFBFBD>
m_AdoRS . PutCollect ( _T ( " GroupID " ) , pData - > szGroupID ) ;
m_AdoRS . PutCollect ( _T ( " Name " ) , pData - > szGroupName ) ;
m_AdoRS . PutCollect ( _T ( " CreateUser " ) , pData - > szCreateUser ) ;
m_AdoRS . PutCollect ( _T ( " CreateTime " ) , pData - > tCreateTime ) ;
m_AdoRS . PutCollect ( _T ( " BZ " ) , pData - > szBZ ) ;
m_AdoRS . Update ( ) ;
}
}
return true ;
}
/*
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> <C3BB> <EFBFBD>
if ( pHead - > lFuncType = = SMSFUNC_GADDRESS2_USER_MOVE )
{
ANS_GAddress2_User_Move * pMove = ( ANS_GAddress2_User_Move * ) pHead - > pFrame ;
REQ_GAddress2_User_Move_Data * pMoveData = ( REQ_GAddress2_User_Move_Data * ) ( pHead - > pFrame + sizeof ( ANS_GAddress2_User_Move ) ) ;
if ( pMove - > lCount > 0 & & pMove - > lCount = = m_Copy_Count ) //<2F> <> <EFBFBD> <EFBFBD> 1ʱ<31> <CAB1> ʾ <EFBFBD> <CABE> <EFBFBD> ӳɹ<D3B3>
{
if ( pMove - > lMoveType = = 0 ) //<2F> <> <EFBFBD> <EFBFBD> ,ֱ<> Ӹ<EFBFBD> <D3B8> <EFBFBD> <EFBFBD> <EFBFBD> ID<49> <44> <EFBFBD> <EFBFBD>
{
for ( int i = 0 ; i < pMove - > lCount ; i + + )
{
str . Format ( _T ( " Update gaddress set GroupID='%s' where UserID=%d " ) , pMove - > szTagGroup , pMoveData [ i ] . lUserID ) ;
m_AdoRS . Open ( str ) ;
m_AdoRS . Close ( ) ;
}
}
if ( pMove - > lMoveType = = 1 ) //<2F> <> <EFBFBD> ƣ<EFBFBD>
{
//<2F> <> <EFBFBD> ӵ<EFBFBD> <D3B5> <EFBFBD> <EFBFBD> ݿ<EFBFBD> <DDBF> <EFBFBD>
BOOL b = m_AdoRS . Open ( _T ( " gaddress " ) , adCmdTable ) ;
if ( b )
{
for ( int i = 0 ; i < pMove - > lCount ; i + + )
{
m_AdoRS . AddNew ( ) ;
m_AdoRS . PutCollect ( _T ( " UserID " ) , m_Copy_Data [ i ] . lUserID ) ;
m_AdoRS . PutCollect ( _T ( " UserType " ) , m_Copy_Data [ i ] . szUserType ) ;
m_AdoRS . PutCollect ( _T ( " GroupID " ) , pMove - > szTagGroup ) ;
m_AdoRS . PutCollect ( _T ( " Name " ) , m_Copy_Data [ i ] . szName ) ;
m_AdoRS . PutCollect ( _T ( " NickName " ) , m_Copy_Data [ i ] . szNickName ) ;
m_AdoRS . PutCollect ( _T ( " Sex " ) , m_Copy_Data [ i ] . szSex ) ;
m_AdoRS . PutCollect ( _T ( " Birthday " ) , m_Copy_Data [ i ] . tBirthday ) ;
m_AdoRS . PutCollect ( _T ( " LTD " ) , m_Copy_Data [ i ] . szLTD ) ;
m_AdoRS . PutCollect ( _T ( " Job " ) , m_Copy_Data [ i ] . szJob ) ;
m_AdoRS . PutCollect ( _T ( " Addr " ) , m_Copy_Data [ i ] . szAddr ) ;
m_AdoRS . PutCollect ( _T ( " Tel " ) , m_Copy_Data [ i ] . szTel ) ;
m_AdoRS . PutCollect ( _T ( " Fax " ) , m_Copy_Data [ i ] . szFax ) ;
m_AdoRS . PutCollect ( _T ( " Mobile " ) , m_Copy_Data [ i ] . szMobile ) ;
m_AdoRS . PutCollect ( _T ( " Email " ) , m_Copy_Data [ i ] . szEmail ) ;
m_AdoRS . PutCollect ( _T ( " QQ " ) , m_Copy_Data [ i ] . szQQ ) ;
m_AdoRS . PutCollect ( _T ( " CreateTime " ) , m_Copy_Data [ i ] . tCreateTime ) ;
m_AdoRS . PutCollect ( _T ( " BZ " ) , m_Copy_Data [ i ] . szBZ ) ;
m_AdoRS . Update ( ) ;
m_AdoRS . GetCollect ( _T ( " UserID " ) , m_Copy_Data [ i ] . lUserID ) ; //ȡ<> <C8A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ӵ<EFBFBD> UserID
}
}
m_AdoRS . Close ( ) ;
}
//<2F> <> ʾ <EFBFBD> <CABE> <EFBFBD> <EFBFBD>
if ( CString ( pMove - > szTagGroup ) = = CString ( this - > m_szGroupID ) )
{
for ( int i = 0 ; i < m_Copy_Count ; i + + )
{
TCHAR szBuf [ 32 ] = { 0 } ;
long lCount = m_wndList . GetItemCount ( ) ;
m_wndList . InsertItem ( lCount , _itot ( lCount + 1 , szBuf , 10 ) ) ; //<2F> <> <EFBFBD> <EFBFBD>
long lIcon = 2 ;
if ( _tcscmp ( m_Copy_Data [ i ] . szSex , _T ( " <EFBFBD> <EFBFBD> " ) ) = = 0 )
lIcon = 0 ;
if ( _tcscmp ( m_Copy_Data [ i ] . szSex , _T ( " Ů " ) ) = = 0 )
lIcon = 1 ;
m_wndList . SetIconIndex ( lCount , lIcon ) ;
m_wndList . SetItemData ( lCount , m_Copy_Data [ i ] . lUserID ) ;
m_wndList . SetItemText ( lCount , 1 , m_Copy_Data [ i ] . szName ) ;
m_wndList . SetItemText ( lCount , 2 , m_Copy_Data [ i ] . szNickName ) ;
m_wndList . SetItemText ( lCount , 3 , m_Copy_Data [ i ] . szMobile ) ;
m_wndList . SetItemText ( lCount , 4 , m_Copy_Data [ i ] . szTel ) ;
COleDateTime t ( m_Copy_Data [ i ] . tBirthday ) ;
if ( t . GetStatus ( ) = = COleDateTime : : valid )
{
str . Format ( _T ( " %04d.%02d.%02d " ) , t . GetYear ( ) , t . GetMonth ( ) , t . GetDay ( ) ) ;
m_wndList . SetItemText ( lCount , 5 , str ) ;
}
else
{
m_wndList . SetItemText ( lCount , 5 , _T ( " " ) ) ;
}
m_wndList . SetItemText ( lCount , 6 , m_Copy_Data [ i ] . szLTD ) ;
m_wndList . SetItemText ( lCount , 7 , m_Copy_Data [ i ] . szJob ) ;
m_wndList . SetItemText ( lCount , 8 , m_Copy_Data [ i ] . szEmail ) ;
# ifdef SHOWBZ_VER
m_wndList . SetItemText ( lCount , 9 , m_Copy_Data [ i ] . szBZ ) ;
# endif
}
}
if ( m_Copy_Type = = GADDRESS2_COPYTYPE_CUT )
{
//ÿ<> <C3BF> ֻ<EFBFBD> <D6BB> <EFBFBD> <EFBFBD> һ <EFBFBD> β<EFBFBD> <CEB2> <EFBFBD>
m_Copy_UserID = 0 ;
memset ( m_Copy_GroupID , 0 , sizeof ( m_Copy_GroupID ) ) ;
m_Copy_Count = 0 ;
m_Copy_Type = 0 ;
if ( m_Copy_Data )
{
delete m_Copy_Data ;
m_Copy_Data = NULL ;
}
}
}
return true ;
}
*/
return false ;
}
void CFGAddress : : OnRclickGaddressList ( NMHDR * pNMHDR , LRESULT * pResult )
{
ShowRMenu ( ) ;
* pResult = 0 ;
}
2025-04-11 17:19:25 +08:00
void CFGAddress : : OnTimer ( UINT_PTR nIDEvent )
2025-02-27 16:58:16 +08:00
{
CDialog : : OnTimer ( nIDEvent ) ;
if ( nIDEvent = = 1 )
{
KillTimer ( 1 ) ;
m_pFuncView = m_pMainFrame - > m_pFuncView ;
return ;
}
}
LRESULT CFGAddress : : On_List_DropBegin ( WPARAM wParam , LPARAM lParam )
{
//<2F> <> <EFBFBD> <EFBFBD> û<EFBFBD> з<EFBFBD> <D0B7> <EFBFBD> <CDB9> õ<EFBFBD> ַ<EFBFBD> <D6B7> <EFBFBD> <EFBFBD> Ȩ<EFBFBD> <C8A8>
if ( ! m_pMainFrame - > GetUserPurview ( PURVIEW_SENDG , false ) )
return false ;
long lCount = m_wndList . GetSelectedCount ( ) ;
if ( lCount < = 0 )
return false ;
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
long lSize = sizeof ( Send_User ) * lCount + sizeof ( long ) ;
HGLOBAL hData = GlobalAlloc ( GHND | GMEM_SHARE , lSize ) ;
BYTE * pS = ( BYTE * ) GlobalLock ( hData ) ;
memset ( pS , 0 , lSize ) ;
long * plCount = ( long * ) pS ;
Send_User * pUser = ( Send_User * ) ( pS + sizeof ( long ) ) ;
* plCount = lCount ; //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
TCHAR szSelect [ 128 ] = { 0 } ;
POSITION pos = m_wndList . GetFirstSelectedItemPosition ( ) ;
while ( pos )
{
long lItem = m_wndList . GetNextSelectedItem ( pos ) ;
long lUserID = m_wndList . GetItemData ( lItem ) ;
if ( lUserID > 0 )
{
_stprintf ( szSelect , _T ( " select * from users where UserID=%d " ) , lUserID ) ;
BOOL b = m_AdoRS . Open ( szSelect ) ;
if ( b & & m_AdoRS . GetRecordCount ( ) )
{
m_AdoRS . MoveFirst ( ) ;
m_AdoRS . GetCollect ( _T ( " Name " ) , pUser - > szName ) ;
m_AdoRS . GetCollect ( _T ( " NickName " ) , pUser - > szNickName ) ;
m_AdoRS . GetCollect ( _T ( " Mobile " ) , pUser - > szMobile ) ;
m_AdoRS . GetCollect ( _T ( " BZ " ) , pUser - > szBZ ) ;
}
}
pUser + + ;
}
GlobalUnlock ( hData ) ;
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
COleDataSource data ;
UINT iCF = : : RegisterClipboardFormat ( _T ( " CORPSMS_USER " ) ) ;
data . CacheGlobalData ( iCF , hData ) ;
CUserDropTarget : : m_shWndTreeCtrl = NULL ;
CUserDropTarget : : m_lAddressType = - 1 ;
// Begin Drag operation
DROPEFFECT dropeffect = data . DoDragDrop ( ) ;
GlobalFree ( hData ) ;
return true ;
}
void CFGAddress : : Inport_Next ( )
{
USES_CONVERSION ;
if ( m_lInUserIndex > = m_lInUserCount ) //<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
return ;
if ( isAddressFull ( ) ) //ͨѶ¼<D1B6> <C2BC> <EFBFBD> <EFBFBD>
{
m_DLGGetUser . SetProcess ( 1 , 1 ) ; //ֹͣ<CDA3> <D6B9> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʾ
return ;
}
long lSize = sizeof ( REQ_GAddress_Add ) + sizeof ( ANS_GAddress_SeeData ) ;
BYTE * pAddSent = new BYTE [ lSize ] ; memset ( pAddSent , 0 , lSize ) ;
REQ_GAddress_Add * pAdd = ( REQ_GAddress_Add * ) pAddSent ; //ͷ
ANS_GAddress_SeeData * pAddData = ( ANS_GAddress_SeeData * ) ( pAddSent + sizeof ( REQ_GAddress_Add ) ) ;
* pAddData = m_pInUser [ m_lInUserIndex ] ; //ȡ<> <C8A1> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
_tcscpy ( pAddData - > szGroupID , m_szGroupID ) ;
pAddData - > lCorpID = m_pMainFrame - > m_lCorpID ;
pAddData - > szUserType [ 0 ] = ' 1 ' ; //<2F> û<EFBFBD> <C3BB> <EFBFBD> <EFBFBD> <EFBFBD>
/*
//һ <> <D2BB> <EFBFBD> <EFBFBD> <EFBFBD> Ƶģ<C6B5> <C4A3> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD>
_tcscpy ( pAddData - > szLoginName , pAddData - > szNickName ) ;
memset ( pAddData - > szNickName , 0 , sizeof ( pAddData - > szNickName ) ) ;
//_tcscpy( pAddData->szBZ , pAddData->szEmail );
//memset( pAddData->szEmail , 0 , sizeof(pAddData->szEmail));
_stprintf ( pAddData - > szSMSNum , " %03d " , m_lInUserIndex + 1 ) ;
pAddData - > lSMSSendAll = 0 ;
pAddData - > lSMSUsed = 100 ;
pAddData - > ulPurviewType = PURVIEWTYPE_KF ;
pAddData - > ulPurview = PURVIEW_LOGIN | PURVIEW_SENDP | PURVIEW_RECVP | PURVIEW_PADDRESS ;
*/
//<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
CDes des ;
# ifdef UNICODE
char szPasswd [ 64 ] = { 0 } ;
char szPasswd2 [ 64 ] = { 0 } ;
char szUser [ 64 ] = { 0 } ;
strcpy ( szPasswd , " 888888 " ) ;
strcpy ( szUser , W2A ( pAddData - > szLoginName ) ) ;
long lLen = sizeof ( szPasswd2 ) ;
des . Encrypt ( szPasswd , strlen ( szPasswd ) , szPasswd2 , lLen , szUser , 8 ) ;
_tcscpy ( pAddData - > szPasswd , A2W ( szPasswd2 ) ) ;
# else
char szPasswd [ 32 ] = { 0 } ;
_tcscpy ( szPasswd , " 888888 " ) ;
long lOut = sizeof ( pAddData - > szPasswd ) ;
des . Encrypt ( szPasswd , _tcslen ( szPasswd ) , pAddData - > szPasswd , lOut , pAddData - > szLoginName , 8 ) ;
# endif
pAdd - > lCount = 1 ;
m_pMainFrame - > SendFrame ( SMSFUNC_GADDRESS_ADD , pAddSent , lSize ) ;
}
void CFGAddress : : GetLocal ( TCHAR * pLocal , TCHAR * pGroupID )
{
long lLen = _tcslen ( pGroupID ) ;
TCHAR szGroup [ 16 ] = { 0 } ;
TCHAR szTemp [ 16 ] = { 0 } ;
TCHAR szSelect [ 128 ] = { 0 } ;
_stprintf ( pLocal , _T ( " <EFBFBD> ʺŹ<EFBFBD> <EFBFBD> <EFBFBD> " ) ) ;
m_strGroupName = pLocal ;
for ( int i = 1 ; i < = lLen ; i + + )
{
_tcsncpy ( szGroup , pGroupID , i ) ;
_stprintf ( szSelect , _T ( " select Name from users where GroupID='%s' AND UserType='0' " ) , szGroup ) ;
BOOL b = m_AdoRS . Open ( szSelect ) ;
if ( b & & ! m_AdoRS . IsEOF ( ) )
{
m_AdoRS . GetCollect ( _T ( " Name " ) , szTemp ) ;
_tcscat ( pLocal , _T ( " \\ " ) ) ;
_tcscat ( pLocal , szTemp ) ;
m_strGroupName = szTemp ;
}
}
}
BOOL CFGAddress : : AddUser ( ANS_GAddress_SeeData user )
{
if ( isAddressFull ( ) ) //ͨѶ¼<D1B6> <C2BC> <EFBFBD> <EFBFBD>
return false ;
long lSize = sizeof ( REQ_GAddress_Add ) + sizeof ( ANS_GAddress_SeeData ) ;
BYTE * pAddSent = new BYTE [ lSize ] ; memset ( pAddSent , 0 , lSize ) ;
REQ_GAddress_Add * pAdd = ( REQ_GAddress_Add * ) pAddSent ; //ͷ
ANS_GAddress_SeeData * pAddData = ( ANS_GAddress_SeeData * ) ( pAddSent + sizeof ( REQ_GAddress_Add ) ) ;
* pAddData = user ;
pAdd - > lCount = 1 ;
m_pMainFrame - > SendFrame ( SMSFUNC_GADDRESS_ADD , pAddSent , lSize ) ;
return true ;
}
void CFGAddress : : OnKeydownGaddressList ( NMHDR * pNMHDR , LRESULT * pResult )
{
LV_KEYDOWN * pLVKeyDow = ( LV_KEYDOWN * ) pNMHDR ;
* pResult = 0 ;
if ( pLVKeyDow - > wVKey = = VK_DELETE )
{
On_User_Del ( ) ;
}
if ( pLVKeyDow - > wVKey = = VK_INSERT )
{
On_User_Add ( ) ;
}
if ( pLVKeyDow - > wVKey = = VK_SPACE )
{
On_User_Modify ( ) ;
}
if ( pLVKeyDow - > wVKey = = ' S ' | | pLVKeyDow - > wVKey = = ' s ' )
{
On_User_AddToList ( ) ;
}
if ( pLVKeyDow - > wVKey = = ' G ' | | pLVKeyDow - > wVKey = = ' g ' )
{
On_User_AddGroup ( ) ;
}
if ( pLVKeyDow - > wVKey = = ' F ' | | pLVKeyDow - > wVKey = = ' f ' )
{
On_User_Find ( ) ;
}
if ( pLVKeyDow - > wVKey = = ' R ' | | pLVKeyDow - > wVKey = = ' r ' )
{
On_User_Refresh ( ) ;
}
if ( pLVKeyDow - > wVKey = = ' L ' | | pLVKeyDow - > wVKey = = ' l ' )
{
On_User_Log ( ) ;
}
if ( pLVKeyDow - > wVKey = = ' A ' | | pLVKeyDow - > wVKey = = ' a ' )
{
m_wndList . SelectAllItems ( ) ;
}
//if ( pLVKeyDow->wVKey == 'C' || pLVKeyDow->wVKey == 'c')
//{
// On_User_Copy();
//}
if ( pLVKeyDow - > wVKey = = ' X ' | | pLVKeyDow - > wVKey = = ' x ' )
{
On_User_Cut ( ) ;
}
if ( pLVKeyDow - > wVKey = = ' V ' | | pLVKeyDow - > wVKey = = ' v ' )
{
On_User_Paste ( ) ;
}
}
void CFGAddress : : OnOK ( )
{
//CDialog::OnOK();
}
void CFGAddress : : OnCancel ( )
{
//CDialog::OnCancel();
}
void CFGAddress : : On_User_Find2 ( DLG_FindUser * pDlg )
{
CString str ;
CString strFind ;
if ( pDlg - > m_bFindAll ) //<2F> <> ѯ<EFBFBD> <D1AF> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
{
m_bFind2 = true ; //<2F> <> <EFBFBD> ڲ<EFBFBD> ѯ<EFBFBD> <D1AF> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> ,<2C> <> Щ<EFBFBD> <D0A9> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ܽ<EFBFBD> <DCBD> <EFBFBD>
memset ( m_szGroupID , 0 , sizeof ( m_szGroupID ) ) ;
strFind = _T ( " select * from users where 1<>1 " ) ;
}
else
{
//<2F> <> ѯ<EFBFBD> <D1AF> <EFBFBD> <EFBFBD>
if ( _tcslen ( m_szGroupID ) > 0 )
strFind . Format ( _T ( " select * from users where GroupID='%s' and ( 1<>1 " ) , m_szGroupID ) ;
else
strFind . Format ( _T ( " select * from users where (GroupID='' or GroupID is null) and ( 1<>1 " ) , m_szGroupID ) ;
}
if ( pDlg - > m_bName ) //name
{
str . Format ( _T ( " or name like '%%%s%%' " ) , pDlg - > m_strMsg ) ;
strFind + = str ;
}
if ( pDlg - > m_bNickName ) //nickname
{
str . Format ( _T ( " or nickname like '%%%s%%' " ) , pDlg - > m_strMsg ) ;
strFind + = str ;
}
if ( pDlg - > m_bSex ) //sex
{
str . Format ( _T ( " or sex like '%%%s%%' " ) , pDlg - > m_strMsg ) ;
strFind + = str ;
}
// if ( pDlg->m_bLTD ) //LTD
// {
/// str.Format(_T(" or LTD like '%%%s%%' "),pDlg->m_strMsg);
// strFind += str;
// }
if ( pDlg - > m_bJob ) //job
{
str . Format ( _T ( " or job like '%%%s%%' " ) , pDlg - > m_strMsg ) ;
strFind + = str ;
}
if ( pDlg - > m_bTel ) //Tel
{
str . Format ( _T ( " or tel like '%%%s%%' " ) , pDlg - > m_strMsg ) ;
strFind + = str ;
}
if ( pDlg - > m_bMobile ) //Mobile
{
str . Format ( _T ( " or mobile like '%%%s%%' " ) , pDlg - > m_strMsg ) ;
strFind + = str ;
}
if ( pDlg - > m_bEmail ) //Email
{
str . Format ( _T ( " or email like '%%%s%%' " ) , pDlg - > m_strMsg ) ;
strFind + = str ;
}
if ( pDlg - > m_bBZ ) //BZ
{
str . Format ( _T ( " or BZ like '%%%s%%' " ) , pDlg - > m_strMsg ) ;
strFind + = str ;
}
if ( ! pDlg - > m_bFindAll )
{
strFind + = _T ( " ) " ) ;
}
m_wndList . ShowWindow ( SW_HIDE ) ; //<2F> ӿ<EFBFBD> <D3BF> <EFBFBD> ʾ <EFBFBD> ٶ<EFBFBD>
m_wndList . DeleteAllItems ( ) ;
TCHAR szBuf [ 32 ] = { 0 } ;
BOOL b = m_AdoRS . Open ( strFind ) ;
long lCount = m_AdoRS . GetRecordCount ( ) ;
if ( b & & lCount )
{
COleDateTime t ;
m_AdoRS . MoveFirst ( ) ;
for ( int i = 0 ; i < lCount ; i + + )
{
ANS_GAddress_SeeData user = { 0 } ;
m_AdoRS . GetCollect ( _T ( " UserID " ) , user . lUserID ) ;
m_AdoRS . GetCollect ( _T ( " UserType " ) , user . szUserType ) ;
m_AdoRS . GetCollect ( _T ( " GroupID " ) , user . szGroupID ) ;
m_AdoRS . GetCollect ( _T ( " Name " ) , user . szName ) ;
m_AdoRS . GetCollect ( _T ( " NickName " ) , user . szNickName ) ;
m_AdoRS . GetCollect ( _T ( " Sex " ) , user . szSex ) ;
m_AdoRS . GetCollect ( _T ( " Birthday " ) , t ) ; t . GetAsSystemTime ( user . tBirthday ) ;
m_AdoRS . GetCollect ( _T ( " Job " ) , user . szJob ) ;
m_AdoRS . GetCollect ( _T ( " Tel " ) , user . szTel ) ;
m_AdoRS . GetCollect ( _T ( " Fax " ) , user . szFax ) ;
m_AdoRS . GetCollect ( _T ( " Email " ) , user . szEmail ) ;
m_AdoRS . GetCollect ( _T ( " Mobile " ) , user . szMobile ) ;
m_AdoRS . GetCollect ( _T ( " QQ " ) , user . szQQ ) ;
m_AdoRS . GetCollect ( _T ( " LoginName " ) , user . szLoginName ) ;
m_AdoRS . GetCollect ( _T ( " PurviewType " ) , user . ulPurviewType ) ;
m_AdoRS . GetCollect ( _T ( " Purview " ) , user . ulPurview ) ;
m_AdoRS . GetCollect ( _T ( " LoginCount " ) , user . lLoginCount ) ;
m_AdoRS . GetCollect ( _T ( " LoginTime " ) , t ) ; t . GetAsSystemTime ( user . tLoginTime ) ;
m_AdoRS . GetCollect ( _T ( " SMSUsed " ) , user . lSMSUsed ) ;
m_AdoRS . GetCollect ( _T ( " SMSSendAll " ) , user . lSMSSendAll ) ;
m_AdoRS . GetCollect ( _T ( " MmsUsed " ) , user . lMmsUsed ) ;
m_AdoRS . GetCollect ( _T ( " MmsSendAll " ) , user . lMmsSendAll ) ;
//m_AdoRS.GetCollect( _T("OvrTime"), t); t.GetAsSystemTime(user.tOvrTime);
m_AdoRS . GetCollect ( _T ( " CreateUser " ) , user . szCreateUser ) ;
m_AdoRS . GetCollect ( _T ( " CreateTime " ) , t ) ; t . GetAsSystemTime ( user . tCreateTime ) ;
m_AdoRS . GetCollect ( _T ( " BZ " ) , user . szBZ ) ;
m_AdoRS . GetCollect ( _T ( " AccessGroup " ) , user . lAccessGroupID ) ;
m_AdoRS . MoveNext ( ) ;
//m_wndList.SetHeadings(_T("<22> <> <EFBFBD> <EFBFBD> ,50;<3B> <> ¼<EFBFBD> <C2BC> ,80; <20> <> <EFBFBD> <EFBFBD> ,80; <20> dz<EFBFBD> ,80;<3B> ֻ<EFBFBD> ,100;<3B> 绰,80; <20> <> <EFBFBD> <EFBFBD> ,90;ְ<> <D6B0> ,80;Email,80;"));
m_wndList . InsertItem ( i , _itot ( i + 1 , szBuf , 10 ) ) ; //<2F> <> <EFBFBD> <EFBFBD>
long lIcon = 2 ;
if ( _tcscmp ( user . szSex , _T ( " <EFBFBD> <EFBFBD> " ) ) = = 0 )
lIcon = 0 ;
if ( _tcscmp ( user . szSex , _T ( " Ů " ) ) = = 0 )
lIcon = 1 ;
m_wndList . SetIconIndex ( i , lIcon ) ;
m_wndList . SetItemData ( i , user . lUserID ) ;
long lTemp = 1 ;
m_wndList . SetItemText ( i , lTemp + + , user . szLoginName ) ;
m_wndList . SetItemText ( i , lTemp + + , user . szSMSNum ) ;
if ( user . lSMSUsed = = - 100 )
str = _T ( " <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) ;
else
str . Format ( _T ( " %8d " ) , user . lSMSUsed ) ;
m_wndList . SetItemText ( i , lTemp + + , str ) ;
# ifdef SUPPER_FUNC_MMS
if ( user . lMmsUsed = = - 100 )
str = _T ( " <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) ;
else
str . Format ( _T ( " %8d " ) , user . lMmsUsed ) ;
m_wndList . SetItemText ( i , lTemp + + , str ) ;
# endif
switch ( user . ulPurviewType )
{
case PURVIEWTYPE_ADMIN :
str = _T ( " ϵͳ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ա " ) ;
break ;
case PURVIEWTYPE_KF :
str = _T ( " <EFBFBD> ͻ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ա" ) ;
break ;
case PURVIEWTYPE_USERS :
str = _T ( " һ <EFBFBD> <EFBFBD> Ա<EFBFBD> <EFBFBD> " ) ;
break ;
case PURVIEWTYPE_INPUT :
str = _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ¼<EFBFBD> <EFBFBD> Ա" ) ;
break ;
case PURVIEWTYPE_ADDRESS :
default :
str = _T ( " <EFBFBD> <EFBFBD> ͨѶ¼" ) ;
break ;
}
m_wndList . SetItemText ( i , lTemp + + , str ) ;
str . Format ( _T ( " %8d " ) , user . lLoginCount ) ;
m_wndList . SetItemText ( i , lTemp + + , str ) ;
m_wndList . SetItemText ( i , lTemp + + , user . szName ) ;
m_wndList . SetItemText ( i , lTemp + + , user . szNickName ) ;
m_wndList . SetItemText ( i , lTemp + + , user . szMobile ) ;
m_wndList . SetItemText ( i , lTemp + + , user . szTel ) ;
COleDateTime t ( user . tBirthday ) ;
if ( t . GetStatus ( ) = = COleDateTime : : valid )
{
str . Format ( _T ( " %04d.%02d.%02d " ) , t . GetYear ( ) , t . GetMonth ( ) , t . GetDay ( ) ) ;
m_wndList . SetItemText ( i , lTemp + + , str ) ;
}
else
{
m_wndList . SetItemText ( i , lTemp + + , _T ( " " ) ) ;
}
m_wndList . SetItemText ( i , lTemp + + , user . szJob ) ;
m_wndList . SetItemText ( i , lTemp + + , user . szEmail ) ;
# ifdef SHOWBZ_VER
m_wndList . SetItemText ( i , lTemp + + , user . szBZ ) ;
# endif
}
}
else
{
MessageBox ( _T ( " <EFBFBD> Բ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> û<EFBFBD> <EFBFBD> <EFBFBD> ҵ<EFBFBD> <EFBFBD> <EFBFBD> Ӧ<EFBFBD> ļ<EFBFBD> ¼<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ²<EFBFBD> ѯ<EFBFBD> <EFBFBD> " ) , _T ( " <EFBFBD> <EFBFBD> Ϣ" ) , MB_ICONINFORMATION ) ;
}
m_wndList . ShowWindow ( SW_SHOW ) ; //Ϊ<> ˼ӿ<CBBC> <D3BF> <EFBFBD> ʾ <EFBFBD> ٶ<EFBFBD>
}
void CFGAddress : : OnDestroy ( )
{
CDialog : : OnDestroy ( ) ;
if ( m_pInUser )
{ delete m_pInUser ; m_pInUser = NULL ; } ;
}
BOOL CFGAddress : : isAddressFull ( BOOL bTip )
{
long lCount = 0 ;
CString str = _T ( " select count(*) as abc from users " ) ;
if ( m_AdoRS . Open ( str ) & & m_AdoRS . GetRecordCount ( ) > 0 )
{
m_AdoRS . MoveFirst ( ) ;
m_AdoRS . GetCollect ( _T ( " abc " ) , lCount ) ;
m_AdoRS . Close ( ) ;
}
if ( lCount < m_pMainFrame - > GetMaxUsersCount ( ) )
return false ;
if ( bTip )
{
MessageBox ( _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ʺ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> Ѵ <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ޣ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ܼ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ӣ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ϵ<EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ṩ<EFBFBD> ̣<EFBFBD> " ) , _T ( " <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> " ) , MB_ICONWARNING ) ;
}
return true ;
}
void CFGAddress : : On_User_ModifyUsed ( )
{
if ( ! m_pMainFrame - > GetUserPurview ( PURVIEW_USER_MANAGER ) )
{
return ;
}
long lItem = GetCurrentSelected ( ) ;
if ( lItem < 0 )
return ;
if ( isLockItem ( lItem ) )
{
return ;
}
long lUserID = m_wndList . GetItemData ( lItem ) ;
ANS_GAddress_SeeData Address = GetUserData ( lUserID ) ;
}