MchLenWeightEntity.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.IO;
  5. using System.Linq;
  6. using System.Runtime.Serialization;
  7. using System.Runtime.Serialization.Formatters.Binary;
  8. using System.Text;
  9. using Core.Mes.Client.Comm.Attribute;
  10. namespace Core.StlMes.Client.Mcp.Control.Entity
  11. {
  12. [Serializable]
  13. /// <summary>
  14. /// 数据库表MCH_LEN_WEIGHT所对应的实体类(生成工具:代码生成工具3.0)
  15. /// 作者:朱少波 时间:2018-12-06
  16. /// </summary>
  17. public class MchLenWeightEntity
  18. {
  19. public bool Chk { get; set; }
  20. /// <summary>
  21. /// 长度
  22. /// </summary>
  23. private decimal? actLen = null;
  24. /// <summary>
  25. /// 重量
  26. /// </summary>
  27. private decimal? actWeight = null;
  28. /// <summary>
  29. /// 支数
  30. /// </summary>
  31. private decimal? actCount = null;
  32. /// <summary>
  33. /// 长度
  34. /// </summary>
  35. [Description("总长度(m)")]
  36. [Nullable(true)]
  37. [DataLength(22)]
  38. public decimal? ActLen
  39. {
  40. get { return actLen; }
  41. set { actLen = value; }
  42. }
  43. /// <summary>
  44. /// 重量
  45. /// </summary>
  46. [Description("总重量(t)")]
  47. [Nullable(true)]
  48. [DataLength(22)]
  49. public decimal? ActWeight
  50. {
  51. get { return actWeight; }
  52. set { actWeight = value; }
  53. }
  54. /// <summary>
  55. /// 支数
  56. /// </summary>
  57. [Description("支数")]
  58. [Nullable(true)]
  59. [DataLength(22)]
  60. public decimal? ActCount
  61. {
  62. get { return actCount; }
  63. set { actCount = value; }
  64. }
  65. public MchLenWeightEntity Clone()
  66. {
  67. using (var memStream = new MemoryStream())
  68. {
  69. var binaryFormatter = new BinaryFormatter(null,
  70. new StreamingContext(StreamingContextStates.Clone));
  71. binaryFormatter.Serialize(memStream, this);
  72. memStream.Seek(0, SeekOrigin.Begin);
  73. return binaryFormatter.Deserialize(memStream) as MchLenWeightEntity;
  74. }
  75. }
  76. }
  77. }