username@email.com
2025-05-21 a980cd04341d71216e0f59bd4b7327fe9fc50032
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/**  
* EC_OrderDialogueExtend.cs
*
* 功 能: 订单申操作请扩展类
* 类 名: EC_OrderDialogueExtend
*
* Ver    变更日期             负责人  变更内容
* ───────────────────────────────────
* V0.01  2013-5-10 12:04:00   吴崎均  初版
* V0.02  2013-5-10 13:33      吴崎均  修改Visiter  修改创建时间(CreateTime)为提交时间(SubmitTime),增加答复时间(ReplyTime)、是否允许(IsAllow)、是否已执行(IsExecuted)
* V0.03  2013-5-10 16:02      吴崎均  修改Visiter  增加生效时间(ExecuteTime)
* V0.03  2013-5-10 16:19      吴崎均  修改Visiter  增加目标值(TargetValue)
*
*
*
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CY.Infrastructure.Common;
 
namespace CY.Model
{
    /// <summary>
    /// 订单申操作请扩展
    /// </summary>
    public partial class EC_OrderDialogue
    {
        #region ExtendProperties
 
        private EC_OrderBasic _order;
        /// <summary>
        /// 关联订单
        /// </summary>
        public EC_OrderBasic Order
        {
            get { _order = null == _order ? new EC_OrderBasic() : _order; return _order; }
            set { _order = value; }
        }
 
        private Sys_Dictionary _dialoguetype;
        /// <summary>
        /// 请求类型
        /// </summary>
        public Sys_Dictionary DialogueType     {
            get { _dialoguetype = null == _dialoguetype ? new Sys_Dictionary() : _dialoguetype; return _dialoguetype; }
            set { _dialoguetype = value; }
        }
        #endregion
 
        #region Visiter
 
        /// <summary>
        /// 属性访问器
        /// </summary>
        /// <param name="name">属性名</param>
        /// <param name="index">索引</param>
        /// <param name="isChange">是否将指定属性设置为传入值</param>
        /// <param name="value">需要赋予的值</param>
        /// <returns>与名称对应的属性值</returns>
        public object Visiter(string name, int? index = -1, bool isChange = false, object value = null)
        {
            object theValue = null;
 
            theValue = Order.Visiter(name, index, isChange, value);//快速访问
            if ("Keyid".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 1)
            {
                this.Keyid = isChange ? MyConvert.ConvertToGuid(value) : Keyid;
                theValue = this.Keyid;
            }
            else if ("InitiatorId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 2)
            {
                this.InitiatorId = isChange ? MyConvert.ConvertToGuid(value) : this.InitiatorId;
                theValue = this.InitiatorId;
            }
            else if ("InitiatorName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 3)
            {
                this.InitiatorName = isChange ? MyConvert.ConvertToString(value) : InitiatorName;
                theValue = this.InitiatorName;
            }
            else if ("ReceiverId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 4)
            {
                this.ReceiverId = isChange ? MyConvert.ConvertToGuid(value) : this.ReceiverId;
                theValue = this.ReceiverId;
            }
            else if ("ReceiverName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 5)
            {
                this.ReceiverName = isChange ? MyConvert.ConvertToString(value) : ReceiverName;
                theValue = this.ReceiverName;
            }
            else if ("DialogueTypeId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 6)
            {
                this.DialogueTypeId = isChange ? MyConvert.ConvertToInt32(value) : DialogueTypeId;
                theValue = this.DialogueTypeId;
            }
            else if ("TargetOrder".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 7)
            {
                this.TargetOrder = isChange ? MyConvert.ConvertToInt32(value) : TargetOrder;
                theValue = this.TargetOrder;
            }
            else if ("DialogueContent".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 8)
            {
                this.DialogueContent = isChange ? MyConvert.ConvertToString(value) : DialogueContent;
                theValue = this.DialogueContent;
            }
 
            else if ("SubmitTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 9)
            {
                this.SubmitTime = isChange ? MyConvert.ConvertToDateTime(value) : SubmitTime;
                theValue = this.SubmitTime;
            }
            else if ("ReplyTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 10)
            {
                this.ReplyTime = isChange ? MyConvert.ConvertToDateTime(value) : ReplyTime;
                theValue = this.ReplyTime;
            }
            else if ("IsAllow".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 11)
            {
                this.IsAllow = isChange ? MyConvert.ConvertToBoolean(value) : IsAllow;
                theValue = this.IsAllow;
            }
            else if ("IsExecuted".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 12)
            {
                this.IsExecuted = isChange ? MyConvert.ConvertToBoolean(value) : IsExecuted;
                theValue = this.IsExecuted;
            }
            else if ("ExecuteTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 13)
            {
                this.ExecuteTime = isChange ? MyConvert.ConvertToDateTime(value) : ExecuteTime;
                theValue = this.ExecuteTime;
            }
            else if ("TargetValue".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 14)
            {
                this.TargetValue = isChange ? MyConvert.ConvertToDecimal(value) : TargetValue;
                theValue = this.TargetValue;
            }
 
            #region 扩展属性处理
            else if ("DialogueTypeName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 30)
            {
                this.DialogueType.Name = isChange ? MyConvert.ConvertToString(value) : this.DialogueType.Name;
                theValue = this.DialogueType.Name;
            }
 
 
            #endregion
 
            return theValue;
        }
        #endregion
 
    }
}