///////////////////////////////////////////////////////////////// // // (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 { /// /// HardAction /// [Serializable] public partial class HardActionEntity : ViewModelBase, ICloneable { /// /// /// private string _RecId; public string RecId { get { return _RecId; } set { _RecId = value; OnPropertyChanged("RecId"); } } /// /// 工位类型 /// private int? _StationType; public int? StationType { get { return _StationType; } set { _StationType = value; OnPropertyChanged("StationType"); } } /// /// 卡号 /// private ushort _CardNo; public ushort CardNo { get { return _CardNo; } set { _CardNo = value; OnPropertyChanged("CardNo"); } } /// /// NodeId /// private ushort _NodeId; public ushort NodeId { get { return _NodeId; } set { _NodeId = value; OnPropertyChanged("NodeId"); } } /// /// SlotId /// private ushort _SlotId; public ushort SlotId { get { return _SlotId; } set { _SlotId = value; OnPropertyChanged("SlotId"); } } /// /// BitNo /// private ushort _BitNo; public ushort BitNo { get { return _BitNo; } set { _BitNo = value; OnPropertyChanged("BitNo"); } } /// /// 动作类型 /// private int? _ActionType; public int? ActionType { get { return _ActionType; } set { _ActionType = value; OnPropertyChanged("ActionType"); } } /// /// 动作表达式 /// private string _Expression; public string Expression { get { return _Expression; } set { _Expression = value; OnPropertyChanged("Expression"); } } /// /// 动作编号 /// private string _ActionCode; public string ActionCode { get { return _ActionCode; } set { _ActionCode = value; OnPropertyChanged("ActionCode"); } } /// /// 动作名称 /// private string _ActionName; public string ActionName { get { return _ActionName; } set { _ActionName = value; OnPropertyChanged("ActionName"); } } /// /// 工位编号 /// private string _StationCode; public string StationCode { get { return _StationCode; } set { _StationCode = value; OnPropertyChanged("StationCode"); } } /// /// 是否高位 /// private int _IsHigh; public int IsHigh { get { return _IsHigh; } set { _IsHigh = value; OnPropertyChanged("IsHigh"); } } /// /// 高位输入 /// private string _RefPortHigh; public string RefPortHigh { get { return _RefPortHigh; } set { _RefPortHigh = value; OnPropertyChanged("RefPortHigh"); } } /// /// 低位输入 /// private string _RefPortLow; public string RefPortLow { get { return _RefPortLow; } set { _RefPortLow = value; OnPropertyChanged("RefPortLow"); } } /// /// /// 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() { HardActionEntity obj = new HardActionEntity(); 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; } } }