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

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

            cloneObj.BeginTime = this.BeginTime;

            cloneObj.EndTime = this.EndTime;

            cloneObj.Fee = this.Fee;

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

            cloneObj.IsAppoint = this.IsAppoint;

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

            cloneObj.IsCompleted = this.IsCompleted;

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

            cloneObj.IsUsing = this.IsUsing;

            cloneObj.Price = this.Price;

            cloneObj.TotalTime = this.TotalTime;
        }
Exemplo n.º 2
0
 private static DeviceUseRecord Create(bool inList)
 {
     DeviceUseRecord entity = new DeviceUseRecord();
     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()
 {
     DeviceUseRecord cloneObj = new DeviceUseRecord();
     this.Clone(cloneObj);
     return cloneObj;
 }