예제 #1
0
        public virtual void Clone(Company cloneObj)
        {
            base.Clone(cloneObj);

            cloneObj.Code = this.Code;

            cloneObj.Name = this.Name;

            if(this.Level != null){
            cloneObj.Level = new IWEHAVE.ERP.CenterBE.CompanyLevel();
            cloneObj.Level.ID = this.Level.ID;
            }else{
            cloneObj.Level = null;
            }

            if(this.BusinessType != null){
            cloneObj.BusinessType = new IWEHAVE.ERP.CenterBE.BusinessType();
            cloneObj.BusinessType.ID = this.BusinessType.ID;
            }else{
            cloneObj.BusinessType = null;
            }

            if(this.Variety != null){
            cloneObj.Variety = new IWEHAVE.ERP.CenterBE.Variety();
            cloneObj.Variety.ID = this.Variety.ID;
            }else{
            cloneObj.Variety = null;
            }

            if(this.Type != null){
            cloneObj.Type = new IWEHAVE.ERP.CenterBE.CompanyType();
            cloneObj.Type.ID = this.Type.ID;
            }else{
            cloneObj.Type = null;
            }

            cloneObj.Url = this.Url;

            cloneObj.Logo = this.Logo;

            if(this.Country != null){
            cloneObj.Country = new IWEHAVE.ERP.CenterBE.Country();
            cloneObj.Country.ID = this.Country.ID;
            }else{
            cloneObj.Country = null;
            }

            if(this.Province != null){
            cloneObj.Province = new IWEHAVE.ERP.CenterBE.Province();
            cloneObj.Province.ID = this.Province.ID;
            }else{
            cloneObj.Province = null;
            }

            if(this.City != null){
            cloneObj.City = new IWEHAVE.ERP.CenterBE.City();
            cloneObj.City.ID = this.City.ID;
            }else{
            cloneObj.City = null;
            }
        }
예제 #2
0
 private static Company Create(bool inList)
 {
     Company entity = new Company();
     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;
 }
예제 #3
0
 public override NHExt.Runtime.Model.BaseEntity Clone()
 {
     Company cloneObj = new Company();
     this.Clone(cloneObj);
     return cloneObj;
 }