public void DeleteCost(int costid)
        {
            var data = context.HotelCostDetails.SingleOrDefault(s => s.CostId == costid);

            context.HotelCostDetails.Remove(data);
            context.SaveChanges();
        }
Esempio n. 2
0
        public void DeleteTrip(int TripId)
        {
            var data = context.TripDetails.SingleOrDefault(s => s.TripId == TripId);

            context.TripDetails.Remove(data);
            context.SaveChanges();
        }
Esempio n. 3
0
        public void DeleteRoute(int RouteId)
        {
            var data = context.RouteDetails.SingleOrDefault(s => s.RouteId == RouteId);

            context.RouteDetails.Remove(data);
            context.SaveChanges();
        }
Esempio n. 4
0
        public void DeleteListofhotel(int listid)
        {
            var data = context.ListofHotelDetails.SingleOrDefault(s => s.ListId == listid);

            context.ListofHotelDetails.Remove(data);
            context.SaveChanges();
        }
Esempio n. 5
0
        public void DeleteAirplane(int AirplaneId)
        {
            var data = context.AirplaneDetails.SingleOrDefault(s => s.AirplaneId == AirplaneId);

            context.AirplaneDetails.Remove(data);
            context.SaveChanges();
        }
Esempio n. 6
0
        public void DeleteBooking(int UserId)
        {
            var data = context.UserFlightBookingDetails.SingleOrDefault(s => s.UserId == UserId);

            context.UserFlightBookingDetails.Remove(data);
            context.SaveChanges();
            var userEmail = "";

            userEmail = data.UserEmail;

            MailRequest request = new MailRequest();

            request.ToEmail = userEmail;
            request.Subject = $"SpicejetBooking";
            request.Body    = $"<p style='color:red'> Dear,{data.UserFirstName} {data.UserMiddleName} {data.UserLastName} <br> Your Flight Has Been cancel Your Refund will be send on your Bank account And Any Quary then Contect Our Authority </p>";
            try
            {
                if (userEmail != null)
                {
                    mailService.SendEmailAsync(request);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Esempio n. 7
0
        public void DeleteHotel(int hotelId)
        {
            var data = context.HotelDetails.SingleOrDefault(s => s.HotelId == hotelId);

            context.HotelDetails.Remove(data);
            context.SaveChanges();
        }