Label_LZ.cs
2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
/// <summary>
/// 立臻标签
/// </summary>
public class Label_LZ
{
public Label_LZ(string liaohao, string mianbie, string jitai, string line, string slot = "slot", string subslot = "subslot")
{
this.pn = $"料 号:{liaohao}";
this.side = $"{mianbie}";
this.line = $"线 别:{line} /{this.side}";
this.station = $"机 台:{jitai}";
this.slot = $"站 别:{slot}{subslot}";
this.shijian = $"时 间:{DateTime.Now.ToString()}";
}
public Label_LZ() { }
public string barcode { get; set; } = "";
public string pn { get; set; } = "";
public string line { get; set; } = "";
/// <summary>
/// 站位
/// </summary>
public string slot { get; set; }
/// <summary>
/// 点位
/// </summary>
public string subslot { get; set; }
/// <summary>
/// 线别
/// </summary>
public string side { get; set; } = "";
/// <summary>
/// 机台
/// </summary>
public string station { get; set; } = "";
/// <summary>
/// 时间
/// </summary>
public string shijian { get; set; } = "";
/// <summary>
/// 需求单
/// </summary>
public string hSerial { get; set; } = "";
public string ToStr()
{
return $"二维码:{barcode},需求单:{hSerial},料号:{pn},机台:{station},面别:{side},线别:{line},站位:{slot},点位:{subslot}";
}
/// <summary>
/// 拷贝一个新的实例
/// </summary>
/// <returns></returns>
public Label_LZ ToCopy()
{
Label_LZ posInfo = new Label_LZ();
System.Reflection.PropertyInfo[] info1 = posInfo.GetType().GetProperties();
System.Reflection.PropertyInfo[] info2 = this.GetType().GetProperties();
for (int i = 0; i < info1.Length; i++)
info1[i].SetValue(posInfo, info2[i].GetValue(this));
return posInfo;
}
}
}