/**
* EC_DemandQuoteExtend.cs
*
* 功 能: 需求报价实体扩展类
* 类 名: EC_DemandQuote
*
* Ver 变更日期 负责人 变更内容
* ───────────────────────────────────
* V0.01 2013-4-23 10:13:00 吴崎均 迁移Visiter到此类
* V0.02 2013-5-23 9:09 吴崎均 修改Visiter:增加需求报价、需求截止日期、需求状态对应部分
*
*
*
*
*
*/
using System;
using CY.Infrastructure.Domain;
using CY.Infrastructure.Common;
namespace CY.Model
{
///
/// 需求报价
///
public partial class EC_DemandQuote
{
#region ExtendProperties
private EC_MemberBasic _quoter = null;
///
/// 报价人(会员)
///
public EC_MemberBasic Quoter
{
get
{
_quoter = null == _quoter ? new EC_MemberBasic() : _quoter;
return _quoter;
}
set { _quoter = value; }
}
private EC_QuoteDemand _demand = null;
///
/// 报价需求
///
public EC_QuoteDemand Demand
{
get
{
_demand = null == _demand ? new EC_QuoteDemand() : _demand;
return _demand;
}
set { _demand = value; }
}
#endregion
#region Visiter
///
/// 属性访问器
///
/// 属性名
/// 索引
/// 是否将指定属性设置为传入值
/// 需要赋予的值
/// 与名称对应的属性值
public object Visiter(string name, int? index = -1, bool isChange = false, object value = null)
{
object theValue = null;
if ("Keyid".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 1)
{
this.Keyid = isChange ? MyConvert.ConvertToInt32(value) : Keyid;
theValue = this.Keyid;
}
else if ("DemandId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 2)
{
this.DemandId = isChange ? MyConvert.ConvertToInt32(value) : DemandId;
theValue = this.DemandId;
}
else if ("QuoteInfo".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 3)
{
this.QuoteInfo = isChange ? MyConvert.ConvertToString(value) : QuoteInfo;
theValue = this.QuoteInfo;
}
else if ("QuoteRemark".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 4)
{
this.QuoteRemark = isChange ? MyConvert.ConvertToString(value) : QuoteRemark;
theValue = this.QuoteRemark;
}
else if ("QuoteTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 5)
{
this.QuoteTime = isChange ? MyConvert.ConvertToDateTime(value) : QuoteTime;
theValue = this.QuoteTime;
}
else if ("QuoterId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 6)
{
this.QuoterId = isChange ? MyConvert.ConvertToGuid(value) : QuoterId;
theValue = this.QuoterId;
}
else if ("QuoterPrice".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 7)
{
this.QuoterPrice = isChange ? MyConvert.ConvertToDecimal(value) : QuoterPrice;
theValue = this.QuoterPrice;
}
#region 扩展属性处理
else if ("QuoterName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 7)
{
this.Quoter.Name = isChange ? MyConvert.ConvertToString(value) : this.Quoter.Name;
theValue = this.Quoter.Name;
}
else if ("DemandName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 8)
{
this.Demand.DemandName = isChange ? MyConvert.ConvertToString(value) : this.Demand.DemandName;
theValue = Demand.DemandName;
}
else if ("DemandEndTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 9)
{
this.Demand.EndTime = isChange ? MyConvert.ConvertToDateTime(value) : this.Demand.EndTime;
theValue = Demand.EndTime;
}
else if ("DemandStateName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 10)
{
this.Demand.StateType.Name = isChange ? MyConvert.ConvertToString(value) : this.Demand.StateType.Name;
theValue = Demand.StateType.Name;
}
#endregion
return theValue;
}
#endregion
}
}