public void InsertAcDailyUtilization(AcDailyUtilizationDTO dto) { AcDailyUtilization newAcDailyUtilization = AcDailyUtilizationFactory.CreateAcDailyUtilization( dto.AircraftId, dto.RegNumber, dto.CalculatedHour, dto.CalculatedCycle, dto.Year, dto.Month); newAcDailyUtilization.SetIsCurrent(dto.IsCurrent); _acDailyUtilizationRepository.Add(newAcDailyUtilization); }
public void ModifyAcDailyUtilization(AcDailyUtilizationDTO dto) { AcDailyUtilization updateAcDailyUtilization = _acDailyUtilizationRepository.Get(dto.Id); //获取需要更新的对象。 //更新。 AcDailyUtilizationFactory.UpdateAcDailyUtilization(updateAcDailyUtilization, dto.AircraftId, dto.RegNumber, dto.CalculatedHour, dto.CalculatedCycle, dto.AmendHour, dto.AmendCycle, dto.Year, dto.Month); _acDailyUtilizationRepository.Modify(updateAcDailyUtilization); }
public void DeleteAcDailyUtilization(AcDailyUtilizationDTO dto) { AcDailyUtilization delAcDailyUtilization = _acDailyUtilizationRepository.Get(dto.Id); //获取需要删除的对象。 _acDailyUtilizationRepository.Remove(delAcDailyUtilization); //删除AcDailyUtilization。 }