예제 #1
0
        /// <summary>
        /// handles the loading of the module setting for this
        /// control
        /// </summary>
        public override void LoadSettings()
        {
            try
            {
                if (!IsPostBack)
                {
                    GetCondoComplex();
                    GetTowns();
                    BindModules();
                    BindFavoriteModules();

                    //   FlexMLS_ListSettings settingsData = new FlexMLS_ListSettings(this.TabModuleId);


                    if (FavoritesModuleID != null)
                    {
                        drpModuleID.SelectedValue = FavoritesModuleID.ToString();
                    }

                    if (ShowCriteria != null)
                    {
                        if (ShowCriteria.Length > 0)
                        {
                            cbxShowCriteria.Checked = Convert.ToBoolean(ShowCriteria.ToString());
                        }
                    }

                    if (ListingOfficeMLSID != null)
                    {
                        ddlOfficeID.SelectedValue = ListingOfficeMLSID.ToString();
                    }

                    if (PropertyType != null)
                    {
                        ddlPropertyType.SelectedValue = PropertyType.ToString();
                    }

                    if (Town != null)
                    {
                        ddl_Town.SelectedValue = Town.ToString();
                    }
                    if (Village != null)
                    {
                        ddl_Village.SelectedValue = Village.ToString();
                    }
                    if (Bedrooms != null)
                    {
                        ddlBedRooms.SelectedValue = Bedrooms.ToString();
                    }
                    if (Bathrooms != null)
                    {
                        ddlBathRooms.SelectedValue = Bathrooms.ToString();
                    }
                    if (PriceLow != null)
                    {
                        ddlPriceLow.SelectedValue = PriceLow.ToString();
                    }
                    if (PriceHigh != null)
                    {
                        ddlPriceHigh.SelectedValue = PriceHigh.ToString();
                    }
                    if (WaterFront != null)
                    {
                        if (WaterFront.Length > 0)
                        {
                            cbxWaterFront.Checked = Convert.ToBoolean(WaterFront.ToString());
                        }
                    }
                    if (Waterview != null)
                    {
                        if (Waterview.Length > 0)
                        {
                            cbxWaterView.Checked = Convert.ToBoolean(Waterview.ToString());
                        }
                    }
                    if (Complex != null)
                    {
                        ddlComplex.SelectedValue = Complex.ToString();
                    }
                    if (DOM != null)
                    {
                        ddlDOM.SelectedValue = DOM.ToString();
                    }
                    if (FlexMLSPage != null)
                    {
                        ddlViewListing.SelectedValue = FlexMLSPage.ToString();
                    }

                    if (MaxThumbSize != null)
                    {
                        txtThumbSize.Text = MaxThumbSize.ToString();
                    }

                    if (ShowPaging != null)
                    {
                        if (ShowPaging.Length > 0)
                        {
                            cbxShowPaging.Checked = Convert.ToBoolean(ShowPaging);
                        }
                    }

                    if (NumberOfRecords != null)
                    {
                        txtNumberOfRecords.Text = NumberOfRecords.ToString();
                    }

                    if (MlsNumbers != null)
                    {
                        txtListingNumbers.Text = MlsNumbers.ToString();
                    }

                    if (YearBuilt != null)
                    {
                        txtYearBuilt.Text = YearBuilt.ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }