private Table PrepareBookingHeaderDataRow(RoomBookingDateWiseDTO oRoomBookingDateWiseData) { Table t = new Table(); TableRow tr = new TableRow(); TableCell tc; t.Attributes.Add("class", "bookingHeaderDataRowTable"); string sPanelId = Constants.PANEL_DETAIL + "_" + oRoomBookingDateWiseData.BookingId; tc = new TableCell(); HtmlImage showhideImage = new HtmlImage(); showhideImage.Src = "~/images/icon_summary_plus_On.gif"; showhideImage.ID = Constants.IMAGE + sPanelId; showhideImage.Attributes.Add("onclick", "showhide('" + sPanelId.ToString() + "')"); tc.Controls.Add(showhideImage); tr.Cells.Add(tc); tc = new TableCell(); tc.Attributes.Add("class", "bookingHeaderDataRowcell"); tc.Text = "Booking Code: <br>" + oRoomBookingDateWiseData.BookingCode; tr.Cells.Add(tc); tc = new TableCell(); tc.Attributes.Add("class", "bookingHeaderDataRowcell"); tc.Text = "Booking Reference: <br>" + oRoomBookingDateWiseData.BookingReference; tr.Cells.Add(tc); tc = new TableCell(); tc.Attributes.Add("class", "bookingHeaderDataRowcell"); tc.Text = "Check In: <br>" + GF.GetDD_MMM_YYYY(oRoomBookingDateWiseData.Startdate, false); tr.Cells.Add(tc); tc = new TableCell(); tc.Attributes.Add("class", "bookingHeaderDataRowcell"); tc.Text = "Check Out: <br>" + GF.GetDD_MMM_YYYY(oRoomBookingDateWiseData.Enddate, false); tr.Cells.Add(tc); if (oRoomBookingDateWiseData.AgentName != null && oRoomBookingDateWiseData.AgentName != string.Empty) { tc = new TableCell(); tc.Attributes.Add("class", "bookingHeaderDataRowcell"); tc.Text = "Agent Name: " + oRoomBookingDateWiseData.AgentName; tr.Cells.Add(tc); } t.Rows.Add(tr); return(t); }
protected void dgAccomodationSeasons_SelectedIndexChanged(object sender, EventArgs e) { int iAccomID = Convert.ToInt32(dgAccomodationSeasons.DataKeys[dgAccomodationSeasons.SelectedIndex]); hfId.Value = iAccomID.ToString(); DateTime dt; DateTime.TryParse(dgAccomodationSeasons.SelectedItem.Cells[1].Text.ToString().Trim(), out dt); hfOldSeasonStartDate.Value = txtSeasonStartDate.Text = GF.GetDD_MMM_YYYY(dt, false); DateTime.TryParse(dgAccomodationSeasons.SelectedItem.Cells[2].Text.ToString().Trim(), out dt); hfOldSeasonEndDate.Value = txtSeasonEndDate.Text = GF.GetDD_MMM_YYYY(dt, false); btnCancel.Visible = true; btnDelete.Enabled = true; btnEdit.Text = "Update"; lblStatus.Text = ""; }
protected void dgRooms_SelectedIndexChanged(object sender, EventArgs e) { int iAccomID = Convert.ToInt32(dgRooms.DataKeys[dgRooms.SelectedIndex]); Bindrooms(iAccomID); hfId.Value = iAccomID.ToString(); string roomid = dgRooms.Items[dgRooms.SelectedIndex].Cells[0].Text; ddlRoomNo.SelectedValue = roomid; hfRoomid.Value = roomid; DateTime dt; DateTime.TryParse(dgRooms.SelectedItem.Cells[1].Text.ToString().Trim(), out dt); hfOldSeasonStartDate.Value = txtSeasonStartDate.Text = GF.GetDD_MMM_YYYY(dt, false); DateTime.TryParse(dgRooms.SelectedItem.Cells[2].Text.ToString().Trim(), out dt); hfOldSeasonEndDate.Value = txtSeasonEndDate.Text = GF.GetDD_MMM_YYYY(dt, false); txtreason.Text = dgRooms.Items[dgRooms.SelectedIndex].Cells[4].Text; btnCancel.Visible = true; btnDelete.Enabled = true; btnEdit.Text = "Update"; lblStatus.Text = ""; }
private string PrepareBookingText(BookingDTO BookingDTO) { StringBuilder emailText = new StringBuilder(); emailText.Append(string.Empty); string bookingtype = ""; StringBuilder Labelstyle = new StringBuilder(); Labelstyle.Append(string.Empty); Labelstyle.Append("font-family: Arial, Helvetica, sans-serif; font-size: 10pt;"); Labelstyle.Append("padding-right:10px;"); Labelstyle.Append("border-style: none none solid;"); Labelstyle.Append("background-color:#d8e1e8;"); Labelstyle.Append("border-color:#e0dfe3;"); Labelstyle.Append("border-bottom-width:1px;"); StringBuilder Datastyle = new StringBuilder(); Datastyle.Append(string.Empty); Datastyle.Append("font-family: Arial, Helvetica, sans-serif; font-size: 10pt;"); Datastyle.Append("padding-right:10px; padding-left:5px;"); Datastyle.Append("border-style: none none solid;"); Datastyle.Append("border-color:#e0dfe3;"); Datastyle.Append("border-bottom-width:1px;"); StringBuilder Datastyle1 = new StringBuilder(); Datastyle1.Append(string.Empty); Datastyle1.Append("font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color:blue;"); Datastyle1.Append("padding-right:10px; padding-left:5px;"); Datastyle1.Append("border-style: none none solid;"); Datastyle1.Append("border-color:#e0dfe3;"); Datastyle1.Append("border-bottom-width:1px;"); emailText.Append("<table id=tblBooking style='font-size:12px'>"); #region Booking Details emailText.Append("<tr>"); emailText.Append("<td style='" + Labelstyle + "'>Booking Id:</td>"); emailText.Append("<td style='" + Datastyle1 + "'>" + BookingDTO.BookingCode.ToString() + "</td>"); emailText.Append("</tr>"); emailText.Append("<tr>"); emailText.Append("<td style='" + Labelstyle + "'>Agent Name:</td>"); emailText.Append("<td style='" + Datastyle + "'>" + BookingDTO.AgentName + "</td>"); emailText.Append("</tr>"); emailText.Append("<tr>"); emailText.Append("<td style='" + Labelstyle + "'>Accommodation:</td>"); emailText.Append("<td style='" + Datastyle + "'>" + BookingDTO.AccomodationName + "</td>"); emailText.Append("</tr>"); emailText.Append("<tr>"); emailText.Append("<td style='" + Labelstyle + "'>Check In:</td>"); emailText.Append("<td style='" + Datastyle + "'>" + GF.GetDD_MMM_YYYY(BookingDTO.StartDate, false) + "</td>"); emailText.Append("</tr>"); emailText.Append("<tr>"); emailText.Append("<td style='" + Labelstyle + "'>Check Out:</td>"); emailText.Append("<td style='" + Datastyle + "'>" + GF.GetDD_MMM_YYYY(BookingDTO.EndDate, false) + "</td>"); emailText.Append("</tr>"); emailText.Append("<tr>"); emailText.Append("<td style='" + Labelstyle + "'>Booking Status:</td>"); emailText.Append("<td style='" + Datastyle1 + "'>" + BookingDTO.BookingStatus.ToString() + "</td>"); emailText.Append("</tr>"); emailText.Append("<tr>"); emailText.Append("<td style='" + Labelstyle + "'>Pax:</td>"); emailText.Append("<td style='" + Datastyle + "'>" + BookingDTO.NoOfPersons.ToString() + "</td>"); emailText.Append("</tr>"); emailText.Append("<tr>"); emailText.Append("<td style='" + Labelstyle + "'>Nights:</td>"); emailText.Append("<td style='" + Datastyle + "'>" + BookingDTO.NoOfNights.ToString() + "</td>"); emailText.Append("</tr>"); emailText.Append("</table>"); #endregion Booking Details return(emailText.ToString()); }
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); }