IOInfo.cs
1.5 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
using System;
namespace Model
{
public class IOInfo
{
public string Name { private set; get; }
public string Type { private set; get; }
public int Address { private set; get; }
public string Key { private set; get; }
public bool State { set; get; }
public DateTime FinalDate { private set; get; }
public IOInfo(string name, string type, string address, string key)
{
Name = name;
Type = type.ToUpper();
Address = Convert.ToInt32(address);
Key = key;
State = false;
FinalDate = DateTime.Now;
}
public string ToText()
{
return string.Format("{0},{1},{2:yyyy-MM-dd HH:mm:ss}", Key, State, FinalDate);
}
}
public class LineIOInfo
{
public string Name { private set; get; }
public string IP { private set; get; }
public int Address { private set; get; }
public string Key { private set; get; }
public bool LineCall { set; get; }
public bool ShelfExist { set; get; }
public DateTime FinalDate { set; get; }
public LineIOInfo(string name, string ip, string address, string key)
{
Name = name;
IP = ip;
Address = Convert.ToInt32(address);
Key = key;
LineCall = false;
ShelfExist = true;
FinalDate = DateTime.Now;
}
}
}