예제 #1
0
 /// <summary>
 /// add additions based on user input
 /// </summary>
 /// <param name="waterFront"></param>
 /// <param name="pools"></param>
 /// <param name="tennisCourts"></param>
 private void createAdditions(bool waterFront, int pools, int tennisCourts)
 {
     if (waterFront == false && pools == 0 && tennisCourts == 0)
     {
         return;
     }
     if (waterFront == true)
     {
         WaterFront wtr = new WaterFront();
         additions.Add(wtr);
     }
     if (pools > 0)
     {
         Pool pl = new Pool(pools);
         additions.Add(pl);
     }
     if (tennisCourts > 0)
     {
         TennisCourt tn = new TennisCourt(tennisCourts);
         additions.Add(tn);
     }
     return;
 }
예제 #2
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);
            }
        }