SqlCommandBase.cs 增加输入输出参数
SqlCommandBase.cs 增加输入输出参数
扫一扫加作者微信
C# Code:
/// <summary>
/// 增加参数
/// </summary>
/// <param name="parameterName">参数名称,带@符号</param>
/// <param name="sqlDbType">SqlDbType类型</param>
/// <param name="value">值</param>
/// <param name="direction">输入/输出类型</param>
public void AddParam(string parameterName, SqlDbType sqlDbType, object value, ParameterDirection direction)
{
SqlParameter p = _cmd.Parameters.Add(parameterName, sqlDbType);
p.Value = value;
p.Direction = direction;
}
//来源:C/S框架网(www.csframework.com) QQ:1980854898
/// <summary>
/// 增加参数
/// </summary>
/// <param name="parameterName">参数名称,带@符号</param>
/// <param name="sqlDbType">SqlDbType类型</param>
/// <param name="value">值</param>
/// <param name="direction">输入/输出类型</param>
public void AddParam(string parameterName, SqlDbType sqlDbType, object value, ParameterDirection direction)
{
SqlParameter p = _cmd.Parameters.Add(parameterName, sqlDbType);
p.Value = value;
p.Direction = direction;
}
//来源:C/S框架网(www.csframework.com) QQ:1980854898
扫一扫加作者微信
版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
NewDoc C/S框架网