コード例 #1
0
ファイル: Helper.cs プロジェクト: fanjun365/TheDbgTool
 static void InitExpressionEngine_OldVer()
 {
     try
     {
         ZLSoft.BusinessHome.Expression.ExpressionUserInfo expUserInfo =
             new ZLSoft.BusinessHome.Expression.ExpressionUserInfo(
                 BHSystemInfo.CurrentUserBaseInfo.Account,
                 ServiceRepository.ClientCommunicateProxy.Password,
                 BHSystemInfo.CurrentUserBaseInfo.Username, BHSystemInfo.CurrentUserID,
                 BHSystemInfo.CurrentUserPsmIDs == null ? null : BHSystemInfo.CurrentUserPsmIDs.ToArray());
         string errMsg = null;
         Type t = Type.GetType("ZLSoft.BusinessHome.Expression.ExpressionEngine, ZLSoft.BusinessHome.Expression");
         MethodInfo mi = t.GetMethod("InitInClientDomain");
         mi.Invoke(null, new object[] {
             Services.ExpressionService, Services.ExpressionCalculateService, Services.OrgService,
             expUserInfo, ServiceRepository.ClientCommunicateProxy.LoginTime, SystemInfo.StationID, errMsg
         });
         if (!string.IsNullOrEmpty(errMsg))
             Program.Logger.Error("���ʽ�����ʼ������" + errMsg);
     }
     catch (Exception ex)
     {
         Program.Logger.Error("���ʽ�����ʼ���쳣��" + ex.Message);
     }
 }
コード例 #2
0
ファイル: Helper.cs プロジェクト: fanjun365/TheDbgTool
 static void InitExpressionEngine()
 {
     try
     {
         ZLSoft.BusinessHome.Expression.ExpressionUserInfo expUserInfo =
             new ZLSoft.BusinessHome.Expression.ExpressionUserInfo(
                 BHSystemInfo.CurrentUserBaseInfo.Account,
                 ServiceRepository.ClientCommunicateProxy.Password,
                 BHSystemInfo.CurrentUserBaseInfo.Username, BHSystemInfo.CurrentUserID,
                 BHSystemInfo.CurrentUserPsmIDs == null ? null : BHSystemInfo.CurrentUserPsmIDs.ToArray());
         string errMsg = null;
         ZLSoft.BusinessHome.Expression.ExpressionEngine.InitInClientDomain(
             Services.ExpressionService, Services.ExpressionCalculateService, Services.OrgService,
             ZLSoft.BusinessHome.Expression.Services.ServiceCreator.CreateMasterDataService(
                 ZLSoft.BusinessHome.Plugin.DataServer.MasterDataClientService.Instance.GetCodeTableItemName),
             expUserInfo, ServiceRepository.ClientCommunicateProxy.LoginTime, SystemInfo.StationID, out errMsg);
         //Type t = Type.GetType("ZLSoft.BusinessHome.Expression.ExpressionEngine, ZLSoft.BusinessHome.Expression");
         //MethodInfo mi = t.GetMethod("InitInClientDomain");
         //mi.Invoke(null, new object[] {
         //    Services.ExpressionService, Services.ExpressionCalculateService, Services.OrgService,
         //    ZLSoft.BusinessHome.Expression.Services.ServiceCreator.CreateMasterDataService(
         //        ZLSoft.BusinessHome.Plugin.DataServer.MasterDataClientService.Instance.GetCodeTableItemName),
         //    expUserInfo, ServiceRepository.ClientCommunicateProxy.LoginTime, SystemInfo.StationID, errMsg
         //});
         if (!string.IsNullOrEmpty(errMsg))
             Program.Logger.Error("���ʽ�����ʼ������" + errMsg);
     }
     catch (Exception ex)
     {
         Program.Logger.Error("���ʽ�����ʼ���쳣��" + ex.Message);
     }
 }