/////////////////////////////////////////////////////////////////
//
// (C) Copyright 2013, Kenneth, Inc.
// All rights reserved. Confidential. Except as pursuant
// to a written agreement with Kenneth, this software may
// not be used or distributed. This software may be covered
// by one or more patents.
//
// 本软件为Kenneth开发,版权所有,违者必究,320325198102218110,23810511@qq.com
//
/////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Data;
using System.Reflection;
using GummingCommon;
namespace GummingEntity
{
public enum WarningType
{
SYS = 1,
AS = 2,
Temperature = 3,
DoorOpened = 4,
Ye = 5,
Other = 6,
}
public enum WarnNodeType
{
IO = 1,
}
public enum WarnActionType
{
ALM = 1,
WRM = 2,
STOP = 3
}
///
/// HardWarning
///
[Serializable]
public partial class HardWarningEntity : ViewModelBase, ICloneable
{
///
///
///
private string _RecId;
public string RecId
{
get { return _RecId; }
set
{
_RecId = value;
OnPropertyChanged("RecId");
}
}
private string _StationCode;
public string StationCode
{
get { return _StationCode; }
set
{
_StationCode = value;
OnPropertyChanged("StationCode");
}
}
///
/// 报警类型
///
private int _WarningType;
public int WarningType
{
get { return _WarningType; }
set
{
_WarningType = value;
OnPropertyChanged("WarningType");
}
}
///
/// 硬件类型
///
private int? _NodeType;
public int? NodeType
{
get { return _NodeType; }
set
{
_NodeType = value;
OnPropertyChanged("NodeType");
}
}
///
/// 关联端口
///
private string _RefPort;
public string RefPort
{
get { return _RefPort; }
set
{
_RefPort = value;
OnPropertyChanged("RefPort");
}
}
///
/// 报警信号
///
private int? _BitNo;
public int? BitNo
{
get { return _BitNo; }
set
{
_BitNo = value;
OnPropertyChanged("BitNo");
}
}
///
/// 间隔时间
///
private int _DoubleCheckTime;
public int DoubleCheckTime
{
get { return _DoubleCheckTime; }
set
{
_DoubleCheckTime = value;
OnPropertyChanged("DoubleCheckTime");
}
}
///
/// 报警动作
///
private int _ActionType;
public int ActionType
{
get { return _ActionType; }
set
{
_ActionType = value;
OnPropertyChanged("ActionType");
}
}
///
/// 关联设置
///
private string _RefSetting;
public string RefSetting
{
get { return _RefSetting; }
set
{
_RefSetting = value;
OnPropertyChanged("RefSetting");
}
}
///
/// 报警编号
///
private string _WarningCode;
public string WarningCode
{
get { return _WarningCode; }
set
{
_WarningCode = value;
OnPropertyChanged("WarningCode");
}
}
///
/// 报警名称
///
private string _WarningName;
public string WarningName
{
get { return _WarningName; }
set
{
_WarningName = value;
OnPropertyChanged("WarningName");
}
}
///
///
///
private int? _OrderBy;
public int? OrderBy
{
get { return _OrderBy; }
set
{
_OrderBy = value;
OnPropertyChanged("OrderBy");
}
}
///
///
///
private string _CreateBy;
public string CreateBy
{
get { return _CreateBy; }
set
{
_CreateBy = value;
OnPropertyChanged("CreateBy");
}
}
///
///
///
private DateTime? _CreateTime;
public DateTime? CreateTime
{
get { return _CreateTime; }
set
{
_CreateTime = value;
OnPropertyChanged("CreateTime");
}
}
///
///
///
private string _ModifyBy;
public string ModifyBy
{
get { return _ModifyBy; }
set
{
_ModifyBy = value;
OnPropertyChanged("ModifyBy");
}
}
///
///
///
private DateTime? _ModifyTime;
public DateTime? ModifyTime
{
get { return _ModifyTime; }
set
{
_ModifyTime = value;
OnPropertyChanged("ModifyTime");
}
}
///
///
///
private int? _IsActive;
public int? IsActive
{
get { return _IsActive; }
set
{
_IsActive = value;
OnPropertyChanged("IsActive");
}
}
public object Clone()
{
HardWarningEntity obj = new HardWarningEntity();
Type t = this.GetType();
PropertyInfo[] properties = t.GetProperties();
foreach (PropertyInfo pi in properties)
{
if (pi.CanWrite)
{
object value = pi.GetValue(this, null);
if (obj.GetType().GetProperty(pi.Name) != null)
{
pi.SetValue(obj, value, null);
}
}
}
return obj;
}
}
}