12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace HPSocketCS.Extended
- {
- /// <summary>
- /// SQL请求数据处理类
- /// </summary>
- [Serializable]
- public class SQLHelperRequestData
- {
- public SQLHelperRequestData(){
-
- }
- public SQLHelperRequestData(HPSocketCS.Extended.SQLHelperRequestType rType)
- {
- this.RequestType = (int)rType;
- }
- private Int32 _RequestType;
- /// <summary>
- /// 数据请求类型
- /// </summary>
- public Int32 RequestType
- {
- get { return _RequestType; }
- set { _RequestType = value; }
- }
- List<SerSqlCommandItme> serSqlCommandList = new List<SerSqlCommandItme>();
- /// <summary>
- /// 请求命令集合
- /// </summary>
- public List<SerSqlCommandItme> SerSqlCommandList
- {
- get { return serSqlCommandList; }
- set { serSqlCommandList = value; }
- }
- /// <summary>
- /// 获取sql语句命令 如果SerSqlCommandList 集合中有多条命令时 取第一条
- /// </summary>
- public SerSqlCommandItme GetSerSqlCommand {
- get {
- if (serSqlCommandList.Count > 0)
- {
- return serSqlCommandList[0];
- }
- else {
- return new SerSqlCommandItme();
- }
- }
- }
- byte[] _AttachedData = null;
- /// <summary>
- /// 附加数据 暂无作用
- /// </summary>
- public byte[] AttachedData
- {
- get { return _AttachedData; }
- set { _AttachedData = value; }
- }
- string _AttachedMessage = "";
- /// <summary>
- /// 附加消息 暂无作用
- /// </summary>
- public string AttachedMessage
- {
- get { return _AttachedMessage; }
- set { _AttachedMessage = value; }
- }
- /// <summary>
- /// 将附加数据字节娄组转为对象
- /// </summary>
- /// <typeparam name="T"></typeparam>
- /// <returns></returns>
- public T AttachedDataToObject<T>()
- {
- try
- {
- return (T)HPSocketCS.Extended.DataSetSerializerDeserialize.ObjectDeserialize(this._AttachedData);
- }
- catch
- {
- return default(T);
- }
- }
- }
- }
|