diff --git a/HEZON_ITK.sln b/HEZON_ITK.sln
new file mode 100644
index 0000000..bb7bd0f
--- /dev/null
+++ b/HEZON_ITK.sln
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HEZON_ITK", "HEZON_ITK\HEZON_ITK.vcxproj", "{8E665218-4AC2-4DDD-A50E-4245BA64C3C3}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {8E665218-4AC2-4DDD-A50E-4245BA64C3C3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8E665218-4AC2-4DDD-A50E-4245BA64C3C3}.Debug|Win32.Build.0 = Debug|Win32
+ {8E665218-4AC2-4DDD-A50E-4245BA64C3C3}.Debug|x64.ActiveCfg = Debug|x64
+ {8E665218-4AC2-4DDD-A50E-4245BA64C3C3}.Debug|x64.Build.0 = Debug|x64
+ {8E665218-4AC2-4DDD-A50E-4245BA64C3C3}.Release|Win32.ActiveCfg = Release|Win32
+ {8E665218-4AC2-4DDD-A50E-4245BA64C3C3}.Release|Win32.Build.0 = Release|Win32
+ {8E665218-4AC2-4DDD-A50E-4245BA64C3C3}.Release|x64.ActiveCfg = Release|x64
+ {8E665218-4AC2-4DDD-A50E-4245BA64C3C3}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/HEZON_ITK/HEZON_ITK.cpp b/HEZON_ITK/HEZON_ITK.cpp
new file mode 100644
index 0000000..6272e3e
--- /dev/null
+++ b/HEZON_ITK/HEZON_ITK.cpp
@@ -0,0 +1,11 @@
+// HEZON_ITK.cpp : ̨Ӧóڵ㡣
+//
+
+#include "stdafx.h"
+
+
+int _tmain(int argc, _TCHAR* argv[])
+{
+ return 0;
+}
+
diff --git a/HEZON_ITK/HEZON_ITK.vcxproj b/HEZON_ITK/HEZON_ITK.vcxproj
new file mode 100644
index 0000000..d5b31d5
--- /dev/null
+++ b/HEZON_ITK/HEZON_ITK.vcxproj
@@ -0,0 +1,173 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {8E665218-4AC2-4DDD-A50E-4245BA64C3C3}
+ Win32Proj
+ HEZON_ITK
+
+
+
+ Application
+ true
+ Unicode
+ v110
+
+
+ Application
+ true
+ Unicode
+ v110
+
+
+ Application
+ false
+ true
+ Unicode
+ v110
+
+
+ DynamicLibrary
+ false
+ false
+ Unicode
+ false
+ v110
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ Use
+ Level3
+ Disabled
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+
+
+ Console
+ true
+
+
+
+
+ Use
+ Level3
+ Disabled
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+
+
+ Console
+ true
+
+
+
+
+ Level3
+ Use
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ Level3
+ NotUsing
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_CONSOLE;IPLIB=none;%(PreprocessorDefinitions)
+ C:\Java\jdk1.8.0_191\include\win32;C:\Java\jdk1.8.0_191\include;D:\Siemens\Teamcenter11\include;D:\Siemens\Teamcenter11\include_cpp;%(AdditionalIncludeDirectories)
+ Cdecl
+
+
+ Console
+ true
+ true
+ true
+
+
+ D:\Siemens\Teamcenter11\lib\*.lib;C:\Java\jdk1.8.0_191\lib\*.lib;%(AdditionalDependencies)
+ libuser_exits.ar.lib;%(IgnoreSpecificDefaultLibraries)
+ $(OutDir)\bs.dll
+ /force %(AdditionalOptions)
+
+
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HEZON_ITK/HEZON_ITK.vcxproj.filters b/HEZON_ITK/HEZON_ITK.vcxproj.filters
new file mode 100644
index 0000000..0c768b1
--- /dev/null
+++ b/HEZON_ITK/HEZON_ITK.vcxproj.filters
@@ -0,0 +1,73 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hpp;hxx;hm;inl;inc;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+ {d25e0aa0-8791-4277-b392-abc3943f925c}
+
+
+ {f8d4fa90-4363-4e0f-8f44-a2e02a224ad9}
+
+
+ {5f8496b0-ad7e-4c6c-b832-59575601b9f1}
+
+
+ {aa5fbb6b-b5ee-4f80-8b16-de99d912a542}
+
+
+
+
+
+
+
+
+ epm-handler
+
+
+ common
+
+
+ epm-handler
+
+
+ epm-handler
+
+
+ epm-handler
+
+
+ epm-handler
+
+
+ epm-handler
+
+
+ epm-handler
+
+
+
+
+ epm-handler
+
+
+ epm-handler
+
+
+ epm-handler
+
+
+ epm-handler
+
+
+
\ No newline at end of file
diff --git a/HEZON_ITK/ReadMe.txt b/HEZON_ITK/ReadMe.txt
new file mode 100644
index 0000000..49df47a
--- /dev/null
+++ b/HEZON_ITK/ReadMe.txt
@@ -0,0 +1,36 @@
+========================================================================
+ 控制台应用程序:HEZON_ITK 项目概述
+========================================================================
+
+应用程序向导已为您创建了此 HEZON_ITK 应用程序。
+
+本文件概要介绍组成 HEZON_ITK 应用程序的每个文件的内容。
+
+
+HEZON_ITK.vcxproj
+ 这是使用应用程序向导生成的 VC++ 项目的主项目文件,
+ 其中包含生成该文件的 Visual C++
+ 的版本信息,以及有关使用应用程序向导选择的平台、配置和项目功能的信息。
+
+HEZON_ITK.vcxproj.filters
+ 这是使用“应用程序向导”生成的 VC++ 项目筛选器文件。
+ 它包含有关项目文件与筛选器之间的关联信息。 在 IDE
+ 中,通过这种关联,在特定节点下以分组形式显示具有相似扩展名的文件。
+ 例如,“.cpp”文件与“源文件”筛选器关联。
+
+HEZON_ITK.cpp
+ 这是主应用程序源文件。
+
+/////////////////////////////////////////////////////////////////////////////
+其他标准文件:
+
+StdAfx.h,StdAfx.cpp
+ 这些文件用于生成名为 HEZON_ITK.pch 的预编译头 (PCH) 文件和
+ 名为 StdAfx.obj 的预编译类型文件。
+
+/////////////////////////////////////////////////////////////////////////////
+其他注释:
+
+应用程序向导使用“TODO:”注释来指示应添加或自定义的源代码部分。
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/HEZON_ITK/bs_bypass.cpp b/HEZON_ITK/bs_bypass.cpp
new file mode 100644
index 0000000..979d474
--- /dev/null
+++ b/HEZON_ITK/bs_bypass.cpp
@@ -0,0 +1,44 @@
+/*=============================================================================
+ Copyright (c) 2003-2005 UGS Corporation
+ Unpublished - All Rights Reserved
+
+ File :qtmc_by_pass.cpp
+ Module : user_exits
+
+
+
+============================================================================================================
+DATE Name Description of Change
+30_OTC_2014 mengyawei creation
+$HISTORY$
+
+============================================================================================================*/
+
+#include
+#include "epm_handler_common.h"
+
+#include
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ extern "C" int POM_AM__set_application_bypass(logical bypass);
+
+ int bs_bypass(void *retValType)
+ {
+ int ifail = ITK_ok;
+
+ logical bypass=true;
+ USERARG_get_logical_argument(&bypass);
+ POM_AM__set_application_bypass( bypass );
+
+ return ifail;
+ }
+
+#ifdef __cplusplus
+}
+#endif
\ No newline at end of file
diff --git a/HEZON_ITK/bs_custom_main.cxx b/HEZON_ITK/bs_custom_main.cxx
new file mode 100644
index 0000000..f930510
--- /dev/null
+++ b/HEZON_ITK/bs_custom_main.cxx
@@ -0,0 +1,68 @@
+/**
+* @defgroup common ú
+* @defgroup workflow ̺
+* @defgroup bmf ҵչ
+* @defgroup service
+*/
+
+/**
+* @addtogroup common
+* @{
+*/
+
+/**
+* @file
+* @brief ע
+* @date 2014/4/21
+* @author mengyawei
+*/
+
+#pragma warning (disable: 4819)
+
+/**
+* @headerfile tcua ͷļ
+*/
+#include
+#include
+#include
+#include "epm_register_handler.h"
+#include "epm_handler_common.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+ /**
+ * @fn extern "C" DLLAPI int liborigin_register_callbacks
+ * @return usually return ITK_ok
+ * @brief liborigin customization entry
+ */
+ DLLAPI int bs_register_callbacks()
+ {
+ int ifail = ITK_ok;
+ ifail = CUSTOM_register_exit(
+ "bs",
+ "USERSERVICE_register_methods",
+ (CUSTOM_EXIT_ftn_t)USERSERVICE_custom_register_methods) ;
+
+
+ ifail = CUSTOM_register_exit(
+ "bs",
+ "USER_gs_shell_init_module",
+ (CUSTOM_EXIT_ftn_t)CUST_init_module);
+
+ return ifail;
+ }
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
+
+/**
+* @}
+*/
\ No newline at end of file
diff --git a/HEZON_ITK/common_itk_util.c b/HEZON_ITK/common_itk_util.c
new file mode 100644
index 0000000..eb5b112
--- /dev/null
+++ b/HEZON_ITK/common_itk_util.c
@@ -0,0 +1,273 @@
+/**
+* @file common_itk_util.cpp
+* @brief itk warpper utility function
+* @author James
+* @history
+* ===================================================================================
+* Date Name Description of Change
+* 18-July-2008 James
+*/
+
+#pragma warning (disable: 4996)
+#pragma warning (disable: 4819)
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+//#include
+//#include
+//#include
+//#include
+
+#include
+//#include
+#include
+#include
+//#include
+//#include
+#include "error_handling.h"
+#include "common_itk_util.h"
+
+#ifdef WIN32
+#include
+#include
+#else
+#include
+#endif
+
+
+#define ARGS_LENGTH 200
+#define ARGS_NAME_DEBUG "-debug"
+#define DEBUG "-debug="
+#define MAX_PRINTLINE_LENGTH 2000
+#define MAX_PATH_LENGTH 2000
+#define MAX_ARGUMENT_LENGTH 400
+#define MAX_PARAMNAME_LENGTH 50
+#define MAX_FILE_EXT_LENGTH 10
+#define TRUE_FLAG 1
+#define FALSE_FLAG 0
+#define DETAILLOG 1
+
+
+FILE* logFile = NULL;
+
+void set_bypass(logical bypass)
+{
+ AM__set_application_bypass(bypass);
+}
+/*=============================================================================*
+ * FUNCTION: current_time
+ * PURPOSE : get the current datetime
+ * INPUT:
+ * date_t* date_tag // current date time tag
+ *
+ * RETURN:
+ * void
+ *============================================================================*/
+void current_time( date_t * date_tag )
+{
+ time_t ltime;
+ struct tm *today ;
+
+ // Set time zone from TZ environment variable. If TZ is not set,
+ // the operating system is queried to obtain the default value
+ // for the variable.
+ //
+ //_tzset();
+
+ // Get UNIX-style time and display as number and string.
+ time( <ime );
+
+ today = localtime( <ime );
+ date_tag->year = today->tm_year + 1900 ;
+ date_tag->month = today->tm_mon ;
+ date_tag->day = today->tm_mday ;
+ date_tag->hour = today->tm_hour ;
+ date_tag->minute = today->tm_min ;
+ date_tag->second = today->tm_sec ;
+}
+/*=============================================================================*
+ * FUNCTION: CreateLogFile
+ * PURPOSE : create log file
+ * INPUT:
+ * char* FunctionName // the funtion which need to create log file
+ * FILE** logFile // out: the log file pointer
+ *
+ * RETURN:
+ * void
+ *============================================================================*/
+void CreateLogFile(char* FunctionName, char **fullname)
+{
+ int i=0, ifail = ITK_ok;
+ //date_t status_now;
+ //char* date_string = NULL;
+ char date_string[MAX_PATH_LENGTH];
+ char logFileDir[MAX_PATH_LENGTH];
+ char logFileName[MAX_PATH_LENGTH];
+
+ char* session_uid = NULL;
+ tag_t session_tag = NULLTAG;
+ time_t now;
+ struct tm *p;
+
+ time(&now);
+
+ logFile = NULL;
+ //current_time(&status_now);
+ p=localtime(&now);
+
+ memset(date_string, 0, sizeof(date_string));
+ sprintf(date_string,"%4d%02d%02d%02d%02d%02d",1900+p->tm_year,p->tm_mon+1 ,p->tm_mday ,p->tm_hour,p->tm_min ,p->tm_sec );
+ //if( DATE_date_to_string( status_now, "%Y%m%d%H%M%S", &date_string) != ITK_ok )
+ //ifail = ITK_date_to_string (status_now, &date_string );
+ //if (ifail)
+ //{
+ // printf("!*ERROR*!: Failed to get current date time\n");
+ // goto CLEANUP;
+ //}
+
+ memset(logFileDir, 0, sizeof(logFileDir));
+ memset(logFileName, 0, sizeof(logFileName));
+ //get log dir
+ sprintf(logFileDir, "%s", getenv("TEMP"));
+ printf("\n log file dir: %s\n", logFileDir);
+ //try to change dir to TC_USER_LOG_DIR
+ if(chdir(logFileDir)!=ITK_ok)
+ {
+ //not set TC_USER_LOG_DIR
+ //log in to default TC_LOG
+ memset(logFileDir, 0, sizeof(logFileDir));
+ sprintf(logFileDir, "%s", getenv("TC_LOG"));
+ printf("\n TC_USER_LOG_DIR invalide, log file dir: %s\n", logFileDir);
+ if(chdir(logFileDir)!=ITK_ok)
+ {
+ //still can not change to log dir
+ printf("!*ERROR*!: Failed to change dir to TC_USER_LOG_DIR\n");
+ goto CLEANUP;
+ }
+ }
+
+ //get session_uid to make sure the log file name unique
+ POM_ask_session(&session_tag);
+ ITK__convert_tag_to_uid(session_tag, &session_uid);
+
+
+ //get logFileName
+ sprintf(logFileName, "%s_%s_%s.log", FunctionName, session_uid, date_string);
+ printf("log file name: %s\n", logFileName);
+
+ *fullname = (char *)MEM_alloc(sizeof(char)*512);
+ sprintf(*fullname,"%s\\%s",logFileDir,logFileName);
+
+ //for(i = 0; _access((char *)logFileName, 4) == 0; i++)
+ /*{
+ memset(logFileName, 0, sizeof(logFileName));
+ sprintf(logFileName, "%s_%s_%s_%d.log", FunctionName, session_uid, date_string, i);
+ }
+ printf("final log file name: %s\n", logFileName);*/
+
+ //create log file
+ logFile = fopen(logFileName, "w");
+
+CLEANUP:
+ //DOFREE(date_string);
+ DOFREE(session_uid);
+}
+
+
+/*=============================================================================*
+ * FUNCTION: WriteLog
+ * PURPOSE : write log, if debug log File not null, write log message to log File
+ * INPUT:
+ * const char* format // debug message string
+ *
+ * RETURN:
+ * void
+ *============================================================================*/
+void WriteLog(const char* format, ...)
+{
+ va_list arg;
+ char tmp[MAX_PRINTLINE_LENGTH];
+
+ if(logFile)
+ {
+ //get the message
+ memset(tmp, 0, sizeof(tmp));
+ va_start(arg, format);
+ vsprintf(tmp, format, arg);
+ va_end(arg);
+
+ //----------print to command window for trace--------//
+ printf("%s\n", tmp);
+
+ //print message to log file
+ fprintf(logFile, "%s\n", tmp);
+ fflush(logFile);
+ }
+ else
+ {
+ printf("*!Error!*: Log File Not Exist\n");
+ }
+}
+
+void CloseLog(void)
+{
+ if(logFile)
+ {
+ fclose(logFile);
+ logFile = NULL;
+ }
+}
+
+//void getTypeinfo(char *type)
+//{
+// int ulen = 0,i=0,tempcount=0,asd=0;
+//
+// char temp[128]="";
+// ulen = strlen(type);
+// asd = ulen-1;
+// for(i=0;i < ulen;i++)
+// {
+// if(type[i] == ';')
+// {
+// temp[tempcount] = '\0';
+// strcpy(excludetypes[typecount].type,temp);
+// strcpy(temp,"");
+// tempcount = 0;
+// typecount = typecount + 1;
+// }
+// else
+// {
+//
+// temp[tempcount] = type[i];
+// tempcount = tempcount + 1;
+// if(i==asd)
+// {
+// temp[tempcount] = '\0';
+// strcpy(excludetypes[typecount].type,temp);
+// typecount = typecount + 1;
+// }
+//
+// }
+//
+// }
+//}
\ No newline at end of file
diff --git a/HEZON_ITK/common_itk_util.h b/HEZON_ITK/common_itk_util.h
new file mode 100644
index 0000000..f1e4cab
--- /dev/null
+++ b/HEZON_ITK/common_itk_util.h
@@ -0,0 +1,31 @@
+/**
+* @file common_itk_util.h
+* @brief itk warpper utility function
+* @author James
+* @history
+* ===================================================================================
+* Date Name Description of Change
+* 09-July-2008 James
+*/
+
+#ifndef COMMON_ITK_UTIL
+#define COMMON_ITK_UTIL
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void CreateLogFile(char* FunctionName, char **fullname);
+void WriteLog(const char* format, ...);
+void CloseLog(void);
+void set_bypass(logical bypass);
+//int FindDatasetReferenceExt( tag_t datasettype, const char *datasettype_ref, char ext[10] );
+//int CompareDate( date_t date1, date_t date2 );
+//int GetRandomTempFile( char tempFile[256] );
+//logical IsItemRevisionType( char object_type[WSO_name_size_c + 1] );
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
\ No newline at end of file
diff --git a/HEZON_ITK/epm_handler_common.h b/HEZON_ITK/epm_handler_common.h
new file mode 100644
index 0000000..f774f37
--- /dev/null
+++ b/HEZON_ITK/epm_handler_common.h
@@ -0,0 +1,60 @@
+/**
+* @addtogroup handler
+* @{
+*/
+
+/**
+* @file epm_handler_common.h
+* @brief handler functions declation
+* @date 2011/4/12
+* @author Ray
+* @history
+* ===================================================================================
+* Date Name Description
+* 12-Apr-2011 Ray created
+*/
+
+
+#ifndef EPM_HANDLER_COMMON
+#define EPM_HANDLER_COMMON
+
+#include
+#include
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+ using namespace std;
+
+
+#define TC_specification "IMAN_specification"
+//#define NX_3W_DATASET_TYPE "UGMASTER"
+//#define NX_2W_DATASET_TYPE "UGPART"
+//#define DATASET_REF_TYPE "UGPART"
+
+
+ ////Ϣǩ汾ȥ
+ //int qtmc_sign_ir(EPM_action_message_t msg);
+
+ int kl_erp_save(EPM_action_message_t msg);
+ int kl_erp_update(EPM_action_message_t msg);
+ int kl_erp_bom(EPM_action_message_t msg);
+int sap(EPM_action_message_t msg);
+
+
+
+ //user service end
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+/**
+* @}
+*/
\ No newline at end of file
diff --git a/HEZON_ITK/epm_register_handler.cxx b/HEZON_ITK/epm_register_handler.cxx
new file mode 100644
index 0000000..dce9a28
--- /dev/null
+++ b/HEZON_ITK/epm_register_handler.cxx
@@ -0,0 +1,265 @@
+/*===================================================================================================
+ Copyright(c) 2011 Siemens PLM Software Corp. All rights reserved.
+ Unpublished - All rights reserved
+====================================================================================================
+File description:
+
+ Filename : epm_register_handler.c
+
+ This file registers functions which are called when Teamcenter is being initialized
+
+====================================================================================================
+Date Name Description of Change
+2011-8-21 Ray wei creation
+
+$HISTORY$
+==================================================================================================*/
+
+#pragma warning (disable: 4819)
+
+/**
+* @headerfile tcua ͷļ
+*/
+#include
+#include
+#include
+
+/**
+* @headerfile standard c & cpp header files
+*/
+#include
+#include
+#include
+#include
+#include
+
+
+/**
+* @headerfile user's header files
+*/
+#include "epm_register_handler.h"
+#include "epm_handler_common.h"
+
+
+
+// Method and Workflow Handler
+extern DLLAPI int CUST_init_module(int *decision, va_list args)
+{
+ int ifail = ITK_ok, n=0;
+ char date_buf[80],*expire_date;
+ time_t now;
+ struct tm *p;
+
+ *decision = ALL_CUSTOMIZATIONS;
+
+
+ //ifail = EPM_register_action_handler("qtmc-sign-ir", "qtmc-sign-ir",
+ //(EPM_action_handler_t)qtmc_sign_ir);
+ //if(ifail == ITK_ok)
+ //{
+ // fprintf(stdout,"Registering action handler qtmc-sign-ir completed!\n");
+ //}
+ //else
+ //{
+ // fprintf(stdout , "Registering action handler qtmc-sign-ir failed %d!\n",ifail);
+ //}
+
+ ifail=EPM_register_action_handler("kl_erp_save", "kl_erp_save", kl_erp_save);
+
+ if(ifail)
+ {
+ printf("register save error");
+ }else
+ {
+ printf("register save ok");
+
+ }
+ ifail = EPM_register_action_handler("kl_erp_bom", "kl_erp_bom", kl_erp_bom);
+ if (ifail)
+ {
+ printf("register bom error");
+ }
+ else
+ {
+ printf("register bom ok");
+
+ }
+ // ifail=EPM_register_action_handler("kl_erp_update", "kl_erp_update", kl_erp_update);
+ // if (ifail)
+ // {
+ // printf("register update error");
+ // }
+ // else
+ // {
+ // printf("register update ok");
+ //
+ // }
+
+ return ifail;
+}
+//
+////register service method
+extern DLLAPI int USERSERVICE_custom_register_methods()
+{
+
+ ////2.7 SP-CUS-007 DBOMEBOM
+ //numberOfArguments = 1;
+ //functionPtr = Q7_ebom_to_pbom;
+ //argumentList = (int*)MEM_alloc(numberOfArguments * sizeof(int) );
+ //argumentList[0] = USERARG_TAG_TYPE;
+ ////argumentList[1] = USERARG_STRING_TYPE + USERARG_ARRAY_TYPE;
+ //returnValueType = USERARG_STRING_TYPE;
+ //ITKCALL(status = USERSERVICE_register_method("Q7_ebom_to_pbom", functionPtr, numberOfArguments,
+ // argumentList, returnValueType ));
+ //MEM_free(argumentList);
+ //if(status == ITK_ok)
+ //{
+ // fprintf( stdout, "\n Registering Q7_ebom_to_pbom finished\n" );
+ //}
+ //else
+ //{
+ // fprintf( stdout, "\n Registering Q7_ebom_to_pbom failed %d\n" , status );
+ //}
+ ////QTM_ebom_to_pbom
+ //numberOfArguments = 1;
+ //functionPtr = QTM_ebom_to_pbom;
+ //argumentList = (int*)MEM_alloc(numberOfArguments * sizeof(int) );
+ //argumentList[0] = USERARG_TAG_TYPE;
+ ////argumentList[1] = USERARG_STRING_TYPE + USERARG_ARRAY_TYPE;
+ //returnValueType = USERARG_STRING_TYPE;
+ //ITKCALL(status = USERSERVICE_register_method("QTM_ebom_to_pbom", functionPtr, numberOfArguments,
+ // argumentList, returnValueType ));
+ //MEM_free(argumentList);
+ //if(status == ITK_ok)
+ //{
+ // fprintf( stdout, "\n Registering QTM_ebom_to_pbom finished\n" );
+ //}
+ //else
+ //{
+ // fprintf( stdout, "\n Registering QTM_ebom_to_pbom failed %d\n" , status );
+ //}
+ ////QTM_ebom_to_mbom
+ //numberOfArguments = 1;
+ //functionPtr = QTM_ebom_to_mbom;
+ //argumentList = (int*)MEM_alloc(numberOfArguments * sizeof(int) );
+ //argumentList[0] = USERARG_TAG_TYPE;
+ ////argumentList[1] = USERARG_STRING_TYPE + USERARG_ARRAY_TYPE;
+ //returnValueType = USERARG_STRING_TYPE;
+ //ITKCALL(status = USERSERVICE_register_method("QTM_ebom_to_mbom", functionPtr, numberOfArguments,
+ // argumentList, returnValueType ));
+ //MEM_free(argumentList);
+ //if(status == ITK_ok)
+ //{
+ // fprintf( stdout, "\n Registering QTM_ebom_to_mbom finished\n" );
+ //}
+ //else
+ //{
+ // fprintf( stdout, "\n Registering QTM_ebom_to_mbom failed %d\n" , status );
+ //}
+
+ ////2.6 SP-CUS-006е¶excelϢ
+ //numberOfArguments = 3;
+ //functionPtr = qtmc_update_revision_prop;
+ //argumentList = (int*)MEM_alloc(numberOfArguments * sizeof(int) );
+ //argumentList[0] = USERARG_TAG_TYPE+USERARG_ARRAY_TYPE;
+ //argumentList[1] = USERARG_TAG_TYPE;
+ //argumentList[2] = USERARG_STRING_TYPE;
+ //returnValueType = USERARG_VOID_TYPE;
+ //ITKCALL(status = USERSERVICE_register_method("QTMC_update_revision_prop",functionPtr,numberOfArguments,argumentList,returnValueType));
+ //if(status == ITK_ok)
+ //{
+ // fprintf(stdout,"Registering user service QTMC_update_revision_prop successful !\n");
+ //}else{
+ // fprintf(stdout,"Registering user service QTMC_update_revision_prop failed %d\n",status);
+ //}
+
+ //
+
+ ////SP-CUS-017SolidWorksģ浽TC
+ //numberOfArguments = 7;
+ //functionPtr = qtmc_import_solidworks_to_tc;
+ //argumentList = (int*)MEM_alloc(numberOfArguments * sizeof(int) );
+ //argumentList[0] = USERARG_STRING_TYPE;
+ //argumentList[1] = USERARG_STRING_TYPE;
+ //argumentList[2] = USERARG_STRING_TYPE;
+ //argumentList[3] = USERARG_TAG_TYPE;
+ //argumentList[4] = USERARG_LOGICAL_TYPE;
+ //argumentList[5] = USERARG_LOGICAL_TYPE;
+ //argumentList[6] = USERARG_LOGICAL_TYPE;
+ //returnValueType = USERARG_LOGICAL_TYPE;
+ //ITKCALL(status = USERSERVICE_register_method("QTMC_import_solidworks",functionPtr,numberOfArguments,argumentList,returnValueType));
+ //if(status == ITK_ok)
+ //{
+ // fprintf(stdout,"Registering user service QTMC_import_solidworks successful !\n");
+ //}else{
+ // fprintf(stdout,"Registering user service QTMC_import_solidworks failed %d\n",status);
+ //}
+
+
+ ////3.8 SP-CUS-020ϵм
+ //numberOfArguments = 3;
+ //functionPtr = qtmc_update_series_parts;
+ //argumentList = (int*)MEM_alloc(numberOfArguments * sizeof(int) );
+ //argumentList[0] = USERARG_TAG_TYPE;
+ //argumentList[1] = USERARG_STRING_TYPE;
+ //argumentList[2] = USERARG_STRING_TYPE;
+ //returnValueType = USERARG_TAG_TYPE;
+ //ITKCALL(status = USERSERVICE_register_method("QTMC_update_series_parts",functionPtr,numberOfArguments,argumentList,returnValueType));
+ //if(status == ITK_ok)
+ //{
+ // fprintf(stdout,"Registering user service QTMC_update_series_parts successful !\n");
+ //}else{
+ // fprintf(stdout,"Registering user service QTMC_update_series_parts failed %d\n",status);
+ //}
+
+ //numberOfArguments = 1;
+ //functionPtr = qtmc_by_pass;
+ //argumentList = (int*)MEM_alloc(numberOfArguments * sizeof(int) );
+ //argumentList[0] = USERARG_LOGICAL_TYPE;
+ //returnValueType = USERARG_VOID_TYPE;
+ //ITKCALL(status = USERSERVICE_register_method("QTMC-bypass",functionPtr,numberOfArguments,argumentList,returnValueType));
+ //if(status == ITK_ok)
+ //{
+ // fprintf(stdout,"Registering user service QTMC-bypass successful !\n");
+ //}else{
+ // fprintf(stdout,"Registering user service QTMC-bypass failed %d\n",status);
+ //}
+
+
+ //numberOfArguments = 3;
+ //functionPtr = qtmc_qry_service;
+ //argumentList = (int*)MEM_alloc(numberOfArguments * sizeof(int) );
+ //argumentList[0] = USERARG_STRING_TYPE;
+ //argumentList[1] = USERARG_STRING_TYPE+USERARG_ARRAY_TYPE;
+ //argumentList[2] = USERARG_STRING_TYPE+USERARG_ARRAY_TYPE;
+ //returnValueType = USERARG_TAG_TYPE+USERARG_ARRAY_TYPE;
+ //ITKCALL(status = USERSERVICE_register_method("QTMC_Search",functionPtr,numberOfArguments,argumentList,returnValueType));
+ //if(status == ITK_ok)
+ //{
+ // fprintf(stdout,"Registering user service QTMC_Search successful !\n");
+ //}else{
+ // fprintf(stdout,"Registering user service QTMC_Search failed %d\n",status);
+ //}
+
+
+ //
+ ////7.3 HBOMݵĵ
+ //numberOfArguments = 4;
+ //functionPtr = qtmc_update_hbom_bomline_prop;
+ //argumentList = (int*)MEM_alloc(numberOfArguments * sizeof(int) );
+ //argumentList[0] = USERARG_TAG_TYPE;
+ //argumentList[1] = USERARG_TAG_TYPE;
+ //argumentList[2] = USERARG_STRING_TYPE;
+ //argumentList[3] = USERARG_STRING_TYPE;
+ //returnValueType = USERARG_VOID_TYPE;
+ //ITKCALL(status = USERSERVICE_register_method("QTMC_update_bomline",functionPtr,numberOfArguments,argumentList,returnValueType));
+ //if(status == ITK_ok)
+ //{
+ // fprintf(stdout,"Registering user service QTMC_update_bomline successful !\n");
+ //}else{
+ // fprintf(stdout,"Registering user service QTMC_update_bomline failed %d\n",status);
+ //}
+
+ return 0;
+}
+
diff --git a/HEZON_ITK/epm_register_handler.h b/HEZON_ITK/epm_register_handler.h
new file mode 100644
index 0000000..bf79702
--- /dev/null
+++ b/HEZON_ITK/epm_register_handler.h
@@ -0,0 +1,36 @@
+
+/*=================================================================================
+* @file epm_register_handler.h
+* @brief itk user exits function declation, to register custom handlers
+* @date 2009/2/13
+* @author Ray Li
+* @history
+* ===================================================================================
+* Date Name Description
+* 13-Feb-2009 Ray created
+*===================================================================================*/
+
+
+#ifndef EPM_REGISTER_HANDLER_CUSTOM
+#define EPM_REGISTER_HANDLER_CUSTOM
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern DLLAPI int CUST_init_module(int *, va_list);
+extern DLLAPI int USERSERVICE_custom_register_methods();
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+
+/**
+* @}
+*/
\ No newline at end of file
diff --git a/HEZON_ITK/hezon_by_pass.cxx b/HEZON_ITK/hezon_by_pass.cxx
new file mode 100644
index 0000000..36ac06f
--- /dev/null
+++ b/HEZON_ITK/hezon_by_pass.cxx
@@ -0,0 +1,46 @@
+/*=============================================================================
+ Copyright (c) 2003-2005 UGS Corporation
+ Unpublished - All Rights Reserved
+
+ File :qtmc_by_pass.cpp
+ Module : user_exits
+
+
+
+============================================================================================================
+DATE Name Description of Change
+30_OTC_2014 mengyawei creation
+$HISTORY$
+
+============================================================================================================*/
+
+#include
+#include "epm_handler_common.h"
+
+#include
+#include
+#include
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+ extern "C" int POM_AM__set_application_bypass(logical bypass);
+
+ int qtmc_by_pass(void *retValType)
+ {
+ int ifail = ITK_ok;
+
+ logical bypass = FALSE;
+
+ USERARG_get_logical_argument( &bypass );
+
+ POM_AM__set_application_bypass( bypass );
+
+ return ifail;
+ }
+
+#ifdef __cplusplus
+}
+#endif
\ No newline at end of file
diff --git a/HEZON_ITK/kl_erp_bom.cpp b/HEZON_ITK/kl_erp_bom.cpp
new file mode 100644
index 0000000..0f70a21
--- /dev/null
+++ b/HEZON_ITK/kl_erp_bom.cpp
@@ -0,0 +1,468 @@
+#include "util.h"
+string getTime2()
+{
+ stringstream ss;
+ time_t t = time(0);
+ tm* local = localtime(&t);
+ ss << local->tm_year + 1900 << '/';
+ ss << local->tm_mon + 1 << '/';
+ ss << local->tm_mday << ' ';
+
+ return ss.str();
+}
+
+const char* newGUID()
+{
+ static char buf[64] = { 0 };
+ GUID guid;
+ if (S_OK == ::CoCreateGuid(&guid))
+ {
+ _snprintf(buf, sizeof(buf)
+ , "%08X-%04X-%04x-%02X%02X-%02X%02X%02X%02X%02X%02X"
+ , guid.Data1
+ , guid.Data2
+ , guid.Data3
+ , guid.Data4[0], guid.Data4[1]
+ , guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5]
+ , guid.Data4[6], guid.Data4[7]
+ );
+ }
+ return (const char*)buf;
+
+}
+
+int send_erp(tag_t top_line,int type,string &now,char **pref_vals, Testclass ^class1, System::String ^save_url, System::String ^check_url, vector