public void Update(int ID, EngineeringEntity Engineering) { var entity = this._DB.Get(ID); entity.SetEntity(Engineering); this._DB.Edit(entity); }
public int Add(EngineeringInfo Engineering) { var entity = new EngineeringEntity(Engineering); entity.IsDelete = false; entity.Status = (int)EnumEngineeringStatus.新建; this._DB.Add(entity); // 启动工程 Start(entity.ID, Engineering.CreateUser); return(entity.ID); }
public EngineeringInfo(EngineeringEntity Entity) : this() { this.ID = Entity.ID; this.Name = Entity.Name; this.Number = Entity.Number; this.Type = Entity.Type; this.Phase = Entity.Phase; this.TaskType = Entity.TaskType; this.Manager = Entity.Manager; this.CreateDate = Entity.CreateDate; this.DeliveryDate = Entity.DeliveryDate; this.FinishDate = Entity.FinishDate; this.StartDate = Entity.StartDate; this.StopDate = Entity.StopDate; this.Note = Entity.Note; this.IsDelete = Entity.IsDelete; this.ProjectID = Entity.ProjectID; this.Status = Entity.Status; this.VolLevel = Entity.VolLevel; }
public void Update(int ID, EngineeringEntity Entity) { this._IEngineeringService.Update(ID, Entity); }
public void SetEntity(EngineeringEntity Entity) { if (!this.Name.Equals(Entity.Name)) { this.Name = Entity.Name; } if (!this.Number.Equals(Entity.Number)) { this.Number = Entity.Number; } if (!this.Type.Equals(Entity.Type)) { this.Type = Entity.Type; } if (!this.Phase.Equals(Entity.Phase)) { this.Phase = Entity.Phase; } if (!this.TaskType.Equals(Entity.TaskType)) { this.TaskType = Entity.TaskType; } if (!this.Manager.Equals(Entity.Manager)) { this.Manager = Entity.Manager; } if (!this.CreateDate.Equals(Entity.CreateDate)) { this.CreateDate = Entity.CreateDate; } if (!this.DeliveryDate.Equals(Entity.DeliveryDate)) { this.DeliveryDate = Entity.DeliveryDate; } if (!this.FinishDate.Equals(Entity.FinishDate)) { this.FinishDate = Entity.FinishDate; } if (!this.StopDate.Equals(Entity.StopDate)) { this.StopDate = Entity.StopDate; } if (!this.StartDate.Equals(Entity.StartDate)) { this.StartDate = Entity.StartDate; } if (!this.Note.Equals(Entity.Note)) { this.Note = Entity.Note; } if (!this.IsDelete.Equals(Entity.IsDelete)) { this.IsDelete = Entity.IsDelete; } if (!this.ProjectID.Equals(Entity.ProjectID)) { this.ProjectID = Entity.ProjectID; } if (!this.Status.Equals(Entity.Status)) { this.Status = Entity.Status; } if (!this.VolLevel.Equals(Entity.VolLevel)) { this.VolLevel = Entity.VolLevel; } }