//
        // 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 CancellationList(int?page)
        {
            HotelBookingCancelModel      _model = new HotelBookingCancelModel();
            HotelBookingCancelRepository _rep   = new HotelBookingCancelRepository();

            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);
        }