/// <summary> /// 设置用户密码 /// </summary> /// <param name="userInfo">用户</param> /// <param name="userIds">被设置的员工主键列表</param> /// <param name="password">新密码</param> /// <param name="returnStatusCode">返回状态码</param> /// <param name="returnStatusMessage">返回状消息</param> /// <returns>影响行数</returns> public int SetPassword(UserInfo userInfo, string[] userIds, string password, out string returnStatusCode, out string returnStatusMessage) { int returnValue = 0; string returnCode = string.Empty; string returnMessage = string.Empty; var parameter = ParameterUtil.CreateWithMessage(userInfo, MethodBase.GetCurrentMethod(), this.serviceName, RDIFrameworkMessage.LogOnService_SetPassword); ServiceUtil.ProcessRDIReadDb(userInfo, parameter, dbProvider => { var userManager = new PiUserManager(dbProvider, userInfo); returnValue = userManager.BatchSetPassword(userIds, password); returnCode = userManager.ReturnStatusCode; // 获得状态消息 returnMessage = userManager.GetStateMessage(returnCode); }); returnStatusCode = returnCode; returnStatusMessage = returnMessage; return(returnValue); }