using System; using System.Runtime.Serialization; namespace CY_DocumentSynchroWCFService { /// ///Document_WinInfo /// [DataContract] public partial class Document_WinInfo : IAggregateRoot { public Document_WinInfo() { } #region Model private int? _projectid; private int? _iswin; private decimal? _winprice; private string _firstwincompany; private decimal? _firstprice; private string _secondwincompany; private decimal? _secondprice; private string _thirdcompany; private decimal? _thirdprice; /// /// ProjectId /// [DataMember] public int? ProjectId { get { return _projectid; } set { _projectid = value; } } /// /// IsWin /// [DataMember] public int? IsWin { get { return _iswin; } set { _iswin = value; } } /// /// WinPrice /// [DataMember] public decimal? WinPrice { get { return _winprice; } set { _winprice = value; } } /// /// FirstWinCompany /// [DataMember] public string FirstWinCompany { get { return _firstwincompany; } set { _firstwincompany = value; } } /// /// FirstPrice /// [DataMember] public decimal? FirstPrice { get { return _firstprice; } set { _firstprice = value; } } /// /// SecondWinCompany /// [DataMember] public string SecondWinCompany { get { return _secondwincompany; } set { _secondwincompany = value; } } /// /// SecondPrice /// [DataMember] public decimal? SecondPrice { get { return _secondprice; } set { _secondprice = value; } } /// /// ThirdCompany /// [DataMember] public string ThirdCompany { get { return _thirdcompany; } set { _thirdcompany = value; } } /// /// ThirdPrice /// [DataMember] public decimal? ThirdPrice { get { return _thirdprice; } set { _thirdprice = value; } } #endregion Model #region Visiter /// /// 属性访问器 /// /// 属性名 /// 索引 /// 是否将指定属性设置为传入值 /// 需要赋予的值 /// 与名称对应的属性值 public object Visiter(string name, int? index = -1, bool isChange = false, object value = null) { object theValue = null; if ("ProjectId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 1) { this.ProjectId = isChange ? MyConvert.ConvertToInt(value) : ProjectId; theValue = this.ProjectId; } else if ("IsWin".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 2) { this.IsWin = isChange ? MyConvert.ConvertToInt(value) : IsWin; theValue = this.IsWin; } else if ("WinPrice".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 3) { this.WinPrice = isChange ? MyConvert.ConvertToDecimal(value) : WinPrice; theValue = this.WinPrice; } else if ("FirstWinCompany".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 4) { this.FirstWinCompany = isChange ? MyConvert.ConvertToString(value) : FirstWinCompany; theValue = this.FirstWinCompany; } else if ("FirstPrice".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 5) { this.FirstPrice = isChange ? MyConvert.ConvertToDecimal(value) : FirstPrice; theValue = this.FirstPrice; } else if ("SecondWinCompany".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 6) { this.SecondWinCompany = isChange ? MyConvert.ConvertToString(value) : SecondWinCompany; theValue = this.SecondWinCompany; } else if ("SecondPrice".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 7) { this.SecondPrice = isChange ? MyConvert.ConvertToDecimal(value) : SecondPrice; theValue = this.SecondPrice; } else if ("ThirdCompany".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 8) { this.ThirdCompany = isChange ? MyConvert.ConvertToString(value) : ThirdCompany; theValue = this.ThirdCompany; } else if ("ThirdPrice".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 9) { this.ThirdPrice = isChange ? MyConvert.ConvertToDecimal(value) : ThirdPrice; theValue = this.ThirdPrice; } return theValue; } #endregion Visiter } }