public void SetSearchCondition(CheckList filterType, string name)
    {
        switch (filterType) {
        case CheckList.check_blocks: {
            block.block_name = name;
            break;
        }

        case CheckList.check_cores: {
            core.core_name = name;
            break;
        }

        case CheckList.check_floors: {
            floor.floor_name = name;
            floor.floor_id = FloorNameToId(name);
            break;
        }

        case CheckList.check_bedrooms: {
            bedroom.bedroom_name = name;
            bedroom.bedroom_id = BedroomNameToId(name);
            break;
        }

        case CheckList.check_aspects: {
            aspect.aspect_name = name;
            aspect.aspect_id = AspectNameToId(name);
            break;
        }

        case CheckList.check_types: {
            type.type_name = name;
            break;

        }
        case CheckList.check_status:
            status.status_name = name;
            break;

        case CheckList.check_pricerange:
            if(name!="ALL"){
                string priceStart = name.Replace("£","");
                priceStart = priceStart.Replace(",","");
                priceStart = priceStart.Split('-')[0];

                foreach (MWMPricerange price in MWM_CMS_DatabaseManager.instance.priceRanges.priceranges){
                    if(priceRange.pricerange_start.ToString() == priceStart) priceRange = price;
                }
            }
            else priceRange = new MWMPricerange();
            break;

        default:
            break;
        }

        FilterOptionChangedAction.Invoke(filterType);
    }
    public void ResetSearchConditionAndFilter(bool showAllApartment)
    {
        DeselectApartment();
        block.block_name = "ALL";
        core.core_name = "ALL";
        floor.floor_name = "ALL";
        bedroom.bedroom_name = "ALL";
        type.type_name = "ALL";
        aspect.aspect_name = "ALL";
        priceRange = new MWMPricerange();
        status.status_name = "ALL";

        Debug.Log ("All values RESET");

        if(showAllApartment)
                    FilterApartments();
        else HideAllApartments();
        LightingController.instance.TurnOnLEDSets();
    }