-
Notifications
You must be signed in to change notification settings - Fork 0
/
DataItemType.cs
79 lines (73 loc) · 2.25 KB
/
DataItemType.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Com.Ddlev.Data
{
/// <summary>
/// 对应存贮过程的数据类型
/// </summary>
public class DataItemType:IDataPara
{
public string DataItemName
{
set; get;
}
/// <summary>
/// 变量对应的值
/// </summary>
public object DataItemValue
{
set; get;
}
/// <summary>
/// 参数的类型(output)
/// </summary>
public ParameterDirection DBParameterDirection
{
set; get;
}
/// <summary>
/// 指定数据库类型
/// </summary>
public DbType DbType
{
set; get;
}
/// <summary>
/// 参数类型的长度(output 参数必填)
/// </summary>
public int SizeLength
{
set; get;
}
public DataItemType() { }
/// <summary>
/// 初始化
/// </summary>
/// <param name="DataItemName_">对应存贮过程的变量(如"@ID")</param>
/// <param name="DataValue_">变量对应的值</param>
public DataItemType(string DataItemName_, dynamic DataItemValue_)
{
this.DataItemName = DataItemName_;
this.DataItemValue = DataItemValue_;
this.DBParameterDirection = ParameterDirection.Input;
}
/// <summary>
/// 有output参数使用
/// </summary>
/// <param name="DataItemName_">output参数或者return参数</param>
/// <param name="DBParameterDirection_">参数类型(output)</param>
/// <param name="DbType_">类型</param>
/// <param name="size_">类型的长度 (int类型为4)</param>
public DataItemType(string DataItemName_, ParameterDirection DBParameterDirection_, DbType DbType_, int size_)
{
this.DataItemName = DataItemName_;
this.DBParameterDirection = DBParameterDirection_;
this.DbType = DbType_;
this.SizeLength = size_;
}
}
}