12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Data.SqlClient;
- using System.Linq;
- using System.Text;
- namespace HPSocketCS.Extended
- {
- [Serializable]
- public class SerSqlParameter
- {
- public SerSqlParameter(SqlParameter sPara)
- {
- this.paraName = sPara.ParameterName;
- this.paraLen = sPara.Size;
- this.paraVal = sPara.Value;
- this.sqlDbType = sPara.SqlDbType;
- this.Direction = sPara.Direction;
- }
- public SqlParameter ToSqlParameter()
- {
- SqlParameter para = new SqlParameter(this.paraName, this.sqlDbType, this.paraLen);
- para.Value = this.paraVal;
- para.Direction = this.Direction;
- return para;
- }
- private ParameterDirection direction = ParameterDirection.Input;
- public ParameterDirection Direction
- {
- get { return direction; }
- set { direction = value; }
- }
- private string paraName = "";
- public string ParaName
- {
- get { return this.paraName; }
- set { this.paraName = value; }
- }
- private int paraLen = 0;
- public int ParaLen
- {
- get { return this.paraLen; }
- set { this.paraLen = value; }
- }
- private object paraVal = null;
- public object ParaVal
- {
- get { return this.paraVal; }
- set { this.paraVal = value; }
- }
- private SqlDbType sqlDbType = SqlDbType.NVarChar;
- public SqlDbType SqlDbType
- {
- get { return this.sqlDbType; }
- set { this.sqlDbType = value; }
- }
- }
- }
|