using System; using System.Collections.Generic; using System.ComponentModel; using System.IO; using System.Linq; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using System.Text; using Core.Mes.Client.Comm.Attribute; namespace Core.StlMes.Client.Mcp.Control.Entity { [Serializable] /// /// 数据库表MCH_LEN_WEIGHT所对应的实体类(生成工具:代码生成工具3.0) /// 作者:朱少波 时间:2018-12-06 /// public class MchLenWeightEntity { public bool Chk { get; set; } /// /// 长度 /// private decimal? actLen = null; /// /// 重量 /// private decimal? actWeight = null; /// /// 支数 /// private decimal? actCount = null; /// /// 长度 /// [Description("总长度(m)")] [Nullable(true)] [DataLength(22)] public decimal? ActLen { get { return actLen; } set { actLen = value; } } /// /// 重量 /// [Description("总重量(t)")] [Nullable(true)] [DataLength(22)] public decimal? ActWeight { get { return actWeight; } set { actWeight = value; } } /// /// 支数 /// [Description("支数")] [Nullable(true)] [DataLength(22)] public decimal? ActCount { get { return actCount; } set { actCount = value; } } public MchLenWeightEntity Clone() { using (var memStream = new MemoryStream()) { var binaryFormatter = new BinaryFormatter(null, new StreamingContext(StreamingContextStates.Clone)); binaryFormatter.Serialize(memStream, this); memStream.Seek(0, SeekOrigin.Begin); return binaryFormatter.Deserialize(memStream) as MchLenWeightEntity; } } } }