Esempio n. 1
0
 public void DeleteAircraftType(AircraftTypeDTO aircraftType)
 {
     AircraftType deleteAircraftType = _aircraftTypeRepository.Get(aircraftType.AircraftTypeId); //获取需要删除的对象。
     _aircraftTypeRepository.Remove(deleteAircraftType); //删除飞机机型。
 }
Esempio n. 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);
 }
Esempio n. 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);
 }