public void SetEntity(CarEntity Entity) { this.Name = Entity.Name; this.LicensePlate = Entity.LicensePlate; this.PersonCount = Entity.PersonCount; this.Level = Entity.Level; }
public void Update(int ID, CarEntity Car) { var entity = this._DB.Get(ID); entity.SetEntity(Car); this._DB.Edit(entity); }
public CarInfo(CarEntity Entity) { this.ID = Entity.ID; this.Name = Entity.Name; this.LicensePlate = Entity.LicensePlate; this.PersonCount = Entity.PersonCount; this.Status = Entity.Status; this.Level = Entity.Level; this.CreateDate = Entity.CreateDate; this.IsDelete = Entity.IsDelete; }
public int Add(CarInfo Car) { var entity = new CarEntity(Car); entity.IsDelete = false; entity.Status = (int)CarStatus.正常; entity.CreateDate = DateTime.Now; this._DB.Add(entity); //foreach (var attachID in Car.AttachIDs) //{ // AddAttach(entity.ID, attachID); //} return(entity.ID); }
public void Update(int ID, CarEntity Entity) { this._ICarService.Update(ID, Entity); }