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