///////////////////////////////////////////////////////////////// // // (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 System.ComponentModel; using System.Collections.ObjectModel; namespace GummingCommon { /// /// Testdotpoint /// [Serializable] public class TestdotpointEntity : ICloneable, INotifyPropertyChanged { /// /// /// public string RecId { get; set; } /// /// PointCode /// public string PointCode { get; set; } /// /// PointName /// public string PointName { get; set; } /// /// PointType /// public string PointType { get; set; } /// /// PointPart /// public string PointPart { get; set; } /// /// PointX /// public string PointX { get; set; } /// /// PointXE /// public string PointXE { get; set; } /// /// PointY /// public string PointY { get; set; } /// /// PointYE /// public string PointYE { get; set; } public decimal? HighLine { get; set; } public decimal? LowLine { get; set; } /// /// PointPosition /// public int? PointPosition { get; set; } /// /// PointIndex /// public int? PointIndex { get; set; } /// /// /// public string CreateBy { get; set; } /// /// /// public DateTime? CreateTime { get; set; } /// /// /// public string ModifyBy { get; set; } /// /// /// public DateTime? ModifyTime { get; set; } /// /// /// public int? IsActive { get; set; } public object Clone() { TestdotpointEntity obj = new TestdotpointEntity(); 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; } private bool _CheckStatus = false; public bool CheckStatus { get { return _CheckStatus; } set { _CheckStatus = value; OnPropertyChanged("CheckStatus"); } } private ObservableCollection _children = new ObservableCollection(); public ObservableCollection Children { get { return _children; } } #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged = delegate { }; private void OnPropertyChanged(string propertyName) { PropertyChangedEventHandler handler = this.PropertyChanged; if (handler != null) { handler(this, new PropertyChangedEventArgs(propertyName)); } } #endregion } [Serializable] public partial class TestdotpointEntityExtension : TestdotpointEntity { public string CreateByDisplayer { get; set; } public string ModifyByDisplayer { get; set; } public string Part { get; set; } } [Serializable] public class TestdotpointLogEntityExtension : TestdotpointEntityExtension { public string LogId { get; set; } public DateTime? OperTime { get; set; } public string OperUser { get; set; } public string OperType { get; set; } public string OperInfo { get; set; } public string OperUserDisplayer { get; set; } } }