Exemplo n.º 1
0
        public virtual void Clone(DeviceMap cloneObj)
        {
            base.Clone(cloneObj);

            if(this.House != null){
            cloneObj.House = new THU.LabSystemBE.CommonEnum();
            cloneObj.House.ID = this.House.ID;
            }else{
            cloneObj.House = null;
            }

            cloneObj.SN = this.SN;

            if(this.DeviceStatus != null){
            cloneObj.DeviceStatus = new THU.LabSystemBE.DeviceStatusEnum();
            cloneObj.DeviceStatus.EnumValue = this.DeviceStatus.EnumValue;
            cloneObj.DeviceStatus.Code = this.DeviceStatus.Code;
            cloneObj.DeviceStatus.Name = this.DeviceStatus.Name;
            }else{
            cloneObj.DeviceStatus = null;
            }

            if(this.UseStatus != null){
            cloneObj.UseStatus = new THU.LabSystemBE.UseStatusEnum();
            cloneObj.UseStatus.EnumValue = this.UseStatus.EnumValue;
            cloneObj.UseStatus.Code = this.UseStatus.Code;
            cloneObj.UseStatus.Name = this.UseStatus.Name;
            }else{
            cloneObj.UseStatus = null;
            }

            cloneObj.Price = this.Price;

            cloneObj.Expression = this.Expression;

            cloneObj.IsDelete = this.IsDelete;

            if(this.Device != null){
            cloneObj.Device = new THU.LabSystemBE.Device();
            cloneObj.Device.ID = this.Device.ID;
            }else{
            cloneObj.Device = null;
            }
        }
Exemplo n.º 2
0
 private static DeviceMap Create(bool inList)
 {
     DeviceMap entity = new DeviceMap();
     entity.ID = NHExt.Runtime.Util.EntityGuidHelper.New();
     entity.EntityState = NHExt.Runtime.Enums.EntityState.Add;
     if(inList){
     if(Session.Current != null){
     Session.Current.InList(entity);
     }
     }
     return entity;
 }
Exemplo n.º 3
0
 public override NHExt.Runtime.Model.BaseEntity Clone()
 {
     DeviceMap cloneObj = new DeviceMap();
     this.Clone(cloneObj);
     return cloneObj;
 }