/** * OA_Inventory.cs * * 功 能: N/A * 类 名: OA_Inventory * * Ver 变更日期 负责人 变更内容 * ─────────────────────────────────── * V0.01 2013-4-2 14:27:53 N/A 初版 * * * * * * */ using System; using CY.Infrastructure.Domain; using CY.Infrastructure.Common; namespace CY.Model { /// /// 办公系统库存表 /// [Serializable] public partial class OA_Inventory : IAggregateRoot { public OA_Inventory() { } #region Model private int? _keyid; private Guid _firmid; private int? _cargospaceid; private int? _goodsid; private int? _warehouseid; private int? _inventorycount; private DateTime? _lastupdatetime; private string _operator; private string _remark; private string _GoodsName; private string _WarehouseName; private string _CargoSpaceName; private string _BrandName; /// /// 品牌 /// public string BrandName { get { return _BrandName; } set { _BrandName = value; } } private string _SpecificationName; /// /// 规格名称 /// public string SpecificationName { get { return _SpecificationName; } set { _SpecificationName = value; } } private string _CommodityName; /// /// 类别 /// public string CommodityName { get { return _CommodityName; } set { _CommodityName = value; } } private int? _IsPaper; /// /// 是否纸张 /// public int? IsPaper { get { return _IsPaper; } set { _IsPaper = value; } } /// /// 货品名称 /// public string GoodsName { get { return _GoodsName; } set { _GoodsName = value; } } /// /// 仓库名称 /// public string WarehouseName { get { return _WarehouseName; } set { _WarehouseName = value; } } /// /// 货位名称 /// public string CargoSpaceName { get { return _CargoSpaceName; } set { _CargoSpaceName = value; } } /// /// 库存编号 /// public int? Keyid { set { _keyid = value; } get { return _keyid; } } /// /// 所属厂商 /// public Guid FirmId { set { _firmid = value; } get { return _firmid; } } /// /// 货位编号 /// public int? CargoSpaceId { set { _cargospaceid = value; } get { return _cargospaceid; } } /// /// 货品编号 /// public int? GoodsId { set { _goodsid = value; } get { return _goodsid; } } /// /// 仓库编号 /// public int? WarehouseId { set { _warehouseid = value; } get { return _warehouseid; } } /// /// 剩余库存 /// public int? InventoryCount { set { _inventorycount = value; } get { return _inventorycount; } } /// /// 最后修改时间 /// 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 decimal? UnitPrice { set; get; } /// /// 总价 /// public decimal? TotalPrice { set; get; } /// /// 令数 /// public double? LingShu { set; get; } /// /// 吨数 /// public double? DunShu { set; get; } /// /// 规格名称 /// private string _SpeceicationName; public string SpeceicationName { get { return _SpeceicationName; } set { _SpeceicationName = value; } } /// /// 克重 /// private string _PaperWeightName; public string PaperWeightName { get { return _PaperWeightName; } set { _PaperWeightName = value; } } /// /// 规格Id /// private int? _SpecificationId; public int? SpecificationId { get { return _SpecificationId; } set { _SpecificationId = value; } } /// /// 克重ID /// private int? _PaperWeightId; public int? PaperWeightId { get { return _PaperWeightId; } set { _PaperWeightId = value; } } /// /// 品牌ID /// private int? _BrandId; public int? BrandId { get { return _BrandId; } set { _BrandId = 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 ("FirmId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 2) { this.FirmId = isChange ? MyConvert.ConvertToGuid(value) : this.FirmId; theValue = this.FirmId; } else if ("CargoSpaceId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 3) { this.CargoSpaceId = isChange ? MyConvert.ConvertToInt32(value) : CargoSpaceId; theValue = this.CargoSpaceId; } else if ("GoodsId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 4) { this.GoodsId = isChange ? MyConvert.ConvertToInt32(value) : GoodsId; theValue = this.GoodsId; } else if ("WarehouseId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 5) { this.WarehouseId = isChange ? MyConvert.ConvertToInt32(value) : WarehouseId; theValue = this.WarehouseId; } else if ("InventoryCount".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 6) { this.InventoryCount = isChange ? MyConvert.ConvertToInt32(value) : InventoryCount; theValue = this.InventoryCount; } else if ("LastUpdateTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 7) { this.LastUpdateTime = isChange ? MyConvert.ConvertToDateTime(value) : LastUpdateTime; theValue = this.LastUpdateTime; } else if ("Operator".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 8) { this.Operator = isChange ? MyConvert.ConvertToString(value) : Operator; theValue = this.Operator; } else if ("Remark".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 9) { this.Remark = isChange ? MyConvert.ConvertToString(value) : Remark; theValue = this.Remark; } else if ("GoodsName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 10) { this.GoodsName = isChange ? MyConvert.ConvertToString(value) : GoodsName; theValue = this.GoodsName; } else if ("CargoSpaceName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 11) { this.CargoSpaceName = isChange ? MyConvert.ConvertToString(value) : CargoSpaceName; theValue = this.CargoSpaceName; } else if ("WarehouseName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 12) { this.WarehouseName = isChange ? MyConvert.ConvertToString(value) : WarehouseName; theValue = this.WarehouseName; } else if ("CommodityName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 13) { this.CommodityName = isChange ? MyConvert.ConvertToString(value) : CommodityName; theValue = this.CommodityName; } else if ("BrandName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 14) { this.BrandName = isChange ? MyConvert.ConvertToString(value) : BrandName; theValue = this.BrandName; } else if ("SpecificationName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 15) { this.SpecificationName = isChange ? MyConvert.ConvertToString(value) : SpecificationName; theValue = this.SpecificationName; } else if ("IsPaper".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 16) { this.IsPaper = isChange ? MyConvert.ConvertToInt32(value) : IsPaper; theValue = this.IsPaper; } else if ("SpecificationId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 18) { this.SpecificationId = isChange ? MyConvert.ConvertToInt32(value) : SpecificationId; theValue = this.SpecificationId; } else if ("PaperWeightId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 19) { this.PaperWeightId = isChange ? MyConvert.ConvertToInt32(value) : PaperWeightId; theValue = this.PaperWeightId; } else if ("BrandId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 20) { this.BrandId = isChange ? MyConvert.ConvertToInt32(value) : BrandId; theValue = this.BrandId; } else if ("PaperWeightName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 21) { this.PaperWeightName = isChange ? MyConvert.ConvertToString(value) : PaperWeightName; theValue = this.PaperWeightName; } else if ("SpeceicationName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 23) { this.SpeceicationName = isChange ? MyConvert.ConvertToString(value) : SpeceicationName; theValue = this.SpeceicationName; } else if ("UnitPrice".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 24) { this.UnitPrice = isChange ? MyConvert.ConvertToDecimal(value) : UnitPrice; theValue = this.UnitPrice; } else if ("TotalPrice".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 25) { this.TotalPrice = isChange ? MyConvert.ConvertToDecimal(value) : TotalPrice; theValue = this.TotalPrice; } else if ("LingShu".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 26) { this.LingShu = isChange ? MyConvert.ConvertToDouble(value) : LingShu; theValue = this.LingShu; } else if ("DunShu".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 27) { this.DunShu = isChange ? MyConvert.ConvertToDouble(value) : DunShu; theValue = this.DunShu; } return theValue; } #endregion } }