public virtual void Clone(Teacher cloneObj) { base.Clone(cloneObj); cloneObj.Name = this.Name; if(this.Sex != null){ cloneObj.Sex = new THU.LabSystemBE.SexEnum(); cloneObj.Sex.EnumValue = this.Sex.EnumValue; cloneObj.Sex.Code = this.Sex.Code; cloneObj.Sex.Name = this.Sex.Name; }else{ cloneObj.Sex = null; } if(this.Position != null){ cloneObj.Position = new THU.LabSystemBE.CommonEnum(); cloneObj.Position.ID = this.Position.ID; }else{ cloneObj.Position = null; } if(this.Department != null){ cloneObj.Department = new THU.LabSystemBE.CommonEnum(); cloneObj.Department.ID = this.Department.ID; }else{ cloneObj.Department = null; } cloneObj.Tag = this.Tag; cloneObj.IsDelete = this.IsDelete; }
private static Teacher Create(bool inList) { Teacher entity = new Teacher(); 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() { Teacher cloneObj = new Teacher(); this.Clone(cloneObj); return cloneObj; }