public ActionResult CancellationList(int?page)
        {
            HotelBookingCancelModel      _model = new HotelBookingCancelModel();
            HotelBookingCancelRepository _rep   = new HotelBookingCancelRepository();

            HotelGeneralRepository.SetRequestPageRow();
            _model.TabularList = _rep.GetPagedList(page);
            return(View(_model));
        }
        //
        // GET: /Hotel/HotelOfflineIssueTicket/

        public ActionResult Index(int?page)
        {
            HotelOfflineBookModel             _model = new HotelOfflineBookModel();
            HotelOfflineIssueTicketRepository _rep   = new HotelOfflineIssueTicketRepository();

            HotelGeneralRepository.SetRequestPageRow();
            _model.TabularList = _rep.GetPagedList(page);
            return(View(_model));
        }
        public ActionResult Index(int?page)
        {
            HotelBookingProcessModel      _model = new HotelBookingProcessModel();
            HotelBookingProcessRepository _rep   = new HotelBookingProcessRepository();

            HotelGeneralRepository.SetRequestPageRow();
            HotelMessageModel msg = new HotelMessageModel();

            _model.Message     = msg;
            _model.TabularList = _rep.GetBranchOfficeHotelBookingProcessPagedList(page);
            return(View(_model));
        }
        public ActionResult Index(ExportModel Expmodel, HotelBookingRecordModel model, FormCollection frm, int?page)
        {
            HotelBookingRecordRepository _rep = new HotelBookingRecordRepository();
            HotelMessageModel            msg  = new HotelMessageModel();

            HotelGeneralRepository.SetRequestPageRow();

            model.TabularList = _rep.GetPagedList(page);
            GetExportTypeClicked(Expmodel, frm);

            if (Expmodel != null &&
                (Expmodel.ExportTypeExcel != null ||
                 Expmodel.ExportTypeWord != null ||
                 Expmodel.ExportTypeCSV != null ||
                 Expmodel.ExportTypePdf != null))
            {
                try
                {
                    if (Expmodel.ExportTypeExcel != null)
                    {
                        Expmodel.ExportTypeExcel = Expmodel.ExportTypeExcel;
                    }
                    else if (Expmodel.ExportTypeWord != null)
                    {
                        Expmodel.ExportTypeWord = Expmodel.ExportTypeWord;
                    }
                    else if (Expmodel.ExportTypePdf != null)
                    {
                        Expmodel.ExportTypePdf = Expmodel.ExportTypePdf;
                    }

                    var exportData = _rep.List().Select(m => new
                    {
                        SNo          = m.SNo,
                        GuestName    = m.GuestName,
                        Location     = m.CityName + "" + m.CountryName,
                        HotelDetails = m.HotelName,
                        Rooms        = m.NoOfRoom,
                        CheckIn      = m.CheckInDate.ToString("MM/dd/yyyy"),
                        CheckOut     = m.CheckOutDate.ToString("MM/dd/yyyy"),
                        BookingDate  = m.CreatedDate.ToString("MM/dd/yyyy"),
                        Status       = m.TicketStatus
                    });

                    App_Class.AppCollection.Export(Expmodel, exportData, "HotelBookingRecord");
                }
                catch (Exception ex)
                {
                    ATLTravelPortal.Utility.ErrorLogging.LogException(ex);
                }
            }
            return(View(model));
        }
Esempio n. 5
0
        public ActionResult Index(int?page)
        {
            HotelBookingRecordModel      _model = new HotelBookingRecordModel();
            HotelBookingRecordRepository _rep   = new HotelBookingRecordRepository();
            HotelMessageModel            msg    = new HotelMessageModel();

            HotelGeneralRepository.SetRequestPageRow();
            _model.Message     = msg;
            _model.TabularList = _rep.GetDistributorPagedList(page);

            return(View(_model));
        }
        public ActionResult PendingCancellationList(ExportModel Expmodel, HotelBookingCancelModel model, FormCollection frm, int?page)
        {
            int SNO = 0;
            HotelBookingCancelModel      _model = new HotelBookingCancelModel();
            HotelBookingCancelRepository _rep   = new HotelBookingCancelRepository();

            HotelGeneralRepository.SetRequestPageRow();
            model.TabularList = _rep.GetPagedList(page);
            GetExportTypeClicked(Expmodel, frm);
            if (Expmodel != null &&
                (Expmodel.ExportTypeExcel != null ||
                 Expmodel.ExportTypeWord != null ||
                 Expmodel.ExportTypeCSV != null ||
                 Expmodel.ExportTypePdf != null))
            {
                try
                {
                    if (Expmodel.ExportTypeExcel != null)
                    {
                        Expmodel.ExportTypeExcel = Expmodel.ExportTypeExcel;
                    }
                    else if (Expmodel.ExportTypeWord != null)
                    {
                        Expmodel.ExportTypeWord = Expmodel.ExportTypeWord;
                    }
                    else if (Expmodel.ExportTypePdf != null)
                    {
                        Expmodel.ExportTypePdf = Expmodel.ExportTypePdf;
                    }


                    var exportData = _rep.PendingList().Select(m => new
                    {
                        SNO         = m.SNo,
                        GuestName   = (m.BookingDetail.Guests[0].Title) + " " + (m.BookingDetail.Guests[0].FirstName) + " " + m.BookingDetail.Guests[0].MiddleName + " " + m.BookingDetail.Guests[0].LastName,
                        HotelName   = m.BookingDetail.HotelName,
                        RequestDate = m.CreatedOn.ToShortDateString(),
                        Status      = m.CancelStatus
                    });


                    App_Class.AppCollection.Export(Expmodel, exportData, "HotelBookingRecord");
                }
                catch (Exception ex)
                {
                    ATLTravelPortal.Utility.ErrorLogging.LogException(ex);
                }
            }
            return(null);
        }
        public ActionResult ProcessCancellation(HotelBookingCancelModel model)
        {
            HotelBookingCancelRepository _rep   = new HotelBookingCancelRepository();
            HotelBookingCancelModel      _model = new HotelBookingCancelModel();

            _model = _rep.GetCancelRequestStatus(model.BookingCancelId);
            GeneralRepository gProvider        = new GeneralRepository();
            TravelSession     sessionObj       = (TravelSession)System.Web.HttpContext.Current.Session["TravelSessionInfo"];
            string            ReservationEmail = System.Configuration.ConfigurationManager.AppSettings["ReservationEmail"];
            var    agent   = gProvider.GetAgentInfo(ATLTravelPortal.Repository.GeneralRepository.LoggedUserId());
            string subject = "Hotel Booking Cancilation Status # Ref No : " + _model.BookingDetail.BookingRecordId + "#" + _model.BookingDetail.BookingId + "#" + _model.BookingDetail.ConfirmationNo + "#" + _model.BookingDetail.ReferenceNo + "|" + _model.BookingDetail.HotelName + ", " + _model.BookingDetail.CityName + ", " + _model.BookingDetail.CountryName;

            HotelGeneralRepository.sendEmial(agent.Email, ReservationEmail, "", subject, subject, "HTML", "");
            return(View(_model));
        }
        public ActionResult EmailCancel(long?id, string emal)
        {
            HotelBookingRecordRepository _rep   = new HotelBookingRecordRepository();
            HotelItinearyModel           _model = new HotelItinearyModel();
            HotelMessageModel            _msg   = new HotelMessageModel();

            if (ATLTravelPortal.Areas.Hotel.Repository.HotelGeneralRepository.ValidateEmail(emal) == false)
            {
                _msg.ActionMessage = "Invalid Email address.";
                _msg.MsgNumber     = 1001;
                _msg.MsgStatus     = true;
                _msg.MsgType       = 3;
                _model.Message     = _msg;
            }
            else
            {
                _model = _rep.CancelEmailFormat(id);
                if (_model.Message.MsgNumber == 1)
                {
                    List <string> emailList = new List <string>();
                    emailList.Add(emal);
                    if (_model.Itineary.GuestEmail != emal)
                    {
                        emailList.Add(_model.Itineary.GuestEmail);
                    }
                    string            body      = RenderPartialViewToString("VUC_CancellationEmail", _model);
                    GeneralRepository gProvider = new GeneralRepository();
                    //use ohter way to send email.
                    var    agent   = gProvider.GetAgentInfo(GeneralRepository.LoggedAgentId());
                    string emailId = agent.Email + "," + emal;
                    string subject = "Hotel Booking Cancellation #: " + _model.Itineary.HotelName + ", " + _model.Itineary.CityName + ", " + _model.Itineary.CountryName;
                    string HTML    = HotelGeneralRepository.sendQuotation(emailId, subject, body, "", false);
                    _msg.ActionMessage = "Booking Cancellation Email has been sent.";
                    _msg.MsgNumber     = 1;
                    _msg.MsgStatus     = true;
                    _msg.MsgType       = 0;
                    _model.Message     = _msg;
                }
            }
            return(PartialView("Utility/VUC_Message", _model.Message));
        }
        public ActionResult EmailItinerary(long?id, string emal)
        {
            HotelBookingRecordRepository _rep   = new HotelBookingRecordRepository();
            HotelItinearyModel           _model = new HotelItinearyModel();
            HotelMessageModel            _msg   = new HotelMessageModel();

            if (ATLTravelPortal.Areas.Hotel.Repository.HotelGeneralRepository.ValidateEmail(emal) == false)
            {
                _msg.ActionMessage = "Invalid Email address.";
                _msg.MsgNumber     = 1001;
                _msg.MsgStatus     = true;
                _msg.MsgType       = 3;
                _model.Message     = _msg;
            }
            else
            {
                _model = _rep.Itineary(id);
                if (_model.Message.MsgNumber == 1)
                {
                    List <string> emailList = new List <string>();
                    emailList.Add(emal);
                    if (_model.Itineary.GuestEmail != emal)
                    {
                        emailList.Add(_model.Itineary.GuestEmail);
                    }
                    string body = RenderPartialViewToString("Common/VUC_Itinerary", _model);
                    //use ohter way to send email.
                    string subject = "Hotel Booking Itinerary Ref No : " + _model.BookingRecordId + "#" + _model.Itineary.BookingId + "#" + _model.Itineary.ConfirmationNo + "# " + _model.Itineary.HotelName + ", " + _model.Itineary.CityName + ", " + _model.Itineary.CountryName;
                    HotelGeneralRepository.sendEmial(emal, "", "", subject, body, "HTML", "");
                    _msg.ActionMessage = "Itinerary has been sent.";
                    _msg.MsgNumber     = 1;
                    _msg.MsgStatus     = true;
                    _msg.MsgType       = 0;
                    _model.Message     = _msg;
                }
            }
            return(PartialView("Utility/VUC_Message", _model.Message));
        }