public bool ConfirmBooking(BookingDTO objBooking) { try { if (oDB == null) { oDB = new DatabaseManager(); } string sProcName = "up_Booking_Confirmation"; oDB.DbCmd = oDB.GetStoredProcCommand(sProcName); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iBookingID", DbType.Int32, objBooking.BookingId); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sExOrderNo", DbType.String, objBooking.ExchangeOrderNo); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@dtVoucherDate", DbType.DateTime, GF.Handle19000101(objBooking.VoucherDate, false)); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@dtArrivalDT", DbType.DateTime, GF.HandleMaxMinDates(objBooking.ArrivalDateTime, true)); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sArrivalTransport", DbType.String, objBooking.ArrivalTransport); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iArrivalCityId", DbType.Int32, objBooking.ArrivalCityId); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@dtDepartureDT", DbType.DateTime, GF.HandleMaxMinDates(objBooking.DepartureDateTime, true)); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sDepartureTransport", DbType.String, objBooking.DepartureTransport); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iDepartureCityId", DbType.Int32, objBooking.DepartureCityId); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sArrivalVehicleNo", DbType.String, objBooking.ArrivalVehicleNo); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sArrivalTransportCompany", DbType.String, objBooking.ArrivalTransportCompany); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sDepartureVehicleNo", DbType.String, objBooking.DepartureVehicleNo); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sDepartureTransportCompany", DbType.String, objBooking.DepartureTransportCompany); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sTourID", DbType.String, objBooking.TourId); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@ArrivalVehicleNameType", DbType.String, objBooking.ArrivalVehicleNameType); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@ArrivalTransportCompanyPhoneNo", DbType.String, objBooking.ArrivalTransportCompanyPhoneNo); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@ArrivalDriverPhoneNo", DbType.String, objBooking.ArrivalDriverPhoneNo); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@DepartureVehicleNameType", DbType.String, objBooking.DepartureVehicleNameType); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@DepartureTransportCompanyPhoneNo", DbType.String, objBooking.DepartureTransportCompanyPhoneNo); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@DepartureDriverPhoneNo", DbType.String, objBooking.DepartureDriverPhoneNo); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@arrivalTransportId", DbType.String, objBooking.ArrivalTransportId); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@departureTransportId", DbType.String, objBooking.DepartureTransportId); oDB.ExecuteNonQuery(oDB.DbCmd); } catch (Exception exp) { oDB = null; objBooking = null; GF.LogError("clsBookingConfirmationHandler.ConfirmBooking", exp.Message); } return(true); }
private void FillTouristDetails(BookingTouristDTO oBookingTouristDTO) { ddlSuffix.Text = oBookingTouristDTO.Suffix; txtAllerges.Text = oBookingTouristDTO.Allergies.ToString(); txtArrivaldate.Text = oBookingTouristDTO.ArrivalDateTime == DateTime.MinValue ? "" : GF.Handle19000101(oBookingTouristDTO.ArrivalDateTime, false); txtBirthPlace.Text = oBookingTouristDTO.PlaceofBirth.ToString(); txtDOB.Text = oBookingTouristDTO.DateOfBirth == DateTime.MinValue ? "" : GF.Handle19000101(oBookingTouristDTO.DateOfBirth, false); txtFName.Text = oBookingTouristDTO.FirstName.ToString(); txtMName.Text = oBookingTouristDTO.MiddleName.ToString(); txtLName.Text = oBookingTouristDTO.LastName.ToString(); txtEmailId.Text = oBookingTouristDTO.EmailId.ToString(); ddlGender.SelectedValue = oBookingTouristDTO.Gender == '\0' ? "0" : oBookingTouristDTO.Gender.ToString(); ddlNationality.Text = oBookingTouristDTO.NationalityId.ToString(); txtMealPref.Text = oBookingTouristDTO.MealPreferences.ToString(); txtMessage.Text = oBookingTouristDTO.SpecialMessage.ToString(); txtPassportExpiryDate.Text = oBookingTouristDTO.PassportExpiryDate == DateTime.MinValue ? "" : GF.Handle19000101(oBookingTouristDTO.PassportExpiryDate, false); txtPassportIssueDate.Text = oBookingTouristDTO.PassportIssueDate == DateTime.MinValue ? "" : GF.Handle19000101(oBookingTouristDTO.PassportIssueDate, false); txtPassportNo.Text = oBookingTouristDTO.PassportNo.ToString(); txtPermAdd.Text = oBookingTouristDTO.PermanentAddressInIndia.ToString(); txtProStayInIndia.Text = String.IsNullOrEmpty(oBookingTouristDTO.ProposedStayInIndia) ? String.Empty : oBookingTouristDTO.ProposedStayInIndia; txtRoomDetails.Text = oBookingTouristDTO.RoomDetails.ToString(); txtVisaExpiryDate.Text = oBookingTouristDTO.VisaExpiryDate == DateTime.MinValue ? "" : GF.Handle19000101(oBookingTouristDTO.VisaExpiryDate, false); txtVisaNo.Text = oBookingTouristDTO.VisaNo.ToString(); txtVisitPurpose.Text = oBookingTouristDTO.VisitPurpose.ToString(); txtIndiaEntryDate.Text = oBookingTouristDTO.IndiaEntryDate == DateTime.MinValue ? "" : GF.Handle19000101(oBookingTouristDTO.IndiaEntryDate, false); }