/// <summary> /// 通过编号获取模块名称 /// </summary> /// <param name="userInfo">用户</param> /// <param name="code">编号</param> /// <returns>数据表</returns> public string GetFullNameByCode(BaseUserInfo userInfo, string code) { string result = string.Empty; var parameter = ServiceInfo.Create(userInfo, MethodBase.GetCurrentMethod()); ServiceUtil.ProcessUserCenterReadDb(userInfo, parameter, (dbHelper) => { string tableName = userInfo.SystemCode + "Module"; var manager = new BaseModuleManager(dbHelper, userInfo, tableName); result = manager.GetFullNameByCode(code); }); return(result); }
/// <summary> /// 通过编号获取模块名称 /// </summary> /// <param name="userInfo">用户</param> /// <param name="code">编号</param> /// <returns>数据表</returns> public string GetFullNameByCode(BaseUserInfo userInfo, string code) { // 写入调试信息 #if (DEBUG) int milliStart = BaseBusinessLogic.StartDebug(userInfo, MethodBase.GetCurrentMethod()); #endif // 加强安全验证防止未授权匿名调用 #if (!DEBUG) LogOnService.UserIsLogOn(userInfo); #endif string returnValue = string.Empty; using (IDbHelper dbHelper = DbHelperFactory.GetHelper(BaseSystemInfo.UserCenterDbType)) { try { dbHelper.Open(UserCenterDbConnection); string tableName = BaseModuleEntity.TableName; if (!string.IsNullOrEmpty(BaseSystemInfo.SystemCode)) { tableName = BaseSystemInfo.SystemCode + "Module"; } BaseModuleManager moduleManager = new BaseModuleManager(dbHelper, userInfo, tableName); returnValue = moduleManager.GetFullNameByCode(code); BaseLogManager.Instance.Add(dbHelper, userInfo, this.serviceName, AppMessage.ModuleService_GetFullNameByCode, MethodBase.GetCurrentMethod()); } catch (Exception ex) { BaseExceptionManager.LogException(dbHelper, userInfo, ex); throw ex; } finally { dbHelper.Close(); } } // 写入调试信息 #if (DEBUG) BaseBusinessLogic.EndDebug(MethodBase.GetCurrentMethod(), milliStart); #endif return(returnValue); }