Example #1
0
    private Table PopulateTouristDetailsTable(CFormReportDTO cFormReportDto)
    {
        TableHeaderRow tableHeaderRow;
        Table          tblTouristDetails;
        TableRow       touristRow;

        tblTouristDetails          = new Table();
        tblTouristDetails.CssClass = "dataTables";
        tableHeaderRow             = GetTouristHeaderRow();
        tblTouristDetails.Rows.Add(tableHeaderRow);

        tblTouristDetails.Rows.Add(tableHeaderRow);

        if (cFormReportDto != null)
        {
            if (cFormReportDto.BookingTouristDetails != null && cFormReportDto.BookingTouristDetails.Length > 0)
            {
                for (int i = 0; i < cFormReportDto.BookingTouristDetails.Length; i++)
                {
                    touristRow = GetTouristRow(cFormReportDto.BookingTouristDetails[i]);
                    tblTouristDetails.Rows.Add(touristRow);
                }
            }
        }
        return(tblTouristDetails);
    }
Example #2
0
        private CFormReportDTO GetCFormDetails(int bookingId, bool foreignNationals, bool indianNationals)
        {
            CFormReportDTO cFormReportDto = null;

            try
            {
                BookingReportHelper BookingReportHelper = new BookingReportHelper();
                if (foreignNationals && indianNationals)
                {
                    cFormReportDto = BookingReportHelper.GetCFormData(bookingId);
                }
                else if (foreignNationals)
                {
                    cFormReportDto = BookingReportHelper.GetCFormDataForForeignNationals(bookingId);
                }
                else if (indianNationals)
                {
                    cFormReportDto = BookingReportHelper.GetCFormDataForIndiaNationals(bookingId);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }
            return(cFormReportDto);
        }
Example #3
0
 private void PopulateLabels(CFormReportDTO cFormReportDto)
 {
     if (cFormReportDto.BookingDetails != null)
     {
         lblForeignDetails.Text = "Foreign Client's Details: " + cFormReportDto.BookingDetails.AccomodationName;
         lblBookingRefNo.Text   = cFormReportDto.CFormNo;
     }
 }
Example #4
0
        private CFormReportDTO GetCFormData(int bookingId, bool foreignNationals, bool indianNationals)
        {
            CFormReportDTO cFormReportDto;
            BookingDTO     bookingDetailsDto;

            BookingTouristDTO[]   bookingTouristDetailsDto;
            BookingHandler        bookingHandler;
            BookingTouristHandler touristHandler;

            try
            {
                bookingHandler = new BookingHandler();
                touristHandler = new BookingTouristHandler();
                cFormReportDto = new CFormReportDTO();

                GenerateCFormNumbers(bookingId);

                bookingDetailsDto      = bookingHandler.GetBookingDetails(bookingId);
                cFormReportDto.CFormNo = GetBookingCFormNo(bookingDetailsDto, foreignNationals, indianNationals);

                cFormReportDto.BookingDetails = bookingDetailsDto;

                bookingTouristDetailsDto = touristHandler.GetAllTouristDetails(bookingId);

                if (foreignNationals && indianNationals)
                {
                    cFormReportDto.BookingTouristDetails = bookingTouristDetailsDto;
                }
                else if (foreignNationals)
                {
                    cFormReportDto.BookingTouristDetails = GetForeignNationalsData(bookingTouristDetailsDto);
                }
                else if (indianNationals)
                {
                    cFormReportDto.BookingTouristDetails = GetIndianNationalsData(bookingTouristDetailsDto);
                }
            }
            catch (Exception exp)
            {
                throw exp;
            }
            return(cFormReportDto);
        }
Example #5
0
    private Table PopulateGroupDetailsTable(CFormReportDTO cFormReportDto)
    {
        TableHeaderRow hRow;
        Table          tblGroupDetails = new Table();
        TableRow       dataRow;
        CityMaster     cityMaster = null;

        string dateHandle = string.Empty;
        string timeHandle = string.Empty;

        hRow = GetGroupHeaderRow();
        tblGroupDetails.Rows.Add(hRow);
        tblGroupDetails.CssClass = "dataTables";

        if (cFormReportDto.BookingTouristDetails != null && cFormReportDto.BookingTouristDetails.Length > 0)
        {
            if (cFormReportDto.BookingTouristDetails[0].IndiaEntryDate == DateTime.MinValue || cFormReportDto.BookingTouristDetails[0].IndiaEntryDate == DateTime.MaxValue)
            {
                dateHandle = string.Empty;
            }
            else
            {
                dateHandle = GF.GetDD_MM_YYYY(cFormReportDto.BookingTouristDetails[0].IndiaEntryDate);
            }
            dataRow = GetGroupRow("Date of Entry into India", dateHandle);
            tblGroupDetails.Rows.Add(dataRow);

            dataRow = GetGroupRow("Proposed stay in India", cFormReportDto.BookingTouristDetails[0].ProposedStayInIndia);
            tblGroupDetails.Rows.Add(dataRow);
        }

        if (cityMaster == null)
        {
            cityMaster = new CityMaster();
        }
        string city = cityMaster.GetCityName(cFormReportDto.BookingDetails.ArrivalCityId);

        dataRow = GetGroupRow("Arrived From", city);
        tblGroupDetails.Rows.Add(dataRow);

        if (cFormReportDto.BookingDetails.ArrivalDateTime == DateTime.MinValue || cFormReportDto.BookingDetails.ArrivalDateTime == DateTime.MaxValue)
        {
            dateHandle = string.Empty;
            timeHandle = string.Empty;
        }
        else
        {
            dateHandle = GF.GetDD_MMM_YYYY(cFormReportDto.BookingDetails.ArrivalDateTime, false);
            timeHandle = GF.GetHHMM(cFormReportDto.BookingDetails.ArrivalDateTime);
        }
        dataRow = GetGroupRow("Date of Arrival", dateHandle);
        tblGroupDetails.Rows.Add(dataRow);

        dataRow = GetGroupRow("Time of Arrival", timeHandle);
        tblGroupDetails.Rows.Add(dataRow);

        TransportMaster transportMaster = new TransportMaster();
        string          transportMode   = transportMaster.GetTransportName(cFormReportDto.BookingDetails.ArrivalTransportId);

        dataRow = GetGroupRow("Mode of Transport", transportMode);
        tblGroupDetails.Rows.Add(dataRow);

        //TransportMaster transportMaster = new TransportMaster();
        //string transportMode = transportMaster.GetTransportName(cFormReportDto.BookingDetails.);
        dataRow = GetGroupRow("Vehicle Name/Type", cFormReportDto.BookingDetails.ArrivalVehicleNameType);
        tblGroupDetails.Rows.Add(dataRow);

        dataRow = GetGroupRow("Vehicle No.", cFormReportDto.BookingDetails.ArrivalVehicleNo);
        tblGroupDetails.Rows.Add(dataRow);

        //dataRow = GetGroupRow("Drivers Name", string.Empty);
        //tblGroupDetails.Rows.Add(dataRow);

        dataRow = GetGroupRow("Drivers No.", cFormReportDto.BookingDetails.ArrivalDriverPhoneNo);
        tblGroupDetails.Rows.Add(dataRow);

        dataRow = GetGroupRow("Transport Company", cFormReportDto.BookingDetails.ArrivalTransportCompany);
        tblGroupDetails.Rows.Add(dataRow);

        dataRow = GetGroupRow("Transport Phone No.", cFormReportDto.BookingDetails.ArrivalTransportCompanyPhoneNo);
        tblGroupDetails.Rows.Add(dataRow);
        if (cityMaster == null)
        {
            cityMaster = new CityMaster();
        }
        city    = string.Empty;
        city    = cityMaster.GetCityName(cFormReportDto.BookingDetails.DepartureCityId);
        dataRow = GetGroupRow("Next destination", city);
        tblGroupDetails.Rows.Add(dataRow);


        if (cFormReportDto.BookingDetails.DepartureDateTime == DateTime.MinValue || cFormReportDto.BookingDetails.DepartureDateTime == DateTime.MaxValue)
        {
            dateHandle = string.Empty;
            timeHandle = string.Empty;
        }
        else
        {
            dateHandle = GF.GetDD_MMM_YYYY(cFormReportDto.BookingDetails.DepartureDateTime, false);
            timeHandle = GF.GetHHMM(cFormReportDto.BookingDetails.DepartureDateTime);
        }
        dataRow = GetGroupRow("Date of departure", dateHandle);
        tblGroupDetails.Rows.Add(dataRow);

        dataRow = GetGroupRow("Time of Departure", timeHandle);
        tblGroupDetails.Rows.Add(dataRow);

        dataRow = GetGroupRow("Whether Employed in India", "No");
        tblGroupDetails.Rows.Add(dataRow);
        dataRow = GetGroupRow("Purpose of visit", "Tourism");
        tblGroupDetails.Rows.Add(dataRow);
        dataRow = GetGroupRow("Submitted on", string.Empty);
        tblGroupDetails.Rows.Add(dataRow);
        dataRow = GetGroupRow("Time", string.Empty);
        tblGroupDetails.Rows.Add(dataRow);
        dataRow = GetGroupRow("Incharge", string.Empty);
        tblGroupDetails.Rows.Add(dataRow);
        dataRow = GetGroupRow("Company Stamp", string.Empty);
        tblGroupDetails.Rows.Add(dataRow);
        dataRow = GetGroupRow("Received : Police Official", string.Empty);
        tblGroupDetails.Rows.Add(dataRow);
        dataRow = GetGroupRow("Police Stamp", string.Empty);
        tblGroupDetails.Rows.Add(dataRow);
        return(tblGroupDetails);
    }