📄 dataparameter.cs
字号:
using System;
using System.Data;
namespace Platform.Data {
public class DataParameter : IDbDataParameter, ICloneable {
private byte _Precision;
private byte _Scale;
private int _Size;
private DataRowVersion _SourceVersion;
private string _SourceColumn;
private string _ParameterName;
private object _Value;
private DbType _DbType;
private ParameterDirection _Direction;
public DataParameter() {
this.Direction = ParameterDirection.Input;
this.SourceVersion = DataRowVersion.Default;
}
public DataParameter(string parameterName, object value) : this() {
this.ParameterName = parameterName;
this.Value = value;
}
public byte Precision {
get { return _Precision; }
set { _Precision = value; }
}
public byte Scale {
get { return _Scale; }
set { _Scale = value; }
}
public int Size {
get { return _Size; }
set { _Size = value; }
}
public ParameterDirection Direction {
get { return _Direction; }
set { _Direction = value; }
}
public DbType DbType {
get { return _DbType; }
set { _DbType = value; }
}
public object Value {
get { return _Value; }
set { _Value = value; }
}
public bool IsNullable {
get { return false; }
}
public DataRowVersion SourceVersion {
get { return _SourceVersion; }
set { _SourceVersion = value; }
}
public string ParameterName {
get { return _ParameterName; }
set { _ParameterName = value; }
}
public string SourceColumn {
get { return _SourceColumn; }
set { _SourceColumn = value; }
}
public object Clone() {
DataParameter dp = new DataParameter(this.ParameterName, this.Value );
dp.Precision = this.Precision;
dp.Size = this.Size;
dp.Scale = this.Scale;
dp.SourceColumn = this.SourceColumn;
dp.SourceVersion = this.SourceVersion;
dp.Direction = this.Direction;
dp.DbType = this.DbType;
return dp;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -