public int BookTour(clsBookingData objBooking) { int iBookingID; try { if (oDB == null) { oDB = new clsDatabaseManager(); } string sProcName = "up_BookTour"; SqlParameter[] p = new SqlParameter[7]; p[0] = new SqlParameter("@sGroupID", SqlDbType.VarChar, 50); p[0].Value = objBooking.TourId; p[1] = new SqlParameter("@dtStartDate", SqlDbType.DateTime); p[1].Value = objBooking.ArrivalDate; p[2] = new SqlParameter("@dtEndDate", SqlDbType.DateTime); p[2].Value = objBooking.DepartureDate; p[3] = new SqlParameter("@iAccomType", SqlDbType.Int); p[3].Value = objBooking.AccomodationTypeId; p[4] = new SqlParameter("@iAccomSubType", SqlDbType.Int); p[4].Value = objBooking.AccomodationId; p[5] = new SqlParameter("@iNights", SqlDbType.Int); p[5].Value = objBooking.NoOfNights; p[6] = new SqlParameter("@iPersons", SqlDbType.Int); p[6].Value = objBooking.NoOfPersons; iBookingID = oDB.ExecuteStoredProcedure(sProcName, p); } catch { throw new Exception("The method or operation is not implemented."); } return(iBookingID); }
public DataSet GetBookingData(DateTime StartDate, DateTime EndDate, int RegionId, int AccomodationTypeId, int AccomodationId) { clsDatabaseManager oDB; DataSet ds; ds = null; oDB = new clsDatabaseManager(); string Query = ""; Query = "select RB.BookingNo, RB.AccomId, RB.RoomNo, RB.StartDate, RB.EndDate, RB.BookingStatusId, " + " AGM.AgentCode, BSM.BookingStatusColor from tblRoomBooking RB " + " left join tblAgentMaster AGM on RB.AgentId = AGM.AgentId " + " join tblBookingStatusMaster BSM on BSM.BookingStatusId = RB.BookingStatusId " + " join tblAccomMaster AM on RB.AccomId = AM.AccomId " + " where 1=1 " + " and StartDate between '" + StartDate.Year + "-" + StartDate.Month + "-" + StartDate.Day + "' and '" + EndDate.Year + "-" + EndDate.Month + "-" + EndDate.Day + "'"; if (RegionId != 0) { Query += " and AM.RegionId = " + RegionId; } if (AccomodationTypeId != 0) { Query += " and AM.AccomTypeId = " + AccomodationTypeId; } if (AccomodationId != 0) { Query += " and AM.AccomId = " + AccomodationId; } ds = oDB.FetchRecords("BookingData", Query); return(ds); }
public bool AddBookingRooms(clsBookingRoomData[] oBookingRoomData) { clsDatabaseManager oDB; try { oDB = new clsDatabaseManager(); string sProcName = "up_Ins_BookingRoom"; SqlParameter[] p = new SqlParameter[7]; p[0] = new SqlParameter("@iBookingId", SqlDbType.Int); p[1] = new SqlParameter("@sBookingCode", SqlDbType.VarChar, 12); p[2] = new SqlParameter("@iAccomId", SqlDbType.Int); p[3] = new SqlParameter("@iOccupancyId", SqlDbType.Int); p[4] = new SqlParameter("@iTypeId", SqlDbType.Int); p[5] = new SqlParameter("@dtStartDate", SqlDbType.DateTime); p[6] = new SqlParameter("@dtEndDate", SqlDbType.DateTime); for (int i = 0; i < oBookingRoomData.Length; i++) { p[0].Value = oBookingRoomData[i].BookingId; p[1].Value = oBookingRoomData[i].BookingCode; p[2].Value = oBookingRoomData[i].AccomodationId; p[3].Value = oBookingRoomData[i].OccupancyData.OccupancyID; p[4].Value = oBookingRoomData[i].RoomTypeData.RoomTypeID; p[5].Value = oBookingRoomData[i].StartDate; p[6].Value = oBookingRoomData[i].EndDate; oDB.ExecuteStoredProcedure(sProcName, p); } } catch { throw new Exception("The method or operation is not implemented."); } return(true); }
private DataSet GetDataFromDB(string Query) { clsDatabaseManager oDB = new clsDatabaseManager(); DataSet ds = oDB.FetchRecords("tblBookingDetails", Query); return(ds); }
public static void HasRecords(string ID, string MasterName, out string Message) { string sProcName; clsDatabaseManager oDB; try { oDB = new clsDatabaseManager(); Message = ""; sProcName = "up_GetRecordCount"; oDB.DbCmd = oDB.GetStoredProcCommand(sProcName); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@ID", DbType.String, ID); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@MasterName", DbType.String, MasterName); oDB.DbDatabase.AddOutParameter(oDB.DbCmd, "@Message", DbType.String, 500); oDB.ExecuteNonQuery(oDB.DbCmd); Message = oDB.DbCmd.Parameters[2].Value.ToString(); } catch (Exception exp) { GF.LogError("clsAccomodationMaster.HasRecords", exp.Message.ToString()); oDB = null; Message = ""; } finally { oDB = null; } }
public static string GetMailSolution() { string str; str = " select MailSolution from tblSystemMaster "; objDB = new clsDatabaseManager(); return(objDB.GetColumnValue(str)); }
public bool InsertTouristDetails(clsBookingTouristData oBookingTouristData) { int iTouristNo; clsDatabaseManager oDB; try { oDB = new clsDatabaseManager(); string sProcName = "up_Ins_BookingTourist"; SqlParameter[] p = new SqlParameter[31]; p[0] = new SqlParameter("@BookingId", SqlDbType.Int, 4); p[1] = new SqlParameter("@BookingCode", SqlDbType.VarChar, 12); //p[2] = new SqlParameter("@TouristNo", SqlDbType.Int, 4); p[2] = new SqlParameter("@FirstName", SqlDbType.VarChar, 50); p[3] = new SqlParameter("@MiddleName", SqlDbType.VarChar, 50); p[4] = new SqlParameter("@LastName", SqlDbType.VarChar, 50); p[5] = new SqlParameter("@Gender", SqlDbType.Char, 1); p[6] = new SqlParameter("@Nationality", SqlDbType.VarChar, 20); p[7] = new SqlParameter("@PassportNo", SqlDbType.VarChar, 20); p[8] = new SqlParameter("@DOB", SqlDbType.DateTime, 8); p[9] = new SqlParameter("@PlaceofBirth", SqlDbType.VarChar, 50); p[10] = new SqlParameter("@PPIssueDate", SqlDbType.DateTime, 8); p[11] = new SqlParameter("@PPExpiryDate", SqlDbType.DateTime, 8); p[12] = new SqlParameter("@VisaNo", SqlDbType.VarChar, 20); p[13] = new SqlParameter("@VisaExpiryDate", SqlDbType.DateTime, 8); p[14] = new SqlParameter("@IndiaEntryDate", SqlDbType.DateTime, 8); p[15] = new SqlParameter("@ProposedStayInIndia", SqlDbType.Int, 4); p[16] = new SqlParameter("@ArrivalDateTime", SqlDbType.DateTime, 8); p[17] = new SqlParameter("@ArrivedFrom", SqlDbType.VarChar, 50); p[18] = new SqlParameter("@VehicleNo", SqlDbType.VarChar, 50); p[19] = new SqlParameter("@TransportCompany", SqlDbType.VarChar, 100); p[20] = new SqlParameter("@TransportMode", SqlDbType.VarChar, 50); p[21] = new SqlParameter("@RoomDetails", SqlDbType.VarChar, 30); p[22] = new SqlParameter("@NextDestination", SqlDbType.VarChar, 50); p[23] = new SqlParameter("@DepartureDateTime", SqlDbType.DateTime, 8); p[24] = new SqlParameter("@EmployedinIndia", SqlDbType.Bit, 1); p[25] = new SqlParameter("@VisitPurpose", SqlDbType.VarChar, 50); p[26] = new SqlParameter("@PermanentAddressInIndia", SqlDbType.VarChar, 150); p[27] = new SqlParameter("@MealPlan", SqlDbType.VarChar, 50); p[28] = new SqlParameter("@Allergies", SqlDbType.VarChar, 50); p[29] = new SqlParameter("@MealPref", SqlDbType.VarChar, 20); p[30] = new SqlParameter("@SpecialMessage", SqlDbType.VarChar, 200); iTouristNo = oDB.ExecuteStoredProcedure(sProcName, p); } catch { throw new Exception("The method or operation is not implemented."); } //return iTouristNo; return(true); }
private clsBookingData[] GetBookingDetails(string WhereClause) { string sQuery = ""; DataSet dsBookingData; clsBookingData[] oBookingData; DataRow dr; dsBookingData = null; oBookingData = null; sQuery = " select BookingID, BookingCode, TourID, StartDate, enddate, " + " ATM.AccomType, AM.AccomName, B.AccomTypeId, B.AccomId, NoOFNights, NoOfPersons, AgentId " + " from tblBooking B join tblAccomTypeMaster ATM on B.AccomTypeId = ATM.AccomTypeId " + " join tblAccomMaster AM on B.AccomId = AM.AccomId where 1=1 "; if (WhereClause != "") { sQuery += WhereClause; } try { if (oDB == null) { oDB = new clsDatabaseManager(); } dsBookingData = oDB.FetchRecords("BookingData", sQuery); if (dsBookingData != null) { oBookingData[dsBookingData.Tables[0].Rows.Count] = new clsBookingData(); for (int i = 0; i < dsBookingData.Tables[0].Rows.Count; i++) { dr = dsBookingData.Tables[0].Rows[i]; oBookingData[i].BookingId = Convert.ToInt32(dr.ItemArray.GetValue(0)); oBookingData[i].BookingCode = Convert.ToString(dr.ItemArray.GetValue(1)); oBookingData[i].TourId = Convert.ToString(dr.ItemArray.GetValue(2)); oBookingData[i].ArrivalDate = Convert.ToDateTime(dr.ItemArray.GetValue(3)); oBookingData[i].DepartureDate = Convert.ToDateTime(dr.ItemArray.GetValue(4)); oBookingData[i].AccomodationType = Convert.ToString(dr.ItemArray.GetValue(5)); oBookingData[i].AccomodationName = Convert.ToString(dr.ItemArray.GetValue(6)); oBookingData[i].AccomodationTypeId = Convert.ToInt32(dr.ItemArray.GetValue(7)); oBookingData[i].AccomodationId = Convert.ToInt32(dr.ItemArray.GetValue(8)); oBookingData[i].NoOfNights = Convert.ToInt32(dr.ItemArray.GetValue(9)); oBookingData[i].NoOfPersons = Convert.ToInt32(dr.ItemArray.GetValue(10)); oBookingData[i].AgentId = Convert.ToInt32(dr.ItemArray.GetValue(11)); } } } catch { throw new Exception("The method or operation is not implemented."); } return(oBookingData); }
private clsBookingRoomData[] GetBookingRoomDetails(string WhereClause) { StringBuilder sQuery; DataSet dsBookingRoomData; clsBookingRoomData[] oBookingRoomData; DataRow dr; clsDatabaseManager oDB; dsBookingRoomData = null; oBookingRoomData = null; sQuery = new StringBuilder(""); sQuery.Append(" select RB.BookingID, RB.BookingCode, RB.AccomId, RB.RoomNo, RB.StartDate, RB.Enddate, "); sQuery.Append(" OM.OccupancyId, OM.OccupancyType, RT.RoomTypeId, RT.RoomType from tblRoomMaster RM "); sQuery.Append(" join tblRoomType RT on RM.TypeId = RT.RoomTypeId "); sQuery.Append(" join tblOccupancyTypeMaster OM on RM.OccupancyId = OM.OccupancyId "); sQuery.Append(" join tblBookingRoom RB on RB.AccomId = RM.AccomId and RB.RoomNo = RM.RoomNo"); sQuery.Append(" where 1=1"); sQuery.Append(WhereClause); try { oDB = new clsDatabaseManager(); dsBookingRoomData = oDB.FetchRecords("tblBookingRoom", sQuery.ToString()); if (dsBookingRoomData != null) { oBookingRoomData[dsBookingRoomData.Tables[0].Rows.Count] = new clsBookingRoomData(); for (int i = 0; i < dsBookingRoomData.Tables[0].Rows.Count; i++) { dr = dsBookingRoomData.Tables[0].Rows[i]; oBookingRoomData[i].BookingId = Convert.ToInt32(dr.ItemArray.GetValue(0)); oBookingRoomData[i].BookingCode = Convert.ToString(dr.ItemArray.GetValue(1)); oBookingRoomData[i].AccomodationId = Convert.ToInt32(dr.ItemArray.GetValue(2)); oBookingRoomData[i].RoomNo = Convert.ToString(dr.ItemArray.GetValue(3)); oBookingRoomData[i].StartDate = Convert.ToDateTime(dr.ItemArray.GetValue(4)); oBookingRoomData[i].EndDate = Convert.ToDateTime(dr.ItemArray.GetValue(5)); oBookingRoomData[i].OccupancyData.OccupancyID = Convert.ToInt32(dr.ItemArray.GetValue(6)); oBookingRoomData[i].OccupancyData.OccupancyType = Convert.ToString(dr.ItemArray.GetValue(7)); oBookingRoomData[i].RoomTypeData.RoomTypeID = Convert.ToInt32(dr.ItemArray.GetValue(8)); oBookingRoomData[i].RoomTypeData.RoomType = Convert.ToString(dr.ItemArray.GetValue(9)); } } } catch { throw new Exception("The method or operation is not implemented."); } return(oBookingRoomData); }
public static DateTime GetDate() { clsDatabaseManager oDB; string sQuery; if (ServerDateTime == DateTime.MinValue) { sQuery = " Select GetDate()"; oDB = new clsDatabaseManager(); oDB.DbCmd = oDB.GetSqlStringCommand(sQuery); //dsBookingData = oDB.FetchRecords("BookingData", sQuery); ServerDateTime = (DateTime)oDB.ExecuteScalar(oDB.DbCmd); } return(ServerDateTime); }
public bool DeleteBooking(int BookingId) { clsBookingRoomHandler oBRoomHandler; clsBookingTouristHandler oBTouristHandler; clsDatabaseManager oDB; string Query = ""; oBRoomHandler = new clsBookingRoomHandler(); oBTouristHandler = new clsBookingTouristHandler(); oDB = new clsDatabaseManager(); oBTouristHandler.DeleteTourist(BookingId); oBRoomHandler = new clsBookingRoomHandler(); oBRoomHandler.DeleteBookingRooms(BookingId); Query = "delete from tblBooking where BookingId = " + BookingId; return(oDB.ExecuteQuery(Query)); }
private bool DeleteBookingRooms(string WhereClause) { string sQuery; bool deleted; clsDatabaseManager oDB; oDB = new clsDatabaseManager(); sQuery = "Delete from tblBookingRoom where 1=1"; if (WhereClause != string.Empty) { sQuery += WhereClause; } deleted = oDB.ExecuteQuery(sQuery); return(deleted); }
public static DateTime GetDate() { string str = ""; if (DateTime.Compare(CurrentDate, DateTime.MinValue) == 0) { objDB = new clsDatabaseManager(); if (GetDatabaseType() == 'M') { str = objDB.GetColumnValue("select Date()"); } else if (GetDatabaseType() == 'S') { str = objDB.GetColumnValue("select GetDate()"); } CurrentDate = Convert.ToDateTime(str); } return(CurrentDate.Date); }
public bool UpdateBooking(clsBookingData objBooking) { try { if (oDB == null) { oDB = new clsDatabaseManager(); } string sProcName = "up_Ins_Booking"; SqlParameter[] p = new SqlParameter[12]; p[0] = new SqlParameter("@iBookingID", SqlDbType.Int); p[0].Value = objBooking.BookingId; p[1] = new SqlParameter("@sBookingCode", SqlDbType.VarChar, 12); p[1].Value = objBooking.BookingCode; p[2] = new SqlParameter("@sTourID", SqlDbType.VarChar, 100); p[2].Value = objBooking.TourId; p[3] = new SqlParameter("@dtStartDate", SqlDbType.DateTime); p[3].Value = objBooking.ArrivalDate; p[4] = new SqlParameter("@dtEndDate", SqlDbType.DateTime); p[4].Value = objBooking.DepartureDate; p[5] = new SqlParameter("@iAccomTypeId", SqlDbType.Int); p[5].Value = objBooking.AccomodationTypeId; p[6] = new SqlParameter("@iAccomId", SqlDbType.Int); p[6].Value = objBooking.AccomodationId; p[7] = new SqlParameter("@iAgentId", SqlDbType.Int); p[7].Value = objBooking.AgentId; p[8] = new SqlParameter("@iNights", SqlDbType.Int); p[8].Value = objBooking.NoOfNights; p[9] = new SqlParameter("@iPersons", SqlDbType.Int); p[9].Value = objBooking.NoOfPersons; p[10] = new SqlParameter("@AgentId", SqlDbType.VarChar, 5); p[10].Value = objBooking.AgentId; p[11] = new SqlParameter("@BookingStatusId", SqlDbType.Int); p[11].Value = objBooking.BookingStatus; oDB.ExecuteStoredProcedure(sProcName, p); } catch { throw new Exception("The method or operation is not implemented."); } return(true); }
public bool DeleteTourist(int BookingId, int TouristNo) { string Query = ""; bool deleted; clsDatabaseManager oDB; Query = "Delete from tblTouristTourDetails where 1=1"; if (BookingId != 0) { Query += " and BookingId = " + BookingId; } if (TouristNo != 0) { Query += " and BookingId = " + TouristNo; } oDB = new clsDatabaseManager(); deleted = oDB.ExecuteQuery(Query); return(deleted); }
public clsBookingRoomReportsData[] GetDetailedBookingDetails(int BookingId) { clsBookingRoomReportsData[] oBRD = null; clsDatabaseManager oDB = null; try { oDB = new clsDatabaseManager(); string sProcName = "up_GetDetailedBookingDetails"; oDB.DbCmd = oDB.GetStoredProcCommand(sProcName); oDB.DbDatabase.AddInParameter(oDB.DbCmd, "@BookingId", DbType.Int32, BookingId); DataSet dsBRD = null; dsBRD = oDB.ExecuteDataSet(oDB.DbCmd); oDB = null; if (dsBRD != null) { oBRD = new clsBookingRoomReportsData[dsBRD.Tables[0].Rows.Count]; for (int i = 0; i < oBRD.Length; i++) { oBRD[i] = new clsBookingRoomReportsData(); oBRD[i].RoomCategory = dsBRD.Tables[0].Rows[i][0].ToString(); oBRD[i].RoomType = dsBRD.Tables[0].Rows[i][1].ToString(); oBRD[i].TotalBooked = Convert.ToInt32(dsBRD.Tables[0].Rows[i][2].ToString()); oBRD[i].TotalWaitlisted = Convert.ToInt32(dsBRD.Tables[0].Rows[i][3].ToString()); } dsBRD = null; } } catch (Exception exp) { oDB = null; GenFunctions.LogError("clsBookingRoomReportsHandler.GetDetailedBookingDetails", exp.Message); return(null); } finally { oDB = null; } return(oBRD); }
public DataSet GetRoomDetails(int RegionId, int AccomodationTypeId, int AccomodationId) { DataSet ds; ds = new DataSet(); string Query = ""; /*Query = " select ATM.AccomTypeId, ATM.AccomType, AM.AccomId, AM.AccomName, Sequence, RoomNo from " + * " tblAccomTypeMaster ATM join tblAccomMaster AM on ATM.AccomTypeId = AM.AccomTypeId " + * " join tblRoomMaster RM on AM.AccomId = RM.AccomId " + * " where 1=1 " + * " order by AccomType, AccomName, Sequence";*/ Query = " select ATM.AccomTypeId, ATM.AccomType, AM.AccomId, AM.AccomName, Sequence, RoomNo, " + " null as '1', null as '2', null as '3', null as '4', null as '5', null as '6', null as '7', " + " null as '8', null as '9', null as '10', null as '11', null as '12', null as '13', null as '14', " + " null as '15', null as '16', null as '17', null as '18', null as '19', null as '20', null as '21', " + " null as '22', null as '23', null as '24', null as '25', null as '26', null as '27', null as '28', " + " null as '29', null as '30', null as '31' " + " from tblAccomTypeMaster ATM join tblAccomMaster AM on ATM.AccomTypeId = AM.AccomTypeId " + " join tblRoomMaster RM on AM.AccomId = RM.AccomId " + " where 1=1 "; if (RegionId != 0) { Query += " and AM.RegionId = " + RegionId; } if (AccomodationTypeId != 0) { Query += " and ATM.AccomTypeId = " + AccomodationTypeId; } if (AccomodationId != 0) { Query += " and AM.AccomId = " + AccomodationId; } Query += " order by AccomType, AccomName, Sequence"; objDatabaseManager = new clsDatabaseManager(); ds = objDatabaseManager.FetchRecords("BookingChart", Query); return(ds); }
public static long GetTotalRecords(string TableName, string FieldName, string FieldValue, bool FieldIsInteger) { objDB = new clsDatabaseManager(); return(objDB.GetCount(TableName, FieldName, FieldValue, FieldIsInteger)); }
public static bool IsRecordExist(string TableName, string WhereClause) { objDB = new clsDatabaseManager(); return(objDB.IsRecordExists(TableName, WhereClause)); }
public static long GetMaximumValue(String TableName, String FieldName, bool FieldIsInteger) { objDB = new clsDatabaseManager(); return(objDB.GetMax(TableName, FieldName, false)); }
public clsBookingTouristData[] GetTouristDetails(string WhereClause) { DataSet ds; DataRow dr; StringBuilder Query; clsDatabaseManager oDB; clsBookingTouristData[] oBookingTouristData; oBookingTouristData = null; Query = new StringBuilder("select "); Query.Append(" BookingId, BookingCode, TouristNo, FirstName, MiddleName, LastName, Gender, "); Query.Append(" Nationality, PassportNo, DOB, PlaceofBirth, PPIssueDate, PPExpiryDate, VisaNo, "); Query.Append(" VisaExpiryDate, IndiaEntryDate, ProposedStayInIndia, ArrivalDateTime, ArrivedFrom, "); Query.Append(" VehicleNo, TransportCompany, TransportMode, RoomDetails, NextDestination, "); Query.Append(" DepartureDateTime, EmployedinIndia, VisitPurpose, PermanentAddressInIndia, "); Query.Append(" MealPlan, Allergies, MealPref, SpecialMessage"); Query.Append(" from tblRoomTouristDetails where 1=1"); if (WhereClause.Trim() != string.Empty) { Query.Append(WhereClause); } oDB = new clsDatabaseManager(); ds = oDB.FetchRecords("tblRoomTouristDetails", Query.ToString()); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { oBookingTouristData = new clsBookingTouristData[ds.Tables[0].Rows.Count]; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { dr = ds.Tables[0].Rows[i]; oBookingTouristData[i].BookingId = Convert.ToInt32(dr.ItemArray.GetValue(0)); oBookingTouristData[i].BookingCode = Convert.ToString(dr.ItemArray.GetValue(1)); oBookingTouristData[i].TouristNo = Convert.ToInt32(dr.ItemArray.GetValue(2)); oBookingTouristData[i].FirstName = Convert.ToString(dr.ItemArray.GetValue(3)); oBookingTouristData[i].MiddleName = Convert.ToString(dr.ItemArray.GetValue(4)); oBookingTouristData[i].LastName = Convert.ToString(dr.ItemArray.GetValue(5)); oBookingTouristData[i].Gender = Convert.ToChar(dr.ItemArray.GetValue(6)); oBookingTouristData[i].Nationality = Convert.ToString(dr.ItemArray.GetValue(7)); oBookingTouristData[i].PassportNo = Convert.ToString(dr.ItemArray.GetValue(8)); oBookingTouristData[i].DateOfBirth = Convert.ToDateTime(dr.ItemArray.GetValue(9)); oBookingTouristData[i].PlaceofBirth = Convert.ToString(dr.ItemArray.GetValue(10)); oBookingTouristData[i].PassportIssueDate = Convert.ToDateTime(dr.ItemArray.GetValue(11)); oBookingTouristData[i].PassportExpiryDate = Convert.ToDateTime(dr.ItemArray.GetValue(12)); oBookingTouristData[i].VisaNo = Convert.ToString(dr.ItemArray.GetValue(13)); oBookingTouristData[i].VisaExpiryDate = Convert.ToDateTime(dr.ItemArray.GetValue(14)); oBookingTouristData[i].IndiaEntryDate = Convert.ToDateTime(dr.ItemArray.GetValue(15)); oBookingTouristData[i].ProposedStayInIndia = Convert.ToInt32(dr.ItemArray.GetValue(16)); oBookingTouristData[i].ArrivalDateTime = Convert.ToDateTime(dr.ItemArray.GetValue(17)); oBookingTouristData[i].ArrivedFrom = Convert.ToString(dr.ItemArray.GetValue(18)); oBookingTouristData[i].VehicleNo = Convert.ToString(dr.ItemArray.GetValue(19)); oBookingTouristData[i].TransportCompany = Convert.ToString(dr.ItemArray.GetValue(20)); oBookingTouristData[i].TransportMode = Convert.ToString(dr.ItemArray.GetValue(21)); oBookingTouristData[i].RoomDetails = Convert.ToString(dr.ItemArray.GetValue(22)); oBookingTouristData[i].NextDestination = Convert.ToString(dr.ItemArray.GetValue(23)); oBookingTouristData[i].DepartureDateTime = Convert.ToDateTime(dr.ItemArray.GetValue(24)); oBookingTouristData[i].EmployedinIndia = Convert.ToBoolean(dr.ItemArray.GetValue(25)); oBookingTouristData[i].VisitPurpose = Convert.ToString(dr.ItemArray.GetValue(26)); oBookingTouristData[i].PermanentAddressInIndia = Convert.ToString(dr.ItemArray.GetValue(26)); oBookingTouristData[i].MealPlan = Convert.ToString(dr.ItemArray.GetValue(27)); oBookingTouristData[i].Allergies = Convert.ToString(dr.ItemArray.GetValue(28)); oBookingTouristData[i].MealPreferences = Convert.ToString(dr.ItemArray.GetValue(29)); oBookingTouristData[i].SpecialMessage = Convert.ToString(dr.ItemArray.GetValue(30)); } } } return(oBookingTouristData); }