public List<HotelRoomExt> GetHotelRooms(string RoomID)
        {
            SQLCon.Open();
            SqlCommand cmd = new SqlCommand("B_GetHotelRoom_TB_HotelRoom_SP", SQLCon);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@Culture", CultureValue);
            cmd.Parameters.AddWithValue("@RoomID", RoomID);
            SqlDataAdapter sda = new SqlDataAdapter(cmd);
            sda.Fill(dt);
            SQLCon.Close();

            List<HotelRoomExt> ListOfModel = new List<HotelRoomExt>();

            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    //if (!ArrayID.Contains(Convert.ToInt32(dr["ID"])))
                    //{
                    HotelRoomExt HotelRoom = new HotelRoomExt();

                    HotelRoom.ID = Convert.ToInt32(dr["ID"]);
                    HotelRoom.HotelID = Convert.ToInt64(dr["HotelID"]);
                    HotelRoom.Description = dr["Description"].ToString();
                    HotelRoom.RoomTypeID = Convert.ToInt32(dr["RoomTypeID"]);
                    HotelRoom.RoomCount = dr["RoomCount"].ToString();

                    HotelRoom.RoomSize = dr["RoomSize"].ToString();
                    HotelRoom.MaxPeopleCount = dr["MaxPeopleCount"].ToString();

                    HotelRoom.MaxChildrenCount = dr["MaxChildrenCount"].ToString();
                    HotelRoom.BabyCotCount = dr["BabyCotCount"].ToString();

                    HotelRoom.ExtraBedCount = dr["ExtraBedCount"].ToString();
                    HotelRoom.SmokingTypeID = dr["SmokingTypeID"].ToString();

                    HotelRoom.ViewTypeID = dr["ViewTypeID"].ToString();
                    HotelRoom.Promotion = dr["Promotion"].ToString();

                    HotelRoom.RelatedHotelRoomID = dr["RelatedHotelRoomID"].ToString();
                    HotelRoom.CreateDateTime = dr["CreateDateTime"].ToString();
                    HotelRoom.CreateUserID = dr["CreateUserID"].ToString();

                    HotelRoom.OpDateTime = dr["OpDateTime"].ToString();
                    HotelRoom.OpUserID = dr["OpUserID"].ToString();

                    HotelRoom.Language = dr["Language"].ToString();
                    string Language = dr["Language"].ToString();

                    if (Language == "English")
                    {
                        HotelRoom.LanguageID = 1;
                    }
                    else if (Language == "Deutsch")
                    {
                        HotelRoom.LanguageID = 3;
                    }
                    else if (Language == "Français")
                    {
                        HotelRoom.LanguageID = 4;
                    }
                    else if (Language == "العربية")
                    {
                        HotelRoom.LanguageID = 10;
                    }
                    else if (Language == "Русский")
                    {
                        HotelRoom.LanguageID = 6;
                    }
                    else if (Language == "Türkçe")
                    {
                        HotelRoom.LanguageID = 8;
                    }

                    ListOfModel.Add(HotelRoom);
                    //}

                }
            }
            return ListOfModel;
        }
        public List<HotelRoomExt> GetHotelRoomBeds(Int64 HotelRoomID)
        {
            // string PropertyConditions = "";
            DataTable dt = new DataTable();
            SQLCon.Open();
            SqlCommand cmd = new SqlCommand("TB_SP_GetHotelRoomBeds", SQLCon);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@Culture", CultureValue);
            cmd.Parameters.AddWithValue("@HotelRoomID", HotelRoomID);

            SqlDataAdapter sda = new SqlDataAdapter(cmd);

            sda.Fill(dt);
            SQLCon.Close();

            ArrayList OptionNo = new ArrayList();
            for (int i = 1; i <= 3; i++)
            {
                OptionNo.Add(i);
            }

            for (int i = 0; i < OptionNo.Count; i++)
            {
                foreach (var items in ListOfBedTypes)
                {
                    //int OptionNoInt = Convert.ToInt16(OptionNo[i]);
                    string OptionNoValue = OptionNo[i].ToString();
                    if (items.OptionNo == OptionNoValue)
                    {
                        HotelRoomExt BedTypes = new HotelRoomExt();
                        BedTypes.OptionNo = OptionNoValue;
                        BedTypes.BedId = items.BedId;
                        BedTypes.BedName = items.BedName;
                        if (dt.Rows.Count > 0)
                        {
                            DataRow[] optionRoomBedInfo = dt.Select("OptionNo=" + OptionNoValue);
                            if (optionRoomBedInfo.Length > 0)
                            {
                                DataRow[] roomBeds = optionRoomBedInfo.CopyToDataTable().Select("BedTypeID=" + items.BedId);
                                // DataRow[] roomBeds = optionRoomBedInfo.CopyToDataTable.Select("BedTypeID=" + bedTypeID);

                                if (roomBeds.Length > 0)
                                {
                                    BedTypes.BedCount = Convert.ToString(CheckNullDBValue(roomBeds[0]["Count"]));
                                }
                            }
                        }
                        RoomBedInfo.Add(BedTypes);
                    }
                }

            }

            return RoomBedInfo;
        }
        public List<HotelRoomExt> GetBedTypes()
        {
            // string PropertyConditions = "";
            DataTable dt = new DataTable();
            SQLCon.Open();
            SqlCommand cmd = new SqlCommand("B_GetBedType_TB_TypeBed_SP", SQLCon);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@Culture", CultureValue);

            SqlDataAdapter sda = new SqlDataAdapter(cmd);

            sda.Fill(dt);
            SQLCon.Close();

            ArrayList OptionNo = new ArrayList();
            for (int i = 1; i <= 3; i++)
            {
                OptionNo.Add(i);
            }

            if (dt.Rows.Count > 0)
            {
                for (int i = 0; i < OptionNo.Count; i++)
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        HotelRoomExt obj = new HotelRoomExt();

                        string OptionNoValue = OptionNo[i].ToString();
                        obj.OptionNo = OptionNoValue;
                        obj.BedId = dr["ID"].ToString();
                        obj.BedName = dr["Name"].ToString();

                        ListOfBedTypes.Add(obj);
                    }
                }

            }

            return ListOfBedTypes;
        }
 public List<HotelRoomExt> GetHotelRoomAttributes(Int64 HotelRoomID, int AttributeTypeID, string OrderBy)
 {
     PropertyRoomsExt obj = new PropertyRoomsExt();
     DataTable dt = new DataTable();
     SQLCon.Open();
     SqlCommand cmd = new SqlCommand("TB_SP_GetHotelRoomAttributes", SQLCon);
     cmd.CommandType = CommandType.StoredProcedure;
     cmd.Parameters.AddWithValue("@Culture", CultureValue);
     cmd.Parameters.AddWithValue("@OrderBy", OrderBy);
     cmd.Parameters.AddWithValue("@HotelRoomID", HotelRoomID);
     cmd.Parameters.AddWithValue("@AttributeTypeID", AttributeTypeID);
     SqlDataAdapter sda = new SqlDataAdapter(cmd);
     sda.Fill(dt);
     SQLCon.Close();
     foreach (var items in AttributesListOfModel)
     {
         HotelRoomExt HotelRoom = new HotelRoomExt();
         HotelRoom.AttributeId = items.AttributeId;
         HotelRoom.AttributeName = items.AttributeName;
         HotelRoom.AttributeHeaderId = items.AttributeHeaderId;
         if (dt.Rows.Count > 0)
         {
             DataRow[] hotelRoomAttribute = dt.Select("AttributeID=" + items.AttributeId);
             HotelRoom.hasAttribute = (hotelRoomAttribute.Length > 0);
             HotelRoom.charged = ((HotelRoom.hasAttribute) && (Convert.ToBoolean(hotelRoomAttribute[0]["charged"])));
         }
         HotelRooms.Add(HotelRoom);
     }
     return HotelRooms;
 }
        public List<HotelRoomExt> GetAttributes(string AttributeHeaderId)
        {
            // string PropertyConditions = "";
            DataTable dt = new DataTable();
            SQLCon.Open();
            SqlCommand cmd = new SqlCommand("TB_SP_GetAttributes", SQLCon);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@PartID", 5);
            cmd.Parameters.AddWithValue("@AttributeTypeID", 1);
            cmd.Parameters.AddWithValue("@AttributeHeaderID", AttributeHeaderId);
            cmd.Parameters.AddWithValue("@Active", 1);
            cmd.Parameters.AddWithValue("@Culture", CultureValue);
            cmd.Parameters.AddWithValue("@OrderBy", "Name");

            SqlDataAdapter sda = new SqlDataAdapter(cmd);

            sda.Fill(dt);
            SQLCon.Close();

            if (dt.Rows.Count > 0)
            {
                foreach (DataRow dr in dt.Rows)
                {
                    HotelRoomExt obj = new HotelRoomExt();

                    obj.AttributeId = Convert.ToInt32(dr["ID"].ToString());
                    obj.AttributeName = dr["Name"].ToString();
                    obj.AttributeHeaderId = dr["AttributeHeaderID"].ToString();
                    AttributesListOfModel.Add(obj);
                }
            }

            return AttributesListOfModel;
        }