/** * OA_StaffRoleRel.cs * * 功 能: N/A * 类 名: OA_StaffRoleRel * * Ver 变更日期 负责人 变更内容 * ─────────────────────────────────── * V0.01 2013-4-2 14:28:01 N/A 初版 * * * * * * */ using System; using CY.Infrastructure.Domain; using CY.Infrastructure.Common; namespace CY.Model { /// /// 办公系统员工角色关系表 /// [Serializable] public partial class OA_StaffRoleRel : IAggregateRoot { public OA_StaffRoleRel() { } #region Model private Guid _firmid; private int? _staffid; private int? _roleid; /// /// 所属厂商编号 /// public Guid FirmId { set { _firmid = value; } get { return _firmid; } } /// /// 员工编号 /// public int? StaffId { set { _staffid = value; } get { return _staffid; } } /// /// 角色编号 /// public int? RoleId { set { _roleid = value; } get { return _roleid; } } #endregion Model #region Visiter /// /// 属性访问器 /// /// 属性名 /// 索引 /// 是否将指定属性设置为传入值 /// 需要赋予的值 /// 与名称对应的属性值 public object Visiter(string name, int? index = -1, bool isChange = false, object value = null) { object theValue = null; if ("FirmId".Equals(name,StringComparison.CurrentCultureIgnoreCase) || index == 1) { this.FirmId = isChange ? MyConvert.ConvertToGuid(value) : this.FirmId; theValue = this.FirmId; } else if ("StaffId".Equals(name,StringComparison.CurrentCultureIgnoreCase) || index == 2) { this.StaffId = isChange ? MyConvert.ConvertToInt32(value) : StaffId; theValue = this.StaffId; } else if ("RoleId".Equals(name,StringComparison.CurrentCultureIgnoreCase) || index == 3) { this.RoleId = isChange ? MyConvert.ConvertToInt32(value) : RoleId; theValue = this.RoleId; } return theValue; } #endregion } }