public virtual void Clone(DeviceRepairRecord cloneObj) { base.Clone(cloneObj); if(this.Device != null){ cloneObj.Device = new THU.LabSystemBE.DeviceMap(); cloneObj.Device.ID = this.Device.ID; }else{ cloneObj.Device = null; } if(this.User != null){ cloneObj.User = new THU.LabSystemBE.User(); cloneObj.User.ID = this.User.ID; }else{ cloneObj.User = null; } if(this.Teacher != null){ cloneObj.Teacher = new THU.LabSystemBE.Teacher(); cloneObj.Teacher.ID = this.Teacher.ID; }else{ cloneObj.Teacher = null; } cloneObj.ReportDate = this.ReportDate; cloneObj.IsCompleted = this.IsCompleted; cloneObj.CompleteDate = this.CompleteDate; if(this.CompleteUser != null){ cloneObj.CompleteUser = new THU.LabSystemBE.User(); cloneObj.CompleteUser.ID = this.CompleteUser.ID; }else{ cloneObj.CompleteUser = null; } cloneObj.Fee = this.Fee; cloneObj.ReportMemo = this.ReportMemo; cloneObj.RepairDate = this.RepairDate; cloneObj.AlarmUser = this.AlarmUser; if(this.House != null){ cloneObj.House = new THU.LabSystemBE.CommonEnum(); cloneObj.House.ID = this.House.ID; }else{ cloneObj.House = null; } cloneObj.RepairMemo = this.RepairMemo; }
private static DeviceRepairRecord Create(bool inList) { DeviceRepairRecord entity = new DeviceRepairRecord(); 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; }
public override NHExt.Runtime.Model.BaseEntity Clone() { DeviceRepairRecord cloneObj = new DeviceRepairRecord(); this.Clone(cloneObj); return cloneObj; }