/// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="ids">主键数组</param>
        /// <returns>影响行数</returns>
        public int BatchDeleteUserOrganization(BaseUserInfo userInfo, string[] ids)
        {
            var result = 0;

            var parameter = ServiceInfo.Create(userInfo, MethodBase.GetCurrentMethod());

            ServiceUtil.ProcessUserCenterWriteDb(userInfo, parameter, (dbHelper) =>
            {
                var userOrganizationManager = new BaseUserOrganizationManager(dbHelper, userInfo);
                result = userOrganizationManager.Delete(ids);
            });
            return(result);
        }
        /// <summary>
        /// 获得用户的组织机构兼职情况
        /// </summary>
        /// <param name="userInfo">用户信息</param>
        /// <param name="userId">用户主键</param>
        /// <returns>数据表</returns>
        public DataTable GetUserOrganizationDT(BaseUserInfo userInfo, string userId)
        {
            var dt = new DataTable(BaseUserOrganizationEntity.CurrentTableName);

            var parameter = ServiceInfo.Create(userInfo, MethodBase.GetCurrentMethod());

            ServiceUtil.ProcessUserCenterReadDb(userInfo, parameter, (dbHelper) =>
            {
                var userOrganizationManager = new BaseUserOrganizationManager(dbHelper, userInfo);
                dt           = userOrganizationManager.GetUserOrganization(userId);
                dt.TableName = BaseUserOrganizationEntity.CurrentTableName;
            });

            return(dt);
        }
        /// <summary>
        /// 把用户添加到组织机构
        /// </summary>
        /// <param name="userInfo">用户</param>
        /// <param name="entity">用户组织机构关系</param>
        /// <param name="status">状态</param>
        /// <param name="statusMessage">状态信息</param>
        /// <returns>主键</returns>
        public string AddUserToOrganization(BaseUserInfo userInfo, BaseUserOrganizationEntity entity, out Status status, out string statusMessage)
        {
            var returnCode    = Status.Ok;
            var returnMessage = string.Empty;
            var result        = string.Empty;

            var parameter = ServiceInfo.Create(userInfo, MethodBase.GetCurrentMethod());

            ServiceUtil.ProcessUserCenterWriteDb(userInfo, parameter, (dbHelper) =>
            {
                var userOrganizationManager = new BaseUserOrganizationManager(dbHelper, userInfo);
                result        = userOrganizationManager.Add(entity, out returnCode);
                returnMessage = userOrganizationManager.GetStateMessage(returnCode);
            });
            status        = returnCode;
            statusMessage = returnMessage;
            return(result);
        }