public AcctRole TheAcctRole
{
get
{
//在get获取属性值时,如果属性没有值,就为其供值(在if判断中)
if ((this._theAcctRole == null) && (this._acctRoleCd != null))
{
this._theAcctRole = AcctRole.GetAcctRole(this._acctRoleCd, new object[] { AcctRoleFetch.Basic });
this._theAcctRole.MarkAsSubordinate();
}
//返回属性值,在前面加上if后,无论属性有无值,皆会得到有值的属性值
return this._theAcctRole;
}
set
{
if (this._theAcctRole != value)
{
if (!base.IsNew && (this._acctRoleCd != value.AcctRoleCd))
{
throw new CoreBusinessException(99999L, "The {0} property can only change when creating a new {1} object.", new string[] { "TheAcctRole", "AcctAcctRoleOrg" });
}
this._theAcctRole = value;
this.AddAuditEntry("_acctRoleCd", this._acctRoleCd, (value == null) ? null : value.AcctRoleCd);
this._acctRoleCd = (value == null) ? null : value.AcctRoleCd;
base.MarkDirty();
}
}
}