SVN r695
SVN-Revision: r695
This commit is contained in:
@@ -542,6 +542,63 @@ namespace Lskj.Business.Impl
|
||||
tipMsg = pMsg.Value + "";
|
||||
return Convert.ToInt32(returnValue.Value.ToString());
|
||||
}
|
||||
/// <summary>
|
||||
/// 调用存储过程 p_UpdateRemarkByModule —— 按模块编号修改备注
|
||||
/// </summary>
|
||||
/// <param name="modid">模块编号(如 “1000101”)</param>
|
||||
/// <param name="keyvalue">主键值</param>
|
||||
/// <param name="remark">备注内容</param>
|
||||
/// <param name="tipMsg">OUTPUT:返回信息</param>
|
||||
/// <returns>0=成功;1=未识别模块;9=异常</returns>
|
||||
public static int UpdateRemarkByModule(string modid,
|
||||
string keyvalue,
|
||||
string remark,
|
||||
out string tipMsg)
|
||||
{
|
||||
/* ========== 1. 组织参数 ========== */
|
||||
|
||||
// 输出消息(NVarChar / VarChar 二选一)
|
||||
SqlParameter pMsg = ERPInfo.Instance.ChangeParameterType
|
||||
? new SqlParameter("@outmsg", SqlDbType.NVarChar, 4000)
|
||||
: new SqlParameter("@outmsg", SqlDbType.VarChar, 4000);
|
||||
pMsg.Direction = ParameterDirection.InputOutput;
|
||||
|
||||
// RETURN
|
||||
SqlParameter returnValue = new SqlParameter("@return", SqlDbType.Int)
|
||||
{
|
||||
Direction = ParameterDirection.ReturnValue
|
||||
};
|
||||
|
||||
SqlParameter[] param =
|
||||
{
|
||||
new SqlParameter("@modid", SqlDbType.VarChar, 50),
|
||||
new SqlParameter("@keyvalue", SqlDbType.VarChar, 100),
|
||||
ERPInfo.Instance.ChangeParameterType
|
||||
? new SqlParameter("@remark", SqlDbType.NVarChar, 4000)
|
||||
: new SqlParameter("@remark", SqlDbType.VarChar, 4000),
|
||||
pMsg,
|
||||
returnValue
|
||||
};
|
||||
|
||||
param[0].Value = modid;
|
||||
param[1].Value = keyvalue;
|
||||
param[2].Value = remark ?? string.Empty;
|
||||
param[3].Value = string.Empty; // 初始 @outmsg
|
||||
|
||||
/* ========== 2. 执行存储过程 ========== */
|
||||
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
CommandType.StoredProcedure,
|
||||
"p_UpdateRemarkByModule",
|
||||
param);
|
||||
|
||||
/* ========== 3. 返回处理 ========== */
|
||||
|
||||
tipMsg = pMsg.Value?.ToString() ?? string.Empty;
|
||||
return Convert.ToInt32(returnValue.Value);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:更新表记录</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
|
||||
Reference in New Issue
Block a user