Esempio n. 1
0
        public static EntityObjectBase Copy(EntityObjectBase objEntity)
        {
            //生成拷贝实例
            Type             type    = objEntity.GetType();
            EntityObjectBase objCopy = (EntityObjectBase)Activator.CreateInstance(type);

            //拷贝属性值
            objCopy.FromTable(objEntity.ToTable());

            //拷贝原始值
            objCopy.table = objEntity.table.Copy();

            return(objCopy);
        }
Esempio n. 2
0
 /// <summary>
 /// 设置原始值
 /// </summary>
 /// <param name="objEntity">实体对像</param>
 public static void SetOriginalValue(EntityObjectBase objEntity)
 {
     objEntity.table = objEntity.ToTable();
 }