Beispiel #1
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");
            }
        }
        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);
            }
        }
Beispiel #3
0
 // ListingViews
 public void FlexMLS_ListingViews_Add(FlexMLSInfo info)
 {
     //check we have some content to store
     if (info.ListingNumber.Length > 0)
     {
         DataProvider.Instance().FlexMLS_ListingViews_Add(info.ModuleId, info.Content, info.ListingNumber, info.ListingPrice, info.CreatedByUserID);
     }
 }
Beispiel #4
0
 public void FlexMLS_Favorites_Add(FlexMLSInfo info)
 {
     //check we have some content to store
     if (info.Favorite != string.Empty)
     {
         DataProvider.Instance().FlexMLS_Favorites_Add(info.ModuleId, info.Favorite, info.FavoriteType, info.UserID, info.EmailSearch);
     }
 }
Beispiel #5
0
        /// <summary>
        /// Adds a new FlexMLSInfo object into the database
        /// </summary>
        /// <param name="info"></param>


        /// <summary>
        /// update a info object already stored in the database
        /// </summary>
        /// <param name="info"></param>
        public void UpdateFlexMLS(FlexMLSInfo info)
        {
            //check we have some content to update
            if (info.Content != string.Empty)
            {
                DataProvider.Instance().UpdateFlexMLS(info.ModuleId, info.ItemId, info.Content, info.CreatedByUser);
            }
        }
Beispiel #6
0
 // IMAGES NEEDED
 public void FlexMLS_ImagesNeeded_Insert(FlexMLSInfo info)
 {
     //check we have some content to store
     if (info.ListingNumber != string.Empty)
     {
         DataProvider.Instance().FlexMLS_ImagesNeeded_Insert(info.ListingNumber);
     }
 }
Beispiel #7
0
        public void ImageNeeded(string listingNumber)
        {
            FlexMLSController controller = new FlexMLSController();
            FlexMLSInfo       item       = new FlexMLSInfo();

            item.ListingNumber = listingNumber;

            controller.FlexMLS_ImagesNeeded_Insert(item);
        }
Beispiel #8
0
        /// <summary>
        /// imports a module from an xml file
        /// </summary>
        /// <param name="ModuleID"></param>
        /// <param name="Content"></param>
        /// <param name="Version"></param>
        /// <param name="UserID"></param>
        public void ImportModule(int ModuleID, string Content, string Version, int UserID)
        {
            XmlNode infos = DotNetNuke.Common.Globals.GetContent(Content, "FlexMLSs");

            foreach (XmlNode info in infos.SelectNodes("FlexMLS"))
            {
                FlexMLSInfo FlexMLSInfo = new FlexMLSInfo();
                FlexMLSInfo.ModuleId      = ModuleID;
                FlexMLSInfo.Content       = info.SelectSingleNode("content").InnerText;
                FlexMLSInfo.CreatedByUser = UserID;

                //    AddFlexMLS(FlexMLSInfo);
            }
        }
        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);
            }
        }
Beispiel #10
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);
            }
        }
Beispiel #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);
            }
        }
Beispiel #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);
            }
        }
Beispiel #13
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);
            }
        }
Beispiel #14
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);
            }
        }