步步为盈
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

138 lines
3.9 KiB

2 years ago
using System;
2 years ago
using System.Text;
2 years ago
namespace BBWY.Client.Models
{
/// <summary>
/// 合格证
/// </summary>
public class CertificateModel : NotifyObject
{
/// <summary>
/// 合格证id
/// </summary>
public long Id { get; set; }
2 years ago
/// <summary>
/// skuid
/// </summary>
public string SkuId { get; set; }
2 years ago
private string spuId;
/// <summary>
/// 品牌
/// </summary>
public string SpuId { get => spuId; set { Set(ref spuId, value); } }
2 years ago
private string brand;
/// <summary>
/// 品牌
/// </summary>
public string Brand { get => brand; set { Set(ref brand, value); } }
private string brandName;
/// <summary>
/// 品名
/// </summary>
public string BrandName { get => brandName; set { Set(ref brandName, value); } }
private string shader;
/// <summary>
/// 材质
/// </summary>
public string Shader { get => shader; set { Set(ref shader, value); } }
private string excuteStander;
/// <summary>
/// 执行标准
/// </summary>
2 years ago
public string ExcuteStander { get => excuteStander; set {
Set(ref excuteStander, value);
GetExcuteStanderFormat();
} }
private string excuteStanderFormat;
/// <summary>
/// 执行标准 (,=>换行)
/// </summary>
public string ExcuteStanderFormat { get => excuteStanderFormat; set { Set(ref excuteStanderFormat, value); } }
2 years ago
private string productShop;
/// <summary>
/// 生产商
/// </summary>
public string ProductShop { get => productShop; set { Set(ref productShop, value); } }
private string productAdress;
/// <summary>
/// 地址
/// </summary>
public string ProductAdress { get => productAdress; set { Set(ref productAdress, value); } }
private string productNo;
/// <summary>
/// 型号(货号)
/// </summary>
public string ProductNo { get => productNo; set { Set(ref productNo, value); } }
/// <summary>
/// 生产日期
/// </summary>
public DateTime ProductDate { get; set; }
/// <summary>
/// 经销商
/// </summary>
public string Reseller { get; set; }
private int isLogo;
/// <summary>
/// 是否含3cLogo(0没有 ,1有)
/// </summary>
public int IsLogo { get => isLogo; set { Set(ref isLogo, value); } }
private string factoryNumber;
/// <summary>
/// 工厂编号
/// </summary>
public string FactoryNumber { get => factoryNumber; set { Set(ref factoryNumber, value); } }
2 years ago
private string applyAge;
/// <summary>
/// 适用年龄
/// </summary>
public string ApplyAge { get => applyAge; set { Set(ref applyAge, value); } }
2 years ago
private CertificateLabelModel labelModel;
public CertificateLabelModel LabelModel { get => labelModel; set { Set(ref labelModel, value); } }
2 years ago
void GetExcuteStanderFormat()
{
StringBuilder sb = new StringBuilder();
if (this.ExcuteStander.Contains(","))//有逗号就拆分
{
var excutes = this.ExcuteStander.Split(',', StringSplitOptions.RemoveEmptyEntries);
for (int i = 0; i < excutes.Length; i++)
{
if (i % 2 == 0 && i > 0)//间隔两个换行
{
sb.Append("\r\n");
}
sb.Append(excutes[i]).Append(" ");
}
sb.Remove(sb.Length - 3, 3);
this.ExcuteStanderFormat = sb.ToString();
return;
}
this.ExcuteStanderFormat = ExcuteStander;
}
2 years ago
}
}