private void PopulateCFormReport(int bookingId) { BookingReportServices bookingReportManager; CFormReportDTO cFormReportDto; Table tblTouristDetails; Table tblGroupDetails; #region Get Tourist List bookingReportManager = new BookingReportServices(); if (CFormType.ToUpper() == "FN") { cFormReportDto = bookingReportManager.GetCFormDataForForeignNationals(bookingId); } else if (CFormType.ToUpper() == "IN") { cFormReportDto = bookingReportManager.GetCFormDataForIndianNationals(bookingId); } else { cFormReportDto = bookingReportManager.GetCFormData(bookingId); } #endregion #region Validate Tourist List if (cFormReportDto.BookingTouristDetails == null || cFormReportDto.BookingTouristDetails.Length == 0) { string msg = string.Empty; if (CFormType.ToUpper() == "FN") { msg = "Please add foreign national tourists in this booking, before generating the C-Form report."; } else if (CFormType.ToUpper() == "IN") { msg = "Please add indian national tourists in this booking, before generating the C-Form report."; } else { msg = "Please add tourists in this booking, before generating the C-Form report."; } base.DisplayAlert(msg); return; } #endregion #region Populate HTML Controls tblTouristDetails = PopulateTouristDetailsTable(cFormReportDto); pnlTouristDetails.Controls.Add(tblTouristDetails); tblGroupDetails = PopulateGroupDetailsTable(cFormReportDto); pnlGroupDetails.Controls.Add(tblGroupDetails); #endregion PopulateLabels(cFormReportDto); }