///<summary> send reminder on mail to the passengers ///</summary> public static void sendMailReminderToP(Object state) { List <RegistrationDateRangeDTO> registrationNow = RegistrationDateRangeConverters.GetListDateRangeDTO(RegistrationDateRangeDal.GetTravelingsNow()); foreach (var r in registrationNow) { sendMailReminder(RegisterationConverters.GetRegisterationDTO(RegisterationDal.GetRegisterationById(r.Id))); } }
/// <summary> delete range registeration of passenger from the db /// </summary> public static int DeleteRangeRegPassenger(int id, DateTime fromDate, DateTime toDate) { ///delete from TravelingPassenger RegisterationDTO registeration = RegisterationConverters.GetRegisterationDTO(RegisterationDal.GetRegisterationById(id)); TravelingPassengerDTO travelingPassenger = TravelingPassengerConverters.GetTravelingDTO(TravelingPassengerDal.GetTraveling(registeration.travelingIdPassenger)); travelingPassenger.FromDate = fromDate; travelingPassenger.ToDate = toDate; TravelingPassengerBL.DeleteTraveling(travelingPassenger); bool isPay = BL.RegistrationDateRangeBL.isTravelToday(id, fromDate, toDate); ///delete from Registeration int datesDelete = BL.RegistrationDateRangeBL.DeleteRangeP(id, fromDate, toDate); if (datesDelete > 0 && isPay) { PaymentBL.PayToDriverCancel(id, fromDate, toDate); } return(datesDelete); }
/// <summary> find registeration by identity's passenger /// </summary> public static RegisterationDTO GetRegisterationByPassengerId(int id) { return(RegisterationConverters.GetRegisterationDTO(DAL.RegisterationDal.GetRegisterationByPassengerId(id))); }