/** * OA_CargoSpace.cs * * 功 能: N/A * 类 名: OA_CargoSpace * * Ver 变更日期 负责人 变更内容 * ─────────────────────────────────── * V0.01 2013-4-2 14:27:40 N/A 初版 * * * * * * */ using System; using CY.Infrastructure.Domain; using CY.Infrastructure.Common; namespace CY.Model { /// /// 办公系统货位 /// [Serializable] public partial class OA_CargoSpace : IAggregateRoot { public OA_CargoSpace() { } #region Model private int? _keyid; private Guid _memberid; private int? _warehouseid; private int? _length; private int? _width; private int? _height; private int? _statusid; private DateTime? _lastupdatetime; private string _operator; private string _remark; private string _Name; /// /// 编号 /// public int? Keyid { set { _keyid = value; } get { return _keyid; } } /// /// 会员编号 /// public Guid MemberId { set { _memberid = value; } get { return _memberid; } } /// /// 仓库编号 /// public int? WarehouseId { set { _warehouseid = value; } get { return _warehouseid; } } /// /// 长 /// public int? Length { set { _length = value; } get { return _length; } } /// /// 宽 /// public int? Width { set { _width = value; } get { return _width; } } /// /// 高 /// public int? Height { set { _height = value; } get { return _height; } } /// /// 状态 /// public int? StatusId { set { _statusid = value; } get { return _statusid; } } /// /// 最后修改时间 /// public DateTime? LastUpdateTime { set { _lastupdatetime = value; } get { return _lastupdatetime; } } /// /// 操作人 /// public string Operator { set { _operator = value; } get { return _operator; } } /// /// 备注 /// public string Remark { set { _remark = value; } get { return _remark; } } public string Name { set {_Name = value ;} get { return _Name; } } private int? _OrderNum; /// /// 排序字段 /// public int? OrderNum { get { return _OrderNum; } set { _OrderNum = value; } } #endregion Model #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 ("MemberId".Equals(name,StringComparison.CurrentCultureIgnoreCase) || index == 2) { this.MemberId = isChange ? MyConvert.ConvertToGuid(value) : this.MemberId; theValue = this.MemberId; } else if ("WarehouseId".Equals(name,StringComparison.CurrentCultureIgnoreCase) || index == 3) { this.WarehouseId = isChange ? MyConvert.ConvertToInt32(value) : WarehouseId; theValue = this.WarehouseId; } else if ("Length".Equals(name,StringComparison.CurrentCultureIgnoreCase) || index == 4) { this.Length = isChange ? MyConvert.ConvertToInt32(value) : Length; theValue = this.Length; } else if ("Width".Equals(name,StringComparison.CurrentCultureIgnoreCase) || index == 5) { this.Width = isChange ? MyConvert.ConvertToInt32(value) : Width; theValue = this.Width; } else if ("Height".Equals(name,StringComparison.CurrentCultureIgnoreCase) || index == 6) { this.Height = isChange ? MyConvert.ConvertToInt32(value) : Height; theValue = this.Height; } else if ("StatusId".Equals(name,StringComparison.CurrentCultureIgnoreCase) || index == 7) { this.StatusId = isChange ? MyConvert.ConvertToInt32(value) : StatusId; theValue = this.StatusId; } else if ("LastUpdateTime".Equals(name,StringComparison.CurrentCultureIgnoreCase) || index == 8) { this.LastUpdateTime = isChange ? MyConvert.ConvertToDateTime(value) : LastUpdateTime; theValue = this.LastUpdateTime; } else if ("Operator".Equals(name,StringComparison.CurrentCultureIgnoreCase) || index == 9) { this.Operator = isChange ? MyConvert.ConvertToString( value) : Operator; theValue = this.Operator; } else if ("Remark".Equals(name,StringComparison.CurrentCultureIgnoreCase) || index == 10) { this.Remark = isChange ? MyConvert.ConvertToString( value) : Remark; theValue = this.Remark; } else if ("Name".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 11) { this.Name = isChange ? MyConvert.ConvertToString(value) : Name; theValue = this.Name; } //扩展属性 #region else if ("WarehouseName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 12) { this.OA_WarehouseInfo.WarehouseName = isChange ? MyConvert.ConvertToString(value) : OA_WarehouseInfo.WarehouseName; theValue = this.OA_WarehouseInfo.WarehouseName; } else if ("CargoSpaceStatusName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 13) { this.CargoSpaceStatus.Name = isChange ? MyConvert.ConvertToString(value) : CargoSpaceStatus.Name; theValue = this.CargoSpaceStatus.Name; } else if ("OrderNum".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 14) { this.OrderNum = isChange ? MyConvert.ConvertToInt32(value) : OrderNum; theValue = this.OrderNum; } #endregion return theValue; } #endregion } }