You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lj_plc/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Entity/SimplePmtRecipe.cs

78 lines
2.0 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Mesnac.Action.ChemicalWeighing.Entity
{
/// <summary>
/// 配方简单实体封装
/// </summary>
[Serializable]
public class SimplePmtRecipe
{
/// <summary>
/// ID
/// </summary>
public string ID { get; set; }
/// <summary>
/// 配方物料GUID
/// </summary>
public string MaterialGUID { get; set; }
/// <summary>
/// 配方物料代码
/// </summary>
public string RecipeMaterialCode { get; set; }
/// <summary>
/// 配方物料名称
/// </summary>
public string RecipeMaterialName { get; set; }
/// <summary>
/// 配方编码
/// </summary>
public string Recipe_Code { get; set; }
/// <summary>
/// 配方名称
/// </summary>
public string Recipe_Name { get; set; }
/// <summary>
/// 配方类型
/// </summary>
public string Recipe_type { get; set; }
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; }
private string _content = String.Empty;
/// <summary>
/// 内容
/// </summary>
public string Content
{
get { return _content; }
set { _content = value; }
}
public override string ToString()
{
if (String.IsNullOrEmpty(this._content))
{
if (String.IsNullOrEmpty(this.Version))
{
return String.Format("{0}({1})", this.RecipeMaterialName, this.Recipe_Name);
}
else
{
return String.Format("{0}({1})[{2}]", this.RecipeMaterialName, this.Recipe_Name, this.Version);
}
}
else
{
return this._content;
}
}
}
}