Пример #1
0
 public void DeleteAircraftType(AircraftTypeDTO aircraftType)
 {
     AircraftType deleteAircraftType = _aircraftTypeRepository.Get(aircraftType.AircraftTypeId); //获取需要删除的对象。
     _aircraftTypeRepository.Remove(deleteAircraftType); //删除飞机机型。
 }
Пример #2
0
 public void InsertAircraftType(AircraftTypeDTO aircraftType)
 {
     AircraftType newAircraftType = AircraftTypeFactory.CreateAircraftType();
     AircraftTypeFactory.SetAircraftType(newAircraftType, aircraftType.Name, aircraftType.Description,
         aircraftType.AircraftCategoryId, aircraftType.AircraftSeriesId, aircraftType.ManufacturerId,
         aircraftType.CaacAircraftTypeId);
     _aircraftTypeRepository.Add(newAircraftType);
 }
Пример #3
0
 public void ModifyAircraftType(AircraftTypeDTO aircraftType)
 {
     AircraftType updateAircraftType = _aircraftTypeRepository.Get(aircraftType.AircraftTypeId); //获取需要更新的对象。
     AircraftTypeFactory.SetAircraftType(updateAircraftType, aircraftType.Name, aircraftType.Description,
         aircraftType.AircraftCategoryId, aircraftType.AircraftSeriesId, aircraftType.ManufacturerId,
         aircraftType.CaacAircraftTypeId);
     _aircraftTypeRepository.Modify(updateAircraftType);
 }