Пример #1
0
    private TableRow GetTouristRow(BookingTouristDTO bookingTouristDTO)
    {
        TableRow  touristRow = new TableHeaderRow();
        TableCell touristCell;

        touristCell          = new TableCell();
        touristCell.CssClass = "dataRowCell";
        touristCell.Text     = bookingTouristDTO.CFormNo.ToString("0000");
        touristRow.Cells.Add(touristCell);

        touristCell          = new TableCell();
        touristCell.CssClass = "dataRowCell";
        touristCell.Text     = bookingTouristDTO.RoomDetails;
        touristRow.Cells.Add(touristCell);

        touristCell          = new TableCell();
        touristCell.CssClass = "dataRowCell";
        touristCell.Text     = bookingTouristDTO.RoomDetails;
        touristRow.Cells.Add(touristCell);

        touristCell          = new TableCell();
        touristCell.CssClass = "dataRowCell";
        touristCell.Text     = bookingTouristDTO.Suffix;
        touristRow.Cells.Add(touristCell);

        touristCell          = new TableCell();
        touristCell.CssClass = "dataRowCell";
        touristCell.Text     = bookingTouristDTO.FirstName;
        touristRow.Cells.Add(touristCell);

        touristCell          = new TableCell();
        touristCell.CssClass = "dataRowCell";
        touristCell.Text     = bookingTouristDTO.MiddleName;
        touristRow.Cells.Add(touristCell);

        touristCell          = new TableCell();
        touristCell.CssClass = "dataRowCell";
        touristCell.Text     = bookingTouristDTO.LastName;
        touristRow.Cells.Add(touristCell);

        touristCell          = new TableCell();
        touristCell.CssClass = "dataRowCell";
        touristCell.Text     = bookingTouristDTO.Gender.ToString();
        touristRow.Cells.Add(touristCell);

        touristCell          = new TableCell();
        touristCell.CssClass = "dataRowCell";
        touristCell.Text     = bookingTouristDTO.Nationality;
        touristRow.Cells.Add(touristCell);

        touristCell          = new TableCell();
        touristCell.CssClass = "dataRowCell";
        if (bookingTouristDTO.DateOfBirth == DateTime.MinValue || bookingTouristDTO.DateOfBirth == DateTime.MaxValue)
        {
            touristCell.Text = string.Empty;
        }
        else
        {
            touristCell.Text = GF.GetDD_MM_YYYY(bookingTouristDTO.DateOfBirth);
        }
        touristRow.Cells.Add(touristCell);

        touristCell          = new TableCell();
        touristCell.CssClass = "dataRowCell";
        touristCell.Text     = bookingTouristDTO.PlaceofBirth;
        touristRow.Cells.Add(touristCell);

        touristCell          = new TableCell();
        touristCell.CssClass = "dataRowCell";
        touristCell.Text     = bookingTouristDTO.PassportNo;
        touristRow.Cells.Add(touristCell);

        touristCell          = new TableCell();
        touristCell.CssClass = "dataRowCell";
        if (bookingTouristDTO.PassportIssueDate == DateTime.MinValue || bookingTouristDTO.PassportIssueDate == DateTime.MaxValue)
        {
            touristCell.Text = string.Empty;
        }
        else
        {
            touristCell.Text = GF.GetDD_MM_YYYY(bookingTouristDTO.PassportIssueDate);
        }
        touristRow.Cells.Add(touristCell);

        touristCell          = new TableCell();
        touristCell.CssClass = "dataRowCell";
        if (bookingTouristDTO.PassportExpiryDate == DateTime.MinValue || bookingTouristDTO.PassportExpiryDate == DateTime.MaxValue)
        {
            touristCell.Text = string.Empty;
        }
        else
        {
            touristCell.Text = GF.GetDD_MM_YYYY(bookingTouristDTO.PassportExpiryDate);
        }
        touristRow.Cells.Add(touristCell);

        touristCell          = new TableCell();
        touristCell.CssClass = "dataRowCell";
        touristCell.Text     = bookingTouristDTO.VisaNo;
        touristRow.Cells.Add(touristCell);

        touristCell          = new TableCell();
        touristCell.CssClass = "dataRowCell";
        if (bookingTouristDTO.VisaExpiryDate == DateTime.MinValue || bookingTouristDTO.VisaExpiryDate == DateTime.MaxValue)
        {
            touristCell.Text = string.Empty;
        }
        else
        {
            touristCell.Text = GF.GetDD_MM_YYYY(bookingTouristDTO.VisaExpiryDate);
        }
        touristRow.Cells.Add(touristCell);

        return(touristRow);
    }
Пример #2
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);
    }