예제 #1
0
 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);
 }
예제 #2
0
        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);
        }
예제 #3
0
 public void DeleteAcDailyUtilization(AcDailyUtilizationDTO dto)
 {
     AcDailyUtilization delAcDailyUtilization = _acDailyUtilizationRepository.Get(dto.Id); //获取需要删除的对象。
     _acDailyUtilizationRepository.Remove(delAcDailyUtilization); //删除AcDailyUtilization。
 }