private RoomBookingDateWiseDTO[] GetBookingDataForChart(int AccomodationTypeId, int RegionId, int AccomodationId, string RoomNo, DateTime FromDate, DateTime ToDate) { DataSet ds; RoomBookingDateWiseDTO[] dateWiseBookingData; string sProcName; DatabaseManager oDB; ds = null; dateWiseBookingData = null; try { oDB = new DatabaseManager(); sProcName = "up_Get_BookingDataForChart"; oDB.DbCmd = oDB.GetStoredProcCommand(sProcName); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@AccomodationTypeId", DbType.Int32, AccomodationTypeId); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@RegionId", DbType.Int32, RegionId); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@AccomodationId", DbType.Int32, AccomodationId); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@RoomNo", DbType.String, RoomNo); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@FromDate", DbType.Date, GF.HandleMaxMinDates(FromDate, false)); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@ToDate", DbType.Date, GF.HandleMaxMinDates(ToDate, false)); ds = oDB.ExecuteDataSet(oDB.DbCmd); dateWiseBookingData = MapDBToObject(ds); } catch (Exception exp) { oDB = null; ds = null; throw exp; } return(dateWiseBookingData); }
public bool AddSeriesBookingRooms(clsSeriesBookingDTO[] SeriesBokingDTO) { DatabaseManager oDB; try { oDB = new DatabaseManager(); string sProcName = "up_SaveSeriesBookingRooms"; if (SeriesBokingDTO != null) { for (int i = 0; i < SeriesBokingDTO.Length; i++) { if (SeriesBokingDTO[i] != null) { oDB.DbCmd = oDB.GetStoredProcCommand(sProcName); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@dtStartDate", DbType.Int32); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@dtEndDate", DbType.Int32); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iAcomID", DbType.Int32); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iRoomCategoryID", DbType.Int32); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iRoomTypeID", DbType.DateTime); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iRequired", DbType.DateTime); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iNoOfRooms", DbType.Int32); oDB.DbCmd.Parameters[0].Value = SeriesBokingDTO[i].BookingID; oDB.DbCmd.Parameters[1].Value = SeriesBokingDTO[i].AccomodationID; oDB.DbCmd.Parameters[2].Value = SeriesBokingDTO[i].RoomCategoryID; oDB.DbCmd.Parameters[3].Value = SeriesBokingDTO[i].RoomTypeID; oDB.DbCmd.Parameters[4].Value = GF.HandleMaxMinDates(SeriesBokingDTO[i].StartDate, false); oDB.DbCmd.Parameters[5].Value = GF.HandleMaxMinDates(SeriesBokingDTO[i].EndDate, false); oDB.DbCmd.Parameters[6].Value = SeriesBokingDTO[i].NoOfRooms; oDB.ExecuteNonQuery(oDB.DbCmd); oDB.DbCmd.Parameters.Clear(); } } } } catch (Exception exp) { oDB = null; SeriesBokingDTO = null; GF.LogError("clsBookingRoomHandler.AddSeriesBookingRooms", exp.Message); return(false); } finally { oDB = null; SeriesBokingDTO = null; } return(true); }
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); }
public List <SeriesDTO> GetSeries(SeriesDTO SeriesDTO) { List <SeriesDTO> oSeriesList = new List <SeriesDTO>(); SeriesDTO Series; DataSet dsSeries; DataRow dr; DatabaseManager oDB; string sProcName = string.Empty; try { oDB = new DatabaseManager(); sProcName = "up_Get_Series"; oDB.DbCmd = oDB.GetStoredProcCommand(sProcName); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@SeriesId", DbType.Int32, SeriesDTO.SeriesId); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@AccomId", DbType.Int32, SeriesDTO.AccomodationID); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@SeriesStartDate", DbType.Date, GF.HandleMaxMinDates(SeriesDTO.SeriesStartDate, false)); dsSeries = oDB.ExecuteDataSet(oDB.DbCmd); oDB = null; } catch (Exception exp) { oDB = null; dsSeries = null; GF.LogError("clsSeriesHandler.GetSeries", exp.Message); } if (dsSeries != null) { //oBookingRoomDTO[dsSeries.Tables[0].Rows.Count] = new BookingRoomDTO(); for (int i = 0; i < dsSeries.Tables[0].Rows.Count; i++) { Series = new SeriesDTO(); dr = dsSeries.Tables[0].Rows[i]; Series.SeriesId = Convert.ToInt32(dr.ItemArray.GetValue(0)); Series.Accomodation = Convert.ToString(dr.ItemArray.GetValue(1)); Series.SeriesName = Convert.ToString(dr.ItemArray.GetValue(2)); Series.NoOfNights = Convert.ToInt32(dr.ItemArray.GetValue(3)); Series.GAP = Convert.ToInt32(dr.ItemArray.GetValue(4).ToString()); Series.NoOfDepartures = Convert.ToInt32(dr.ItemArray.GetValue(5)); Series.SeriesStartDate = Convert.ToDateTime(dr.ItemArray.GetValue(6)); Series.AccomodationID = Convert.ToInt32(dr.ItemArray.GetValue(7)); Series.AccomTypeID = Convert.ToInt32(dr.ItemArray.GetValue(8)); Series.AgentId = Convert.ToInt32(dr.ItemArray.GetValue(9)); oSeriesList.Add(Series); } } return(oSeriesList); }
private bool SaveData(BookingTouristDTO oBookingTouristDTO, Action oAction, out int TouristNo) { int iTouristNo = 0; TouristNo = 0; try { oDB = new DatabaseManager(); string sProcName = ""; if (oAction == Action.insert) { sProcName = "up_Ins_BookingTourist"; } else if (oAction == Action.update) { sProcName = "up_Upd_BookingTourist"; } oDB.DbCmd = oDB.GetStoredProcCommand(sProcName); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@BookingId", DbType.Int32, oBookingTouristDTO.BookingId); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@BookingCode", DbType.String, oBookingTouristDTO.BookingCode == null ? string.Empty : oBookingTouristDTO.BookingCode); if (oAction == Action.update) { oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@TouristNo", DbType.Int32, oBookingTouristDTO.TouristNo); } oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@FirstName", DbType.String, DataSecurityManager.Encrypt(oBookingTouristDTO.FirstName)); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@MiddleName", DbType.String, DataSecurityManager.Encrypt(oBookingTouristDTO.MiddleName)); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@LastName", DbType.String, DataSecurityManager.Encrypt(oBookingTouristDTO.LastName)); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@Gender", DbType.String, oBookingTouristDTO.Gender); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@NationalityId", DbType.Int32, oBookingTouristDTO.NationalityId); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@PassportNo", DbType.String, DataSecurityManager.Encrypt(oBookingTouristDTO.PassportNo)); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@DOB", DbType.DateTime, oBookingTouristDTO.DateOfBirth); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@PlaceofBirth", DbType.String, oBookingTouristDTO.PlaceofBirth); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@PPIssueDate", DbType.DateTime, GF.HandleMaxMinDates(oBookingTouristDTO.PassportIssueDate, false)); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@PPExpiryDate", DbType.DateTime, GF.HandleMaxMinDates(oBookingTouristDTO.PassportExpiryDate, false)); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@VisaNo", DbType.String, DataSecurityManager.Encrypt(oBookingTouristDTO.VisaNo)); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@VisaExpiryDate", DbType.DateTime, GF.HandleMaxMinDates(oBookingTouristDTO.VisaExpiryDate, false)); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@IndiaEntryDate", DbType.DateTime, GF.HandleMaxMinDates(oBookingTouristDTO.IndiaEntryDate, false)); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@ProposedStayInIndia", DbType.String, oBookingTouristDTO.ProposedStayInIndia); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@ArrivalDateTime", DbType.DateTime, GF.HandleMaxMinDates(oBookingTouristDTO.ArrivalDateTime, true)); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@ArrivedFrom", DbType.String, String.Empty); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@VehicleNo", DbType.String, String.Empty); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@TransportCompany", DbType.String, String.Empty); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@TransportMode", DbType.String, String.Empty); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@RoomDetails", DbType.String, oBookingTouristDTO.RoomDetails); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@NextDestination", DbType.String, String.Empty); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@DepartureDateTime", DbType.DateTime, GF.HandleMaxMinDates(oBookingTouristDTO.departuredate, true)); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@EmployedinIndia", DbType.Boolean, oBookingTouristDTO.EmployedinIndia); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@VisitPurpose", DbType.String, oBookingTouristDTO.VisitPurpose); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@PermanentAddressInIndia", DbType.String, oBookingTouristDTO.PermanentAddressInIndia); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@MealPlan", DbType.String, String.Empty); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@Allergies", DbType.String, oBookingTouristDTO.Allergies); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@MealPref", DbType.String, oBookingTouristDTO.MealPreferences); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@SpecialMessage", DbType.String, oBookingTouristDTO.SpecialMessage); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@VehicleName", DbType.String, String.Empty); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@DriverName", DbType.String, String.Empty); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@DriverPhoneNo", DbType.String, String.Empty); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@TransportPhoneNo", DbType.String, String.Empty); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@Suffix", DbType.String, oBookingTouristDTO.Suffix); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@EmailId", DbType.String, oBookingTouristDTO.EmailId); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@ArrivalVehicalno", DbType.String, oBookingTouristDTO.arrivalvehiaclno); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@DpartureVehicalno", DbType.String, oBookingTouristDTO.departurevehicalno); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@DepartureCity", DbType.String, oBookingTouristDTO.departureairport); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@ArrivalCity", DbType.String, oBookingTouristDTO.arrivalairport); iTouristNo = 0; if (oAction == Action.insert) { iTouristNo = Convert.ToInt32(oDB.ExecuteScalar(oDB.DbCmd)); } else if (oAction == Action.update) { oDB.ExecuteNonQuery(oDB.DbCmd); } TouristNo = iTouristNo; } catch (Exception exp) { oDB = null; oBookingTouristDTO = null; GF.LogError("clsBookingTouristHandler.SaveData", exp.Message); return(false); } return(true); }
public BookingChartDTO[] GetRoomDetmaintenance(int AccomodationTypeId, int RegionId, int AccomodationId, string RoomNo, DateTime FromDate, DateTime ToDate) { DataSet dsBookingChartData; DataRow dr; BookingChartDTO[] oBookingChartDTO; string sProcName; DatabaseManager oDB; dsBookingChartData = null; oBookingChartDTO = null; try { oDB = new DatabaseManager(); sProcName = "up_Get_BookingChartMaintenance"; oDB.DbCmd = oDB.GetStoredProcCommand(sProcName); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@AccomodationTypeId", DbType.Int32, AccomodationTypeId); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@RegionId", DbType.Int32, RegionId); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@AccomodationId", DbType.Int32, AccomodationId); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@RoomNo", DbType.String, RoomNo); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@FromDate", DbType.Date, GF.HandleMaxMinDates(FromDate, false)); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@ToDate", DbType.Date, GF.HandleMaxMinDates(ToDate, false)); dsBookingChartData = oDB.ExecuteDataSet(oDB.DbCmd); if (dsBookingChartData != null) { oBookingChartDTO = new BookingChartDTO[dsBookingChartData.Tables[0].Rows.Count]; for (int i = 0; i < dsBookingChartData.Tables[0].Rows.Count; i++) { oBookingChartDTO[i] = new BookingChartDTO(); dr = dsBookingChartData.Tables[0].Rows[i]; if (dr.ItemArray.GetValue(0) != DBNull.Value) { oBookingChartDTO[i].AccomodationTypeId = Convert.ToInt32(dr.ItemArray.GetValue(0)); } if (dr.ItemArray.GetValue(1) != DBNull.Value) { oBookingChartDTO[i].AccomodationType = Convert.ToString(dr.ItemArray.GetValue(1)); } if (dr.ItemArray.GetValue(2) != DBNull.Value) { oBookingChartDTO[i].AccomodationId = Convert.ToInt32(dr.ItemArray.GetValue(2)); } if (dr.ItemArray.GetValue(3) != DBNull.Value) { oBookingChartDTO[i].AccomodationName = Convert.ToString(dr.ItemArray.GetValue(3)); } if (dr.ItemArray.GetValue(4) != DBNull.Value) { oBookingChartDTO[i].RegionId = Convert.ToInt32(dr.ItemArray.GetValue(4)); } if (dr.ItemArray.GetValue(5) != DBNull.Value) { oBookingChartDTO[i].RegionName = Convert.ToString(dr.ItemArray.GetValue(5)); } if (dr.ItemArray.GetValue(6) != DBNull.Value) { oBookingChartDTO[i].RoomNo = Convert.ToString(dr.ItemArray.GetValue(6)); } if (dr.ItemArray.GetValue(7) != DBNull.Value) { oBookingChartDTO[i].AccomInitial = Convert.ToString(dr.ItemArray.GetValue(7)); } if (dr.ItemArray.GetValue(8) != DBNull.Value) { oBookingChartDTO[i].RoomCategoryAlias = Convert.ToString(dr.ItemArray.GetValue(8)); } if (dr.ItemArray.GetValue(9) != DBNull.Value) { oBookingChartDTO[i].FromDt = Convert.ToDateTime(dr.ItemArray.GetValue(9)); } if (dr.ItemArray.GetValue(10) != DBNull.Value) { oBookingChartDTO[i].Todt = Convert.ToDateTime(dr.ItemArray.GetValue(10)); } if (dr.ItemArray.GetValue(11) != DBNull.Value) { oBookingChartDTO[i].Reason = Convert.ToString(dr.ItemArray.GetValue(11)); } } } } catch (Exception exp) { oDB = null; dsBookingChartData = null; throw exp; } finally { oDB = null; } return(oBookingChartDTO); }
public bool AddBookingRooms(BookedRooms[] oBookedRooms) { DatabaseManager oDB; try { oDB = new DatabaseManager(); string sProcName = "up_Ins_BookingRoom"; if (oBookedRooms != null) { for (int i = 0; i < oBookedRooms.Length; i++) { if (oBookedRooms[i] != null) { oDB.DbCmd = oDB.GetStoredProcCommand(sProcName); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iBookingId", DbType.Int32); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iAccomId", DbType.Int32); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@sRoomNo", DbType.String); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@dtStartDate", DbType.DateTime); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@dtEndDate", DbType.DateTime); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@iPaxStaying", DbType.Int32); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@bConvertTo_Double_Twin", DbType.Byte); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@cRoomStatus", DbType.String); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@Action", DbType.String); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@Amt", DbType.Double); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@PaymentId", DbType.String); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@paidAmt", DbType.Double); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@RoomCategoryId", DbType.Int32); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@TaxableAmount", DbType.Int32); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@TaxPercentage", DbType.Int32); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@TaxAmount", DbType.Int32); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@DiscountPercent", DbType.Int32); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@DiscountAmount", DbType.Int32); oDB.DbCmd.Parameters[0].Value = oBookedRooms[i].BookingId; oDB.DbCmd.Parameters[1].Value = oBookedRooms[i].AccomodationId; oDB.DbCmd.Parameters[2].Value = oBookedRooms[i].RoomNo; oDB.DbCmd.Parameters[3].Value = GF.HandleMaxMinDates(oBookedRooms[i].StartDate, false); oDB.DbCmd.Parameters[4].Value = GF.HandleMaxMinDates(oBookedRooms[i].EndDate, false); oDB.DbCmd.Parameters[5].Value = oBookedRooms[i].PaxStaying; if (oBookedRooms[i].ConvertTo_Double_Twin == true) { oDB.DbCmd.Parameters[6].Value = 1; } else if (oBookedRooms[i].ConvertTo_Double_Twin == false) { oDB.DbCmd.Parameters[6].Value = 0; } oDB.DbCmd.Parameters[7].Value = oBookedRooms[i].RoomStatus; oDB.DbCmd.Parameters[8].Value = oBookedRooms[i].action; oDB.DbCmd.Parameters[9].Value = oBookedRooms[i].Price; oDB.DbCmd.Parameters[10].Value = oBookedRooms[i].PaymentId; oDB.DbCmd.Parameters[11].Value = oBookedRooms[i].Amount; oDB.DbCmd.Parameters[12].Value = oBookedRooms[i].RoomCategoryId; oDB.DbCmd.Parameters[13].Value = oBookedRooms[i].taxableprice; oDB.DbCmd.Parameters[14].Value = oBookedRooms[i].tax; oDB.DbCmd.Parameters[15].Value = oBookedRooms[i].taxamount; oDB.DbCmd.Parameters[16].Value = oBookedRooms[i].Discount; oDB.DbCmd.Parameters[17].Value = oBookedRooms[i].DiscountPrice; oDB.ExecuteNonQuery(oDB.DbCmd); oDB.DbCmd.Parameters.Clear(); } } } } catch (Exception exp) { oDB = null; oBookedRooms = null; GF.LogError("clsBookingRoomHandler.AddBookingRooms", exp.Message); return(false); } finally { oDB = null; oBookedRooms = null; } return(true); }