public void Update(int ID, EngineeringResourceEntity EngineeringResource)
        {
            var entity = this._DB.Get(ID);

            entity.SetEntity(EngineeringResource);

            this._DB.Edit(entity);
        }
Beispiel #2
0
 public EngineeringResourceInfo(EngineeringResourceEntity Entity) : this()
 {
     this.ID            = Entity.ID;
     this.EngineeringID = Entity.EngineeringID;
     this.Name          = Entity.Name;
     this.Content       = Entity.Content;
     this.CreateDate    = Entity.CreateDate;
     this.UserID        = Entity.UserID;
     this.IsDelete      = Entity.IsDelete;
 }
        public int Add(EngineeringResourceInfo EngineeringResource)
        {
            var entity = new EngineeringResourceEntity(EngineeringResource);

            entity.CreateDate = DateTime.Now;
            entity.IsDelete   = false;
            this._DB.Add(entity);

            if (EngineeringResource.AttachIDs != null)
            {
                foreach (var attachID in EngineeringResource.AttachIDs)
                {
                    AddAttach(entity.ID, attachID);
                }
            }
            return(entity.ID);
        }
 public void Update(int ID, EngineeringResourceEntity Entity)
 {
     this._IEngineeringResourceService.Update(ID, Entity);
 }
Beispiel #5
0
 public void SetEntity(EngineeringResourceEntity Entity)
 {
     this.Name    = Entity.Name;
     this.Content = Entity.Content;
 }