Ejemplo n.º 1
0
        public virtual void Clone(User cloneObj)
        {
            base.Clone(cloneObj);

            cloneObj.SN = this.SN;

            cloneObj.Name = this.Name;

            cloneObj.Tel = this.Tel;

            cloneObj.Password = this.Password;

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

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

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

            cloneObj.Email = this.Email;

            cloneObj.Code = this.Code;

            cloneObj.IsDelete = this.IsDelete;

            cloneObj.BeginTime = this.BeginTime;

            cloneObj.EndTime = this.EndTime;

            if(this.Teacher != null){
            cloneObj.Teacher = new THU.LabSystemBE.Teacher();
            cloneObj.Teacher.ID = this.Teacher.ID;
            }else{
            cloneObj.Teacher = null;
            }
        }
Ejemplo n.º 2
0
 private static User Create(bool inList)
 {
     User entity = new User();
     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;
 }
Ejemplo n.º 3
0
 public override NHExt.Runtime.Model.BaseEntity Clone()
 {
     User cloneObj = new User();
     this.Clone(cloneObj);
     return cloneObj;
 }