Exemple #1
0
        public void LoadCondos()
        {
            try
            {
                //   string year = DateTime.Now.Year.ToString();
                string town = "";

                if (Request.QueryString["town"] != null)
                {
                    town = Request.QueryString["town"].ToString();
                }
                else
                {
                    town = _searchTown.ToString();
                }
                ModuleConfiguration.ModuleTitle = town + " Condos For Sale";
                GetSeoValues(town.ToString(), "");


                List <FlexMLSInfo> items;
                FlexMLSController  controller = new FlexMLSController();

                items = controller.FlexMLS_Search_Condo_By_Town(town.ToString());

                //bind the data
                GridView1.DataSource = items;
                GridView1.DataBind();
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Exemple #2
0
        public void GetTowns()
        {
            try
            {
                List <FlexMLSInfo> items;
                List <FlexMLSInfo> itemsOffices;

                FlexMLSController controller = new FlexMLSController();
                items = controller.FlexMLS_Lookup_Town();


                ddl_Town.DataSource     = items;
                ddl_Town.DataTextField  = "Town";
                ddl_Town.DataValueField = "Town";
                ddl_Town.DataBind();

                ddl_Town.Items.Insert(0, new ListItem("--Select--", ""));

                //ddlOfficeID
                itemsOffices               = controller.FlexMLS_Get_Offices();
                ddlOfficeID.DataSource     = itemsOffices;
                ddlOfficeID.DataTextField  = "ListingOfficeName";
                ddlOfficeID.DataValueField = "OfficeID";
                ddlOfficeID.DataBind();

                ddlOfficeID.Items.Insert(0, new ListItem("--Select--", ""));
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
        protected void linkButtonFavoritesRemoveListing_Click(object sender, EventArgs e)
        {
            try
            {
                int        MLSnumber = 0;
                LinkButton myButton  = sender as LinkButton;

                if (myButton != null)
                {
                    MLSnumber = Convert.ToInt32(myButton.CommandArgument);
                }

                FlexMLSController controller = new FlexMLSController();
                FlexMLSInfo       item       = new FlexMLSInfo();

                item.Favorite     = MLSnumber.ToString();
                item.FavoriteType = "Listing";
                item.ModuleId     = this.ModuleId;
                item.UserID       = this.UserId;

                controller.FlexMLS_Favorites_Add(item);

                myButton.Text = "SAVED! - " + item.Favorite.ToString();
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Exemple #4
0
        public string GetComplexName(string complexCode)
        {
            try
            {
                FlexMLSController controller = new FlexMLSController();

                FlexMLSInfo item = controller.FlexMLS_Get_CondoComplexName(complexCode);

                if (item != null)
                {
                    return(item.Complex.ToString());
                }



                else
                {
                    //Response.Redirect(Globals.NavigateURL(), true);
                    return("NO RECORD FOUND");
                }
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
                return("ERROR");
            }
        }
Exemple #5
0
        public void ImageNeeded(string listingNumber)
        {
            FlexMLSController controller = new FlexMLSController();
            FlexMLSInfo       item       = new FlexMLSInfo();

            item.ListingNumber = listingNumber;

            controller.FlexMLS_ImagesNeeded_Insert(item);
        }
Exemple #6
0
        protected void ddl_Town_SelectedIndexChanged(object sender, EventArgs e)
        {
            List <FlexMLSInfo> items;
            FlexMLSController  controller = new FlexMLSController();

            items = controller.FlexMLS_Lookup_Village(ddl_Town.SelectedValue.ToString());

            ddl_Village.DataSource     = items;
            ddl_Village.DataTextField  = "Village";
            ddl_Village.DataValueField = "Village";
            ddl_Village.DataBind();

            ddl_Village.Items.Insert(0, new ListItem("--Optionally Select--", ""));
        }
        public void ImageNeeded(string listingNumber)
        {
            try
            {
                FlexMLSController controller = new FlexMLSController();
                FlexMLSInfo       item       = new FlexMLSInfo();

                item.ListingNumber = listingNumber.ToString();

                controller.FlexMLS_ImagesNeeded_Insert(item);
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Exemple #8
0
        //linkButtonFavoritesAddListing_Click
        protected void linkButtonFavoritesAddListing_Click(object sender, EventArgs e)
        {
            try
            {
                int MLSnumber = 0;

                if (Request.IsAuthenticated)
                {
                    LinkButton myButton = sender as LinkButton;

                    if (myButton != null)
                    {
                        MLSnumber = Convert.ToInt32(myButton.CommandArgument);
                    }

                    FlexMLSController controller = new FlexMLSController();
                    FlexMLSInfo       item       = new FlexMLSInfo();

                    item.Favorite     = MLSnumber.ToString();
                    item.FavoriteType = "Listing";
                    item.ModuleId     = this.ModuleId;
                    item.UserID       = this.UserId;
                    item.EmailSearch  = false;

                    controller.FlexMLS_Favorites_Add(item);

                    myButton.Text      = "SAVED! - " + item.Favorite.ToString();
                    myButton.ForeColor = System.Drawing.Color.Red;
                }

                else
                {
                    LinkButton myButton = sender as LinkButton;
                    myButton.Text      = "Register to Use This Feature";
                    myButton.ForeColor = System.Drawing.Color.Red;
                    Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "ShowPopup();", true);
                }

                //RELOAD LISTING
                GetListing(MLSnumber);
                GetSeoValues();
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Exemple #9
0
        public void LoadTowns()
        {
            try
            {
                List <FlexMLSInfo> items;
                FlexMLSController  controller = new FlexMLSController();

                items = controller.FlexMLS_Search_Condo_TownList();

                //bind the data
                RepeaterTowns.DataSource = items;
                RepeaterTowns.DataBind();
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
        public void LoadTrending()
        {
            try
            {
                //   string year = DateTime.Now.Year.ToString();


                List <FlexMLSInfo> items;
                FlexMLSController  controller = new FlexMLSController();

                items = controller.FlexMLS_ListingViews_Get(100);

                //creating the PagedDataSource instance....
                PagedDataSource pg = new PagedDataSource();
                pg.DataSource  = items;
                pg.AllowPaging = true;
                pg.PageSize    = Int32.Parse(_numberOfRecords.ToString());

                pg.CurrentPageIndex = CurrentPage;

                lblCurrentPage.Text = "Page: " + (CurrentPage + 1).ToString() + " of " + pg.PageCount.ToString();

                // Disable Prev or Next buttons if necessary

                lbPrev.Enabled = !pg.IsFirstPage;
                lbNext.Enabled = !pg.IsLastPage;



                //Binding pg to datalist


                //bind the data
                lstContent.DataSource = pg;
                lstContent.DataBind();
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Exemple #11
0
        //public void GetZillowMortgageCalc(double HousePrice)
        //{
        //    try
        //    {
        //        string MorgCalc;
        //        string RateChart;

        //        MorgCalc = "<div id=\"verticalWidget\" style=\"float:left;width:192px;overflow:hidden;text-align:center;font-family:verdana,arial,sans-serif;font-size:8pt;line-height:13x;background-color:#dbdbdb;letter-spacing:0;text-transform:none;border-radius: 5px;webkit-border-radius:5px;\"><div style=\"margin:6px 0;\"><a href=\"https://www.zillow.com/mortgage-calculator/\" target=\"_blank\" title=\"Mortgage Calculators on Zillow\" style=\"font-family:Arial;font-size:15px;text-decoration:none;font-weight:bold;color:#666666;cursor: pointer;display: block;text-align: center;text-shadow: 0 1px #fff;\">Estimate Payment</a></div><div style=\"width:176px;margin:0 auto;background-color:#f4f4f4;text-align:left; font-size:8pt;border-radius: 5px; border: 1px solid;border-color:#cccccc;webkit-border-radius: 5px;padding: 0 1px;\"><iframe title=\"Mortgage Calculator\" frameborder=\"0\" height=\"470px\" style=\"float:left;\" scrolling=\"no\" width=\"176px\" src=\"https://www.zillow.com/mortgage/SmallMortgageLoanCalculatorWidget.htm?price=" + HousePrice.ToString() + "&ezuid=" + _ZillowUserId.ToString() + "&wtype=spc&rid=102001&wsize=small&textcolor=666666&backgroundColor=f4f4f4&advTabColor=9b9b9b&bgcolor=dbdbdb&bgtextcolor=666666&headerTextShadow=fff&widgetOrientationType=verticalWidget\"> Your browser doesn't support frames. Visit <a href=\"https://www.zillow.com/mortgage-calculator/\" target=\"_blank\" style=\"text-decoration:none; font-size:9pt; font-weight:bold;\">Zillow Mortgage Calculators</a> to see this content. </iframe><div style=\"clear:both;\"></div></div><div style=\"height:20px;\"><span style=\"display:block;margin:0 auto;font-size:7pt;height:15px;width:178px;color:#666666;padding-top:2px;\"><a href=\"https://www.zillow.com/mortgage-rates/\" target=\"_blank\" title=\"Zillow Mortgage Marketplace\" style=\"text-decoration:none;color:#3366bb;font-weight:normal;font-family:verdana,arial,sans-serif;font-size:7pt;color:#666666;\">Zillow Mortgage Calculator</a></span></div></div>";
        //        RateChart = "<div id=\"mtg-rate-table\" style=\"float:left;margin-left:20px\"><div id=\"large-rate-table-iframe-widget-container\" style=\"width:308px;border: 1px solid #bfbfbf;padding:12px;margin:0;font:normal normal normal 8pt verdana,arial,sans-serif;text-transform:none;text-indent:0;line-height:13px;background-color:#fff;letter-spacing:0;color: #555;overflow:hidden;text-align:center;\"><div id=\"title\" style=\"margin:5px 0 12px;text-align:left;\"><h1 style=\"padding-top:0px;text-align:left;font-family: Arial,verdana,sans-serif;margin:0\"><a href=\"https://www.zillow.com/mortgage-rates/\" target=\"_blank\" style=\"color:#000;font-style:normal;font-weight:bold;font-size:20px;padding:0;text-decoration:none;\">Zillow Mortgage Rates</a></h1></div><iframe src=\"https://www.zillow.com/webtools/widgets/RateTableDistributionWidget.htm?mp=RD-FLNVMXZ&\" width=\"306\" height=\"215\" frameborder=\"0\" scrolling=\"no\" style=\"display:block;\"></iframe></div></div>";

        //        LiteralMortgageCalc.Text = MorgCalc.ToString() + RateChart.ToString();
        //    }
        //    catch (Exception ex)
        //    {
        //        Exceptions.ProcessModuleLoadException(this, ex);
        //    }
        //}

        public void AddViewListingRecord(int listingNumber, double listingPrice, string content)
        {
            try
            {
                FlexMLSController controller = new FlexMLSController();

                FlexMLSInfo item = new FlexMLSInfo();
                // FBClientsInfo item = new FBClientsInfo();
                item.ListingNumber   = listingNumber.ToString();
                item.ModuleId        = this.ModuleId;
                item.Content         = content.ToString();
                item.CreatedByUserID = this.UserId;
                item.ListingPrice    = listingPrice;

                controller.FlexMLS_ListingViews_Add(item);
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Exemple #12
0
        // SAVE A SEARCH
        protected void linkButtonFavorites_Click(object sender, EventArgs e)
        {
            try
            {
                if (Request.IsAuthenticated)
                {
                    FlexMLSController controller = new FlexMLSController();
                    FlexMLSInfo       item       = new FlexMLSInfo();

                    item.Favorite     = HttpContext.Current.Request.Url.AbsoluteUri.ToString();
                    item.FavoriteType = "Search";
                    item.ModuleId     = this.ModuleId;
                    item.EmailSearch  = true;
                    item.UserID       = this.UserId;
                    controller.FlexMLS_Favorites_Add(item);
                    linkButtonFavorites.ForeColor = System.Drawing.Color.Red;
                    linkButtonFavorites.Text      = "SEARCH SAVED!";
                }

                else
                {
                    LinkButton myButton = sender as LinkButton;
                    myButton.Text      = "Register to Use This Feature";
                    myButton.ForeColor = System.Drawing.Color.Red;
                    //    Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "ShowPopup();", true);
                }

                ////determine if we are adding or updating
                //if (Null.IsNull(item.ItemId))
                //    controller.AddFlexMLS(item);
                //else
                //    controller.UpdateFlexMLS(item);

                //Response.Redirect(Globals.NavigateURL(), true);
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
        public void LoadTaxRates()
        {
            try
            {
                //   string year = DateTime.Now.Year.ToString();
                string town = "";

                if (Request.QueryString["town"] != null && Request.QueryString["town"] != "")
                {
                    town = Request.QueryString["town"].ToString();
                    // year = "";
                    _taxyear        = "";
                    lblH1Title.Text = town + " Real Estate Tax Rate";
                    GetSeoValues(town.ToString(), "");
                }

                if (Request.QueryString["TaxYear"] != null && Request.QueryString["TaxYear"] != "")
                {
                    //town = Request.QueryString["town"].ToString();
                    // year = "";
                    _taxyear        = Request.QueryString["TaxYear"].ToString();
                    lblH1Title.Text = _taxyear + " Cape Cod Real Estate Tax Rates";
                    // GetSeoValues(town.ToString());
                    GetSeoValues(town.ToString(), _taxyear.ToString());
                }

                List <FlexMLSInfo> items;
                FlexMLSController  controller = new FlexMLSController();

                items = controller.TaxRates_GetList(town.ToString(), _taxyear.ToString());

                //bind the data
                GridView1.DataSource = items;
                GridView1.DataBind();
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
        //public void GetMyTabs()
        //{

        //    try
        //    {


        //        ddlViewListing.DataSource = TabController.GetPortalTabs(this.PortalId, this.TabId, true, false);
        //        ddlViewListing.DataBind();


        //    }
        //    catch (Exception ex)
        //    {
        //        Exceptions.ProcessModuleLoadException(this, ex);
        //    }

        //}


        public void GetCondoComplex()
        {
            try
            {
                List <FlexMLSInfo> items;

                FlexMLSController controller = new FlexMLSController();
                items = controller.FlexMLS_Get_CondoComplex();

                ddlComplex.DataSource = items;

                ddlComplex.DataTextField  = "Town";
                ddlComplex.DataValueField = "Complex";
                ddlComplex.DataBind();

                ddlComplex.Items.Insert(0, new ListItem("--Select--", ""));
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
        public void LoadTowns()
        {
            try
            {
                //   string year = DateTime.Now.Year.ToString();
                string town = "";


                List <FlexMLSInfo> items;
                FlexMLSController  controller = new FlexMLSController();

                items = controller.TaxRates_GetList(town.ToString(), DateTime.Now.Year.ToString());

                //bind the data

                RepeaterTowns.DataSource = items;
                RepeaterTowns.DataBind();
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Exemple #16
0
        public void GetListing(int mlsNumber)
        {
            try
            {
                FlexMLSController controller = new FlexMLSController();

                FlexMLSInfo item = controller.FlexMLS_Get_Listing(mlsNumber);

                if (item != null)
                {
                    string _UnitNumber = "";
                    if (item.UnitNumber.ToString().Length >= 1 && item.UnitNumber.ToString() != "0")
                    {
                        _UnitNumber = " " + item.UnitNumber.ToString();
                    }

                    lblListingAddress.Text = item.Address.ToString() + _UnitNumber.ToString() + ", " + item.Village.ToString() + ", " + item.State.ToString() + " " + item.ZipCode.ToString();;
                    lblListingPrice.Text   = String.Format("{0:C0}", item.ListingPrice); //;
                    ListingAddressForGMap  = (lblListingAddress.Text.ToString()).Replace(" ", "%20").ToString();
                    //41.674677,-69.990018

                    _GoogleLatLon = item.Latitude.ToString() + "," + item.Longitude.ToString();

                    //         GetZillowMortgageCalc(Double.Parse(item.ListingPrice.ToString()));

                    ModuleConfiguration.ModuleTitle = "MLS# " + item.ListingNumber.ToString();  // + " - " + lblListingAddress.Text.ToString();

                    // TRENDING LISTINGS
                    if (_addTrendingListing)
                    {
                        string AddListingRecordContent = lblListingAddress.Text.ToString();
                        AddViewListingRecord(Int32.Parse(item.ListingNumber.ToString()), item.ListingPrice, AddListingRecordContent.ToString());
                    }
                    else
                    {
                        // DO NOTHING
                    }

                    // LOOK FOR PRICE REDUCTION
                    if (item.ListingPrice < item.OriginalListPrice)
                    {
                        int    _priceChange    = Int32.Parse(item.OriginalListPrice.ToString()) - Int32.Parse(item.ListingPrice.ToString());
                        string _priceChangeAmt = String.Format("{0:C0}", _priceChange);

                        imgPriceChange.Visible = true;
                        imgPriceChange.ToolTip = _priceChangeAmt.ToString() + " Price Reduction";
                    }
                    else
                    {
                        imgPriceChange.Visible = false;
                    }

                    // LOOK FOR VIRTUAL TOUR
                    if (item.VirtualTourLink.ToString().Trim() != "")
                    {
                        HyperLinkVirtualTourLink.Visible     = true;
                        ImageVirtualTour.Visible             = true;
                        HyperLinkVirtualTourLink.NavigateUrl = item.VirtualTourLink.ToString();
                        HyperLinkVirtualTourLink.ToolTip     = "Virtual Tour for MLS# " + item.ListingNumber.ToString();
                    }
                    else
                    {
                        ImageVirtualTour.Visible         = false;
                        HyperLinkVirtualTourLink.Visible = false;
                    }

                    if (_ZillowAutoRunData == true)
                    {
                        // ZILLOW DATA
                        //     ZillowData.Visible = true;
                        //     GetZillow_zpid(item.Address.ToString() + _UnitNumber.ToString(), item.Village.ToString(), "MA", item.ZipCode.ToString());
                    }
                    else
                    {
                        //    ZillowData.Visible = false;

                        _Z_address = item.Address.ToString() + _UnitNumber.ToString();
                        _Z_city    = item.Village.ToString();
                        _Z_state   = "MA";
                        _Z_zip     = item.ZipCode.ToString();
                    }



                    //HyperLinkInquiry - CONTACT FORM

                    string InquiryLink = Globals.NavigateURL("View", "pg", "Contact", "MLS", item.ListingNumber.ToString());
                    InquiryLink = InquiryLink.ToString().Replace("ctl/View/", "");
                    HyperLinkInquiry.NavigateUrl = InquiryLink.ToString();

                    //HyperLinkShowing - SCHEDULE A SHOWING

                    string ShowingLink = Globals.NavigateURL("View", "pg", "Contact", "MLS", item.ListingNumber.ToString(), "Schedule", "Showing");
                    ShowingLink = ShowingLink.ToString().Replace("ctl/View/", "");
                    HyperLinkShowing.NavigateUrl = ShowingLink.ToString();

                    // linkButtonFavoritesAddListing - ADD TO FAVORITES

                    linkButtonFavoritesAddListing.CommandArgument = item.ListingNumber.ToString();

                    //HyperLinkInquiry - TELL A FRIEND FORM

                    if (Request.IsAuthenticated)
                    {
                        //string TellAFrinedLink = "";

                        HyperLinkTellAFriend.NavigateUrl = Globals.NavigateURL("View", "pg", "TellAFriend", "MLS", item.ListingNumber.ToString()).Replace("ctl/View/", "");
                    }
                    else
                    {
                        HyperLinkTellAFriend.Visible = false;
                    }

                    // GENERAL TABLE

                    if ((item.PropertySubType1.ToString() == "Condominium") || (item.Complex.ToString().Length > 1) || (item.FeeAmount > 0) || (item.MonthlyFeeAmount > 0) || (item.AnnualAssocFee > 0))
                    {
                        PanelCondoSpecific.Visible = true;

                        if (item.Complex.ToString().Length > 1)
                        {
                            AddToTableCondo("Complex Name", item.Complex.ToString());  //CONDO COMPLEX NAME
                        }

                        if (item.MaxNumberOfUnits.ToString().Length > 1)
                        {
                            AddToTableCondo("# of Units", item.MaxNumberOfUnits.ToString());
                        }

                        if (item.MonthlyFeeAmount > 0)
                        {
                            AddToTableCondo("Monthly Fees", String.Format("{0:C0}", item.MonthlyFeeAmount));
                        }

                        if (item.AnnualAssocFee > 0)
                        {
                            AddToTableCondo("Annual Fees", String.Format("{0:C0}", item.AnnualAssocFee));
                        }

                        if (item.FeeAmount > 0)
                        {
                            AddToTableCondo("Fees", String.Format("{0:C0}", item.FeeAmount) + " " + item.FeeFrequency.ToString());
                        }
                        if (item.AssocFeeYear.ToString().Length > 1)
                        {
                            AddToTableCondo("Year", item.AssocFeeYear.ToString());
                        }
                        if (item.Amenities.ToString().Length > 1)
                        {
                            AddToTableCondo("Fee Includes", AddSpaceAfterComma(item.Amenities.ToString()));
                        }
                        if (item.UnitPlacement.ToString().Length > 1)
                        {
                            AddToTableCondo("Unit Placement", AddSpaceAfterComma(item.UnitPlacement.ToString()));
                        }

                        if (item.Restrictions.ToString().Length > 1)
                        {
                            AddToTableCondo("Restrictions", AddSpaceAfterComma(item.Restrictions.ToString()));
                        }
                    }



                    if (item.YearBuilt.ToString().Length > 1)
                    {
                        AddToTableGeneral("Year Built", item.YearBuilt.ToString());
                    }
                    if (item.Style.Length > 1)
                    {
                        AddToTableGeneral("Style", item.Style.ToString());
                    }

                    if (item.LivingSpace.ToString().Length > 1)
                    {
                        AddToTableGeneral("Living Area", String.Format("{0,000}", item.LivingSpace).ToString() + " Sq. Ft.");
                    }

                    if (item.Bedrooms > 0)
                    {
                        AddToTableGeneral("Bedrooms", item.Bedrooms.ToString());
                    }
                    if (item.FullBaths > 0)
                    {
                        AddToTableGeneral("Full Baths", item.FullBaths.ToString());
                    }
                    if (item.HalfBaths > 0)
                    {
                        AddToTableGeneral("Half Baths", item.HalfBaths.ToString());
                    }


                    double lot_sqft = item.Acres;
                    if (lot_sqft > 0)
                    {
                        AddToTableGeneral("Lot Size", Math.Round(lot_sqft, 2).ToString() + " Acres");
                        // lblLotSquareFootage.Text = Math.Round(sqft, 2).ToString() + " Acres";
                    }


                    if (item.Zoning.Length > 1)
                    {
                        AddToTableGeneral("Zoning", item.Zoning.ToString());
                    }


                    if (item.FloodInsuranceRequired.Length > 1)
                    {
                        AddToTableGeneral("Flood Insurance Required", item.FloodInsuranceRequired.ToString());
                    }

                    //[Subdivision]
                    if (item.Subdivision.Length > 1)
                    {
                        AddToTableNeighborhood("Subdivision", AddSpaceAfterComma(item.Subdivision.ToString()));
                    }


                    if (item.WaterfrontYN.Length > 1)
                    {
                        AddToTableGeneral("Waterfront", item.WaterfrontYN.ToString());
                    }

                    if (item.WaterViewYN.Length > 1)
                    {
                        AddToTableGeneral("Water Views", item.WaterViewYN.ToString());
                    }

                    if (item.BeachDescription.Length > 1)
                    {
                        AddToTableGeneral("Beach Description", AddSpaceAfterComma(item.BeachDescription.ToString()));
                    }
                    if (item.BeachLakePond.Length > 1)
                    {
                        AddToTableGeneral("Beach/Lake/Pond Name", item.BeachLakePond.ToString());
                    }
                    if (item.BeachOwnership.Length > 1)
                    {
                        AddToTableGeneral("Beach Ownership", item.BeachOwnership.ToString());
                    }

                    // Neighborhood TABLE
                    if (item.ConvenientTo.Length > 1)
                    {
                        AddToTableNeighborhood("Convenient To", AddSpaceAfterComma(item.ConvenientTo.ToString()));
                    }
                    //NeighborhoodAmenities
                    if (item.NeighborhoodAmenities.Length > 1)
                    {
                        AddToTableNeighborhood("Neighborhood Amenities", AddSpaceAfterComma(item.NeighborhoodAmenities.ToString()));
                    }
                    //SchoolDistrict
                    if (item.SchoolDistrict.Length > 1)
                    {
                        AddToTableNeighborhood("School District", item.SchoolDistrict.ToString());
                    }



                    //lblBedsBaths
                    string _S_baths     = "";
                    string _S_halfbaths = "";
                    string _S_beds      = "";

                    string _BedsAndBaths = "";
                    if (item.Bedrooms > 1)
                    {
                        _S_beds = "s";
                    }
                    if (item.FullBaths > 1)
                    {
                        _S_baths = "s";
                    }
                    if (item.HalfBaths > 1)
                    {
                        _S_halfbaths = "s";
                    }

                    if (item.Bedrooms > 0)
                    {
                        _BedsAndBaths = item.Bedrooms.ToString() + " Bedroom" + _S_beds.ToString();
                    }
                    if (item.FullBaths > 0)
                    {
                        _BedsAndBaths = _BedsAndBaths.ToString() + " - " + item.FullBaths.ToString() + " Full Bath" + _S_baths.ToString();
                    }
                    if (item.HalfBaths > 0)
                    {
                        _BedsAndBaths = _BedsAndBaths.ToString() + " & " + item.HalfBaths.ToString() + " Half Bath" + _S_halfbaths.ToString();
                    }


                    lblSummary.Text = "MLS #: " + item.ListingNumber.ToString() + " | " + item.PropertySubType1.ToString();

                    if (_BedsAndBaths.ToString().Length > 0)
                    {
                        lblSummary.Text = lblSummary.Text.ToString() + " | " + _BedsAndBaths.ToString();
                    }

                    lblMarketingRemarks.Text = item.PublicRemarks.ToString();

                    lblListingOfficeName.Text = item.ListingOfficeName.ToString();



                    // TAX ASSESSMENT TABLE
                    if (item.LandAssessment > 1)
                    {
                        AddToTableTaxAssessment("Land", String.Format("{0:C0}", item.LandAssessment));
                    }
                    if (item.ImprovementAssessment > 1)
                    {
                        AddToTableTaxAssessment("Improvement", String.Format("{0:C0}", item.ImprovementAssessment));
                    }
                    if (item.OtherAssessment > 1)
                    {
                        AddToTableTaxAssessment("Other", String.Format("{0:C0}", item.OtherAssessment));
                    }
                    if (item.TotalAssessments > 1)
                    {
                        AddToTableTaxAssessment("Total Assessments", String.Format("{0:C0}", item.TotalAssessments));
                    }

                    //if (item.TaxYear.Length > 1)
                    //{
                    //    AddToTableTaxAssessment("Tax Year", item.TaxYear.ToString());
                    //}

                    if (item.Taxes > 0)
                    {
                        AddToTableTaxAssessment(item.TaxYear.ToString() + " Taxes", String.Format("{0:C0}", item.Taxes));
                    }

                    //  item.TaxRate


                    if (item.PropertySubType1.ToString() == "Single Family Residence" || item.PropertySubType1.ToString() == "Condominium")
                    {
                        if (item.InteriorFeatures.Length > 1)
                        {
                            AddToTableInterior("Interior Features", AddSpaceAfterComma(item.InteriorFeatures.ToString()));
                        }



                        if (item.KitchenFeatures.Length > 1)
                        {
                            AddToTableInterior("Kitchen Features", AddSpaceAfterComma(item.KitchenFeatures.ToString()));
                        }
                        // INTERIOR FEATURES TABLE
                        if (item.Appliances.Length > 1)
                        {
                            AddToTableInterior("Appliances", AddSpaceAfterComma(item.Appliances.ToString()));
                        }
                        if (item.FamilyRoomFeatures.Length > 1)
                        {
                            AddToTableInterior("Family Room", AddSpaceAfterComma(item.FamilyRoomFeatures.ToString()));
                        }

                        //if (item.MasterBedroom.Length > 5)
                        //{
                        //    AddToTableInterior("Master Bedroom", item.MasterBedroom.ToString().Replace("0x0 ", ""));
                        //}
                        //MasterBedroomFeatures
                        if (item.MasterBedroomFeatures.Length > 1)
                        {
                            AddToTableInterior("Master Bedroom Features", AddSpaceAfterComma(item.MasterBedroomFeatures.ToString()));
                        }

                        if (item.Bedroom2Features.Length > 1)
                        {
                            AddToTableInterior("Bedroom 2 Features", item.Bedroom2Features.ToString());
                        }

                        if (item.Heating.Length > 1)
                        {
                            AddToTableInterior("Heating", item.Heating.ToString());
                        }
                        if (item.FuelType.Length > 1)
                        {
                            AddToTableInterior("Fuel Type", AddSpaceAfterComma(item.FuelType.ToString()));
                        }
                        if (item.Cooling.Length > 1)
                        {
                            AddToTableInterior("Cooling", item.Cooling.ToString());
                        }

                        if (item.HotWater.Length > 1)
                        {
                            AddToTableInterior("Hot Water", item.HotWater.ToString());
                        }

                        if (item.AsbestosYN.Length > 1)
                        {
                            AddToTableInterior("Asbestos", item.AsbestosYN.ToString());
                        }

                        if (item.LeadPaint.Length > 1)
                        {
                            AddToTableInterior("Lead Paint", item.LeadPaint.ToString());
                        }

                        // EXTERIOR FEATURES TABLE
                        if (item.ExteriorFeatures.Length > 1)
                        {
                            AddToTableExterior("Exterior Features", AddSpaceAfterComma(item.ExteriorFeatures.ToString()));
                        }
                        if (item.Foundation.Length > 1)
                        {
                            AddToTableExterior("Foundation", AddSpaceAfterComma(item.Foundation.ToString()));
                        }
                        //Roofing
                        if (item.Roofing.Length > 1)
                        {
                            AddToTableExterior("Roofing", AddSpaceAfterComma(item.Roofing.ToString()));
                        }


                        PanelResiInteriorFeatures.Visible = true;
                    }



                    if (HttpContext.Current.User.Identity.IsAuthenticated)
                    {
                        lblSummary.Text += " | Days on Market: " + item.DOM.ToString();
                        if (item.OriginalListPrice > 0)
                        {
                            lblSummary.Text += " | Original List Price: " + String.Format("{0:C0}", Convert.ToDouble(item.OriginalListPrice.ToString()));
                        }
                    }
                    else
                    {
                        lblSummary.Text = lblSummary.Text.ToString();
                    }

                    //lblSummary.Text


                    //          BuildGoogleMap(item.Latitude, item.Longitude);
                    BuildPictureGallery(item.PictureCount, item.ListingNumber.ToString());
                }
                else
                {
                    Response.Redirect(Globals.NavigateURL("", "Error=Listing+Removed"), true);
                    lblListingAddress.Text = "Error! Listing cannot be found.";
                }
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
        public void SearchMLS(string MlNumbers)
        {
            try
            {
                int PageSize = 20;
                //Display 20 items per page
                //Get the currentpage index from the url parameter
                if (Request.QueryString["currentpage"] != null)
                {
                    _CurrentPage = Convert.ToInt32(Request.QueryString["currentpage"].ToString());
                }
                else
                {
                    _CurrentPage = 1;
                }

                List <FlexMLSInfo> items;
                FlexMLSController  controller = new FlexMLSController();

                items = controller.FlexMLS_Search_MLS_Numbers(MlNumbers.ToString());

                //    lblDebug.Text = MlNumbers.ToString();

                PagedDataSource objPagedDataSource = new PagedDataSource();
                objPagedDataSource.DataSource = items;

                if (items.Count < 1)
                {
                    //    GMap1.Visible = false;
                    lblErrorMessage.Text = Localization.GetString("DefaultContent", LocalResourceFile);
                }

                if (objPagedDataSource.PageCount > 0)
                {
                    objPagedDataSource.PageSize         = PageSize;
                    objPagedDataSource.CurrentPageIndex = _CurrentPage - 1;
                    objPagedDataSource.AllowPaging      = true;
                }


                lstSearchResults.DataSource = objPagedDataSource;
                lstSearchResults.DataBind();

                lblSearchSummary.Text = "Total Listings Found: " + items.Count.ToString();

                if (PageSize == 0 || items.Count <= PageSize)
                {
                    PagingControl1.Visible = false;
                }
                else
                {
                    PagingControl1.Visible           = true;
                    PagingControl1.TotalRecords      = items.Count;
                    PagingControl1.PageSize          = PageSize;
                    PagingControl1.CurrentPage       = _CurrentPage;
                    PagingControl1.TabID             = TabId;
                    PagingControl1.QuerystringParams = "pg=List&" + GenerateQueryStringParameters(this.Request, "Town", "Village", "Beds", "Baths", "WaterFront", "WaterView", "Type", "Low", "High", "LOID");
                }
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Exemple #18
0
        public void GetListing(int mlsNumber)
        {
            try
            {
                FlexMLSController controller = new FlexMLSController();
                FlexMLSInfo       item       = controller.FlexMLS_Get_Listing(mlsNumber);

                if (item != null)
                {
                    string _S_baths     = "";
                    string _S_halfbaths = "";
                    string _S_beds      = "";

                    string _BedsAndBaths = "";
                    if (item.Bedrooms > 1)
                    {
                        _S_beds = "s";
                    }
                    if (item.TotalBaths > 1)
                    {
                        _S_baths = "s";
                    }
                    if (item.HalfBaths > 1)
                    {
                        _S_halfbaths = "s";
                    }

                    if (item.Bedrooms > 0)
                    {
                        _BedsAndBaths = item.Bedrooms.ToString() + " Bedroom" + _S_beds.ToString();
                    }
                    if (item.FullBaths > 0)
                    {
                        _BedsAndBaths = _BedsAndBaths.ToString() + " - " + item.FullBaths.ToString() + " Full Bath" + _S_baths.ToString();
                    }
                    if (item.HalfBaths > 0)
                    {
                        _BedsAndBaths = _BedsAndBaths.ToString() + " & " + item.HalfBaths.ToString() + " Half Bath" + _S_halfbaths.ToString();
                    }



                    lblMlsInterest.Text = "MLS #: " + item.ListingNumber.ToString() + " | " + String.Format("{0:C0}", item.ListingPrice) + "<br />"
                                          + item.Address.ToString().Trim() + ", " + item.Village.ToString() + "<br />"
                                          + item.PropertyType.ToString() + " | " + _BedsAndBaths.ToString();



                    //if (item.PictureCount > 0)
                    //{
                    //    imgListingImage.ImageUrl = "http://mls.gibs.com/images/" + item.MLNumber.ToString() + ".jpg";
                    //    imgListingImage.Width = 400;

                    //}
                    //else
                    //{
                    //    imgListingImage.Visible = false;
                    //}

                    //if (HttpContext.Current.User.Identity.IsAuthenticated)
                    //{
                    //    lblSummary.Text = lblSummary.Text.ToString() + " | Days on Market: " + item.DOM.ToString();
                    //}

                    //lblSummary.Text
                }
                else
                {
                    //Response.Redirect(Globals.NavigateURL(), true);
                    lblMlsInterest.Text = "Error! Listing cannot be found.";
                }
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Exemple #19
0
        public void SearchMLS()
        {
            try
            {
                int    _bedRooms         = Convert.ToInt32(_beds.ToString());
                int    _bathRooms        = Convert.ToInt32(_baths.ToString());
                string _SearchWaterFront = "";
                string _SearchWaterView  = "";
                int    _priceLow         = Convert.ToInt32(_pricelow.ToString());
                int    _priceHigh        = Convert.ToInt32(_pricehigh.ToString());

                if (_waterfront.ToString() == "True")
                {
                    _SearchWaterFront = "YES";
                }
                if (_waterview.ToString() == "True")
                {
                    _SearchWaterView = "YES";
                }


                StringBuilder _SearchCriteria = new StringBuilder();
                _SearchCriteria.Capacity = 500;

                if (_propertyType.ToString().Length > 0)
                {
                    _SearchCriteria.Append("Listing Type: <b>" + _propertyType.ToString() + "</b> &nbsp;");
                }
                if (_town.ToString().Length > 0)
                {
                    _SearchCriteria.Append(" Town: <b>" + _town.ToString() + "</b> &nbsp;");
                }
                if (_village.ToString().Length > 0)
                {
                    _SearchCriteria.Append(" Village: <b>" + _village.ToString() + "</b> &nbsp;");
                }
                if (_bedRooms > 0)
                {
                    _SearchCriteria.Append(" Bedrooms: <b>" + _bedRooms.ToString() + "</b> &nbsp;");
                }
                if (_bathRooms > 0)
                {
                    _SearchCriteria.Append(" Bathrooms: <b>" + _bathRooms.ToString() + "</b> &nbsp;");
                }
                if (_SearchWaterFront.ToString() == "YES")
                {
                    _SearchCriteria.Append(" Waterfront: <b>" + _SearchWaterFront.ToString() + "</b> &nbsp;");
                }
                if (_SearchWaterView.ToString() == "YES")
                {
                    _SearchCriteria.Append(" Waterview: <b>" + _SearchWaterView.ToString() + "</b> &nbsp;");
                }
                if (_priceLow > 0)
                {
                    _SearchCriteria.Append(" Min. Price: <b>" + _priceLow.ToString() + "</b> &nbsp;");
                }
                if (_priceHigh < 50000000)
                {
                    _SearchCriteria.Append(" Max Price: <b>" + _priceHigh.ToString() + "</b> &nbsp;");
                }
                if (_listingOfficeMLSID.ToString().Length > 0)
                {
                    _SearchCriteria.Append(" Office: <b>" + _listingOfficeMLSID.ToString() + "</b> &nbsp;");
                }
                //else
                //{
                //    _listingOfficeMLSID = "";
                //}

                if (_dom.ToString().Trim().Length > 0)
                {
                    _SearchCriteria.Append(" Days On Market: <b>" + _dom.ToString() + " day or less</b> &nbsp;");
                }
                //else
                //{
                //    _dom = "";
                //}

                if (_complex.ToString().Length > 0)
                {
                    _SearchCriteria.Append(" Complex: <b>" + _complex.ToString() + "</b> &nbsp;");
                }
                //else
                //{
                //    _complex = "";
                //}


                lblSearchCriteria.Text = _SearchCriteria.ToString();

                List <FlexMLSInfo> items;
                FlexMLSController  controller = new FlexMLSController();


                if (_condoSearch == true)
                {
                    items = controller.FlexMLS_Search_Condo(_propertyType.ToString(),
                                                            _town.ToString(), _village.ToString(),
                                                            _bedRooms.ToString(), _bathRooms.ToString(),
                                                            _SearchWaterFront.ToString(),
                                                            _SearchWaterView.ToString(),
                                                            _priceLow.ToString(),
                                                            _priceHigh.ToString(),
                                                            _listingOfficeMLSID, _dom.ToString(), _complex.ToString());
                    //      lblDebug.Text = " Searching Condos";
                }
                else if (_searchMlsNumber == true)
                {
                    items = controller.FlexMLS_Search_MLS_Numbers(_MlsNumbers.ToString());
                    //     lblDebug.Text = " Searching MLS Numbers";
                }
                else
                {
                    items = controller.FlexMLS_Search(_propertyType.ToString(),
                                                      _town.ToString(), _village.ToString(),
                                                      _bedRooms.ToString(), _bathRooms.ToString(),
                                                      _SearchWaterFront.ToString(),
                                                      _SearchWaterView.ToString(),
                                                      _priceLow.ToString(),
                                                      _priceHigh.ToString(),
                                                      _listingOfficeMLSID, _dom.ToString());
                    //   lblDebug.Text = " Searching Search Criteria";
                    //lblDebug.Text += "<br />_propertyType: " + _propertyType.ToString() +
                    //               "<br />_town: " + _town.ToString() +
                    //               "<br />_village: " + _village.ToString() +
                    //               "<br />_bedRooms: " + _bedRooms.ToString() +
                    //               "<br />_bathRooms: " + _bathRooms.ToString() +
                    //               "<br />_SearchWaterFront: " + _SearchWaterFront.ToString() +
                    //               "<br />_SearchWaterView: " + _SearchWaterView.ToString() +
                    //               "<br />_priceLow: " + _priceLow.ToString() +
                    //               "<br />_priceHigh: " + _priceHigh.ToString() +
                    //               "<br />_listingOfficeMLSID: " + _listingOfficeMLSID.ToString() +
                    //               "<br />_dom: " + _dom.ToString();
                }

                //      items.Sort("ListingPrice desc",1);
                PagedDataSource pg = new PagedDataSource();
                pg.DataSource  = items;
                pg.AllowPaging = true;

                pg.PageSize = Int32.Parse(_numberOfRecords.ToString());

                pg.CurrentPageIndex = CurrentPage;

                lblCurrentPage.Text = "Page: " + (CurrentPage + 1).ToString() + " of " + pg.PageCount.ToString();

                // Disable Prev or Next buttons if necessary

                lbPrev.Enabled = !pg.IsFirstPage;
                lbNext.Enabled = !pg.IsLastPage;


                //bind the data
                lstContent.DataSource = pg;
                lstContent.DataBind();

                lblSearchSummary.Text = "Total Listings Found: " + items.Count.ToString();
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }
Exemple #20
0
        //public string GetStatusDesc(string Status)
        //{

        //    try
        //    {
        //        string myRetValue = "";
        //        switch (Status)
        //        {
        //            case "A":
        //                myRetValue = "Active";
        //                break;
        //            case "C":
        //                myRetValue = "Pending with Contingencies";
        //                break;

        //            case "R":
        //                myRetValue = "Listing Removed. Call agent for details!";
        //                break;

        //            default:
        //                myRetValue = "";
        //                break;
        //        }
        //        return myRetValue.ToString();


        //    }
        //    catch (Exception ex)
        //    {
        //        Exceptions.ProcessModuleLoadException(this, ex);
        //        return "Error";
        //    }

        //}


        //public void GetFavoritesModule()
        //{

        //    try
        //    {


        //        DotNetNuke.Entities.Modules.ModuleController mc = new ModuleController();
        //        ArrayList existMods = mc.GetModulesByDefinition(this.PortalId, "GIBS - MLS Connect - Favorites");

        //        foreach (DotNetNuke.Entities.Modules.ModuleInfo mi in existMods)
        //        {
        //            if (!mi.IsDeleted)
        //            {
        //                linkButtonFavorites.Text = mi.ModuleID.ToString();
        //                // get module title
        //                //mi.ModuleTitle;
        //                // additionally, you can find out what tab it is on //mi.TabID;
        //                //mi.ModuleID;
        //                lblDebug.Text = mi.ModuleID.ToString();
        //            }
        //        }



        //    }
        //    catch (Exception ex)
        //    {
        //        Exceptions.ProcessModuleLoadException(this, ex);
        //    }

        //}



        public void SearchMLS()
        {
            try
            {
                int PageSize = 20;
                //Display 20 items per page
                //Get the currentpage index from the url parameter
                if (Request.QueryString["currentpage"] != null)
                {
                    _CurrentPage = Convert.ToInt32(Request.QueryString["currentpage"].ToString());
                }
                else
                {
                    _CurrentPage = 1;
                }



                //int _bedRooms = Convert.ToInt32(_beds.ToString());
                //int _bathRooms = Convert.ToInt32(_baths.ToString());
                //string _SearchWaterFront = "";
                //string _SearchWaterView = "";
                //int _priceLow = Convert.ToInt32(_pricelow.ToString());
                //int _priceHigh = Convert.ToInt32(_pricehigh.ToString());

                if (_waterfrontYN.ToString() == "True")
                {
                    _waterfrontYN = "Yes";
                }
                if (_waterviewYN.ToString() == "True")
                {
                    _waterviewYN = "Yes";
                }


                StringBuilder _SearchCriteria = new StringBuilder();
                _SearchCriteria.Capacity = 500;

                if (_type.ToString().Trim().Length > 0)
                {
                    _SearchCriteria.Append("Listing Type: <b>" + GetPropertyTypeDesc(_type.ToString()) + "</b> &nbsp;");
                }
                else
                {
                    _type = "";
                }


                if (_town.ToString().Trim().Length > 0)
                {
                    _SearchCriteria.Append(" Town: <b>" + _town.ToString() + "</b> &nbsp;");
                }
                else
                {
                    _town = "";
                }

                if (_village.ToString().Trim().Length > 0)
                {
                    _SearchCriteria.Append(" Village: <b>" + _village.ToString() + "</b> &nbsp;");
                }
                else
                {
                    _village = "";
                }

                if (_complex.ToString().Length > 0)
                {
                    _SearchCriteria.Append(" Complex: <b>" + _complexName.ToString() + "</b> &nbsp;");
                }
                else
                {
                    _complex = "";
                }

                if (Int32.Parse(_beds.ToString()) > 0)
                {
                    _SearchCriteria.Append(" Bedrooms: <b>" + _beds.ToString() + "</b> &nbsp;");
                }
                else
                {
                    _beds = "";
                }
                if (Int32.Parse(_baths.ToString()) > 0)
                {
                    _SearchCriteria.Append(" Bathrooms: <b>" + _baths.ToString() + "</b> &nbsp;");
                }
                else
                {
                    _baths = "";
                }
                if (_waterfrontYN.ToString() == "Yes")
                {
                    _SearchCriteria.Append(" Waterfront: <b>" + _waterfrontYN.ToString() + "</b> &nbsp;");
                }
                else
                {
                    _waterfrontYN = "";
                }

                if (_waterviewYN.ToString() == "Yes")
                {
                    _SearchCriteria.Append(" Waterview: <b>" + _waterviewYN.ToString() + "</b> &nbsp;");
                }
                else
                {
                    _waterviewYN = "";
                }

                if (_pricelow > 0)
                {
                    _SearchCriteria.Append(" Min. Price: <b>" + _pricelow.ToString("C0") + "</b> &nbsp;");
                }

                if (_pricehigh < 50000000)
                {
                    _SearchCriteria.Append(" Max Price: <b>" + _pricehigh.ToString("C0") + "</b> &nbsp;");
                }


                if (_listingOfficeMLSID.ToString().Length > 0)
                {
                    _SearchCriteria.Append(" Office: <b>" + _listingOfficeMLSID.ToString() + "</b> &nbsp;");
                }
                else
                {
                    _listingOfficeMLSID = "";
                }

                if (_dom.ToString().Trim().Length > 0)
                {
                    _SearchCriteria.Append(" Days On Market: <b>" + _dom.ToString() + " day or less</b> &nbsp;");
                }
                else
                {
                    _dom = "";
                }

                lblSearchCriteria.Text = _SearchCriteria.ToString();
                // DEBUG
                //lblDebug.Visible = true;
                //lblDebug.Text += "<br /> type:" + _type.ToString() + " town:" +
                //    _town.ToString() + " village:" +
                //    _village.ToString() + " beds:" +
                //    _beds.ToString() + " baths:" +
                //    _baths.ToString() + " waterfront:" +
                //    _waterfrontYN.ToString() + " waterview:" +
                //    _waterviewYN.ToString() + " pricelow:" +
                //    _pricelow.ToString() + " pricehigh:" +
                //    _pricehigh + " listingOff:" + _listingOfficeMLSID.ToString();

                List <FlexMLSInfo> items;
                FlexMLSController  controller = new FlexMLSController();

                if (_condoSearch == true)
                {
                    items = controller.FlexMLS_Search_Condo(_type.ToString(),
                                                            _town.ToString(), _village.ToString(),
                                                            _beds.ToString(), _baths.ToString(),
                                                            _waterfrontYN.ToString(),
                                                            _waterviewYN.ToString(),
                                                            _pricelow.ToString(),
                                                            _pricehigh.ToString(),
                                                            _listingOfficeMLSID, _dom.ToString(), _complexName.ToString().Replace("'", "''").ToString());

                    //    lblDebug.Text = " Searching Condos";
                    GetSeoValues(_complexName.ToString() + " Condominium in " + _town.ToString(), _town.ToString() + ", " + _complexName.ToString() + ", condo, condominium");

                    string MyTitle = "";
                    MyTitle = _complexName.ToString() + " Condominium";
                    ModuleConfiguration.ModuleTitle = MyTitle.ToString();
                }

                else if (_emailSearch == true)
                {
                    // controller.FlexMLS_Search_LastModified
                    items = controller.FlexMLS_Search_LastModified(_type.ToString(),
                                                                   _town.ToString(),
                                                                   _village.ToString(),
                                                                   _beds.ToString(),
                                                                   _baths.ToString(),
                                                                   _waterfrontYN.ToString(),
                                                                   _waterviewYN.ToString(),
                                                                   _pricelow.ToString(),
                                                                   _pricehigh.ToString(), _listingOfficeMLSID.ToString(), _dom.ToString(), _lastModified.ToString(), _complex.ToString());
                }
                else
                {
                    items = controller.FlexMLS_Search(_type.ToString(),
                                                      _town.ToString(),
                                                      _village.ToString(),
                                                      _beds.ToString(),
                                                      _baths.ToString(),
                                                      _waterfrontYN.ToString(),
                                                      _waterviewYN.ToString(),
                                                      _pricelow.ToString(),
                                                      _pricehigh.ToString(), _listingOfficeMLSID.ToString(), _dom.ToString());
                }


                PagedDataSource objPagedDataSource = new PagedDataSource();
                objPagedDataSource.DataSource = items;

                if (items.Count == 0)
                {
                    //GMap1.Visible = false;
                }

                if (objPagedDataSource.PageCount > 0)
                {
                    objPagedDataSource.PageSize         = PageSize;
                    objPagedDataSource.CurrentPageIndex = _CurrentPage - 1;
                    objPagedDataSource.AllowPaging      = true;
                }

                lstSearchResults.DataSource = objPagedDataSource;
                lstSearchResults.DataBind();

                lblSearchSummary.Text = "Total Listings Found: " + items.Count.ToString();

                if (items.Count == 200)
                {
                    lblSearchSummary.Text      = "Over 200 Listing Found! Search results are limited to 200 records. Please refine your criteria.";
                    lblSearchSummary.ForeColor = System.Drawing.Color.Red;
                }


                if (PageSize == 0 || items.Count <= PageSize)
                {
                    PagingControl1.Visible = false;
                }
                else
                {
                    PagingControl1.Visible           = true;
                    PagingControl1.TotalRecords      = items.Count;
                    PagingControl1.PageSize          = PageSize;
                    PagingControl1.CurrentPage       = _CurrentPage;
                    PagingControl1.TabID             = TabId;
                    PagingControl1.QuerystringParams = "pg=List&" + GenerateQueryStringParameters(this.Request, "Town", "Village", "Beds", "Baths", "WaterFront", "WaterView", "Type", "Low", "High", "LOID", "DOM", "e");
                }
            }
            catch (Exception ex)
            {
                Exceptions.ProcessModuleLoadException(this, ex);
            }
        }