Exemplo n.º 1
0
        void SearchResidentialProperties()
        {
            try
            {
                Property1.MLSDataWebServiceSoapClient mlsClient = new Property1.MLSDataWebServiceSoapClient();
                DataTable dt = new DataTable();
                if (Convert.ToString(Session["QueryString"]) == "Residential" || Convert.ToString(Session["QueryString"]) == "IDXImagesResidential")
                {
                    dt = mlsClient.GetResidentialProperties("0", "0", "0", "0", "0", "0", "0");
                }
                else
                {
                    dt = mlsClient.GetResidentialProperties(Session["SearchText"].ToString(), Session["HomeType"].ToString(), Session["MinPrice"].ToString(), Session["MaxPrice"].ToString(), Session["Beds"].ToString(), Session["Baths"].ToString(), Session["SaleLease"].ToString());
                }

                if (dt.Rows.Count > 0)
                {
                    //upSearch.Visible = true;
                    PagedDataSource pagedData = new PagedDataSource();
                    pagedData.DataSource  = dt.DefaultView;
                    pagedData.AllowPaging = true;
                    pagedData.PageSize    = 8;
                    //pagedData.CurrentPageIndex = CurrentPage;
                    ViewState["totpage"] = pagedData.PageCount;

                    //lnkPrevious.Visible = !pagedData.IsFirstPage;
                    //lnkNext.Visible = !pagedData.IsLastPage;
                    //lnkFirst.Visible = !pagedData.IsFirstPage;
                    //lnkLast.Visible = !pagedData.IsLastPage;

                    ddlresidential.DataSource = pagedData;
                    ddlresidential.DataBind();

                    ddlresidential.DataSource = pagedData;
                    ddlresidential.DataBind();

                    //doPaging();
                    //RepeaterPaging.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
                    mlsClient = null;
                }
                else
                {
                    //resultSearch.Visible = true;
                    //pagesLink.Visible = false;
                    //resultSearch.Text = "Property is not available ";
                }
            }
            catch (Exception ex)
            {
            }
            finally
            {
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Session["QueryString"] = Request.QueryString["PropertyType"];
            Property1.MLSDataWebServiceSoapClient mlsClient = new Property1.MLSDataWebServiceSoapClient();
            DataTable dt = new DataTable();

            if (Convert.ToString(Session["QueryString"]) == "IDXImagesResidential" || Convert.ToString(Session["QueryString"]) == "VoxResidential")
            {
                dt = mlsClient.GetResidentialProperties(Convert.ToString(Request.QueryString["MLSID"]), "0", "0", "0", "0", "0", "0");
            }
            else if (Convert.ToString(Session["QueryString"]) == "IDXImagesCommercial" || Convert.ToString(Session["QueryString"]) == "VoxCommercial")
            {
                dt = mlsClient.GetAllCommercialProperties(Request.QueryString["MLSID"].ToString(), "0", "0", "0", "0", "0");
            }
            else if (Convert.ToString(Session["QueryString"]) == "IDXImagesCondo" || Convert.ToString(Session["QueryString"]) == "VoxCondo")
            {
                dt = mlsClient.GetProperties_Condo(Convert.ToString(Request.QueryString["MLSID"]), "0", "0", "0", "0", "0", "0");
            }
            Property.InnerHtml = (Convert.ToString(dt.Rows[0]["address"]) != "null" && (Convert.ToString(dt.Rows[0]["address"]) != "") ? (Convert.ToString(dt.Rows[0]["address"])) : "") + (Convert.ToString(dt.Rows[0]["province"]) != "null" && (Convert.ToString(dt.Rows[0]["province"]) != "") ? ("," + Convert.ToString(dt.Rows[0]["province"])) : "");
            if (!IsPostBack)
            {
                FillCapctha();
            }
            cls_Property clsobj = new cls_Property();
            DataTable    dt1    = clsobj.GetSiteSettings();

            if (dt.Rows.Count > 0)
            {
                siteTitle.Text = Convert.ToString(dt1.Rows[0]["Title"]);
                // lblemail.Text = Convert.ToString(dt.Rows[0]["Email"]);
            }
        }
        private void SetValuesFaceBookShare()
        {
            String MLSID        = Request.QueryString["MLSID"];
            String PropertyType = Request.QueryString["PropertyType"];


            Property1.MLSDataWebServiceSoapClient mlsClient = new Property1.MLSDataWebServiceSoapClient();

            DataTable dt = new DataTable();

            if (PropertyType.Contains("Residential"))
            {
                dt = mlsClient.GetResidentialProperties(Convert.ToString(Request.QueryString["MLSID"]), "0", "0", "0", "0", "0", "0");
            }
            else if (PropertyType.Contains("Commercial"))
            {
                dt = mlsClient.GetAllCommercialProperties(Request.QueryString["MLSID"].ToString(), "0", "0", "0", "0", "0");
            }
            else if (PropertyType.Contains("Condo"))
            {
                dt = mlsClient.GetProperties_Condo(Convert.ToString(Request.QueryString["MLSID"]), "0", "0", "0", "0", "0", "0");
            }


            if (dt.Rows.Count > 0)
            {
                fbProprtyTitle.Content       = string.Format("{0}, {1}, {2}, {3}", dt.Rows[0]["Address"].ToString(), dt.Rows[0]["Municipality"].ToString(), dt.Rows[0]["PostalCode"].ToString(), dt.Rows[0]["province"].ToString());
                fbProprtyUrl.Content         = string.Format("http://teamurbansignature.com/PropertyDetails.aspx?MLSID={0}&PropertyType={1}", dt.Rows[0]["MLS"].ToString(), dt.Rows[0]["pType"].ToString());
                fbProprtyImage.Content       = dt.Rows[0]["pImage"].ToString();
                fbProprtyDescription.Content = dt.Rows[0]["remarksforclients"].ToString();
                fbProprtyShareType.Content   = "Property";
            }
        }
Exemplo n.º 4
0
        private void SetValuesFaceBookShare()
        {
            String MLSID        = Request.QueryString["MLSID"];
            String PropertyType = Request.QueryString["PropertyType"];


            Property1.MLSDataWebServiceSoapClient mlsClient = new Property1.MLSDataWebServiceSoapClient();

            DataTable dt = new DataTable();

            if (PropertyType.Contains("Residential"))
            {
                dt = mlsClient.GetResidentialProperties(Convert.ToString(Request.QueryString["MLSID"]), "0", "0", "0", "0", "0", "0");
            }
            else if (PropertyType.Contains("Commercial"))
            {
                dt = mlsClient.GetAllCommercialProperties(Request.QueryString["MLSID"].ToString(), "0", "0", "0", "0", "0");
            }
            else if (PropertyType.Contains("Condo"))
            {
                dt = mlsClient.GetProperties_Condo(Convert.ToString(Request.QueryString["MLSID"]), "0", "0", "0", "0", "0", "0");
            }


            if (dt.Rows.Count > 0)
            {
                image.Content = dt.Rows[0]["pImage"].ToString();
            }
        }
Exemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Page.Title        = "Homelife Properties:Send Email";
            Session["QueryString"] = Request.QueryString["PropertyType"];
            Property1.MLSDataWebServiceSoapClient mlsClient = new Property1.MLSDataWebServiceSoapClient();
            DataTable dt = new DataTable();

            if (Convert.ToString(Session["QueryString"]) == "IDXImagesResidential" || Convert.ToString(Session["QueryString"]) == "VoxResidential")
            {
                dt = mlsClient.GetResidentialProperties(Convert.ToString(Request.QueryString["MLSID"]), "0", "0", "0", "0", "0", "0");
            }
            else if (Convert.ToString(Session["QueryString"]) == "IDXImagesCommercial" || Convert.ToString(Session["QueryString"]) == "VoxCommercial")
            {
                dt = mlsClient.GetAllCommercialProperties(Request.QueryString["MLSID"].ToString(), "0", "0", "0", "0", "0");
            }
            else if (Convert.ToString(Session["QueryString"]) == "IDXImagesCondo" || Convert.ToString(Session["QueryString"]) == "VoxCondo")
            {
                dt = mlsClient.GetProperties_Condo(Convert.ToString(Request.QueryString["MLSID"]), "0", "0", "0", "0", "0", "0");
            }
            Property.InnerHtml = (Convert.ToString(dt.Rows[0]["address"]) != "null" && (Convert.ToString(dt.Rows[0]["address"]) != "") ? (Convert.ToString(dt.Rows[0]["address"])) : "") + (Convert.ToString(dt.Rows[0]["province"]) != "null" && (Convert.ToString(dt.Rows[0]["province"]) != "") ? ("," + Convert.ToString(dt.Rows[0]["province"])) : "");
            if (!IsPostBack)
            {
                FillCapctha();
            }
        }
 void GetPropertyDetails()
 {
     try
     {
         Property1.MLSDataWebServiceSoapClient mlsClient = new Property1.MLSDataWebServiceSoapClient();
         DataTable dt = new DataTable();
         dt = mlsClient.GetResidentialProperties(Convert.ToString(Request.QueryString["MLSID"]), "0", "0", "0", "0", "0", "0");
         if (dt.Rows.Count > 0)
         {
             //lblPrice.Text = "$" + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["ListPrice"]));
         }
     }
     catch
     { }
 }
        private void SetValuesFaceBookShare()
        {
            String MLSID        = Request.QueryString["MLSID"];
            String PropertyType = Request.QueryString["PropertyType"];

            //fbProprtyImage.Content = "";
            //fbProprtyTitle.Content = "";
            //fbProprtyUrl.Content = "";
            //fbProprtySiteName.Content = "";
            //fbProprtyShareType.Content = "";

            Property1.MLSDataWebServiceSoapClient mlsClient = new Property1.MLSDataWebServiceSoapClient();

            DataTable dt = new DataTable();

            if (PropertyType != null)
            {
                if (PropertyType.Contains("Residential"))
                {
                    dt = mlsClient.GetResidentialProperties(Convert.ToString(Request.QueryString["MLSID"]), "0", "0", "0", "0", "0", "0");
                }
                else if (PropertyType.Contains("Commercial"))
                {
                    dt = mlsClient.GetAllCommercialProperties(Request.QueryString["MLSID"].ToString(), "0", "0", "0", "0", "0");
                }
                else if (PropertyType.Contains("Condo"))
                {
                    dt = mlsClient.GetProperties_Condo(Convert.ToString(Request.QueryString["MLSID"]), "0", "0", "0", "0", "0", "0");
                }
            }



            if (dt.Rows.Count > 0)
            {
                //dt.Rows[0][]
                image.Content = dt.Rows[0]["pImage"].ToString();
                //fbProprtyTitle.Content = string.Format("{0}, {1}, {2}, {3}", dt.Rows[0]["Address"].ToString(), dt.Rows[0]["Municipality"].ToString(), dt.Rows[0]["PostalCode"].ToString(), dt.Rows[0]["province"].ToString());
                //fbProprtyUrl.Content = string.Format("http://pareshdesai.ca/PropertyDetails.aspx?MLSID={0}&PropertyType={1}", dt.Rows[0]["MLS"].ToString(), dt.Rows[0]["pType"].ToString());
                //fbProprtySiteName.Content = "";
                //fbProprtyShareType.Content = "Property";
            }
        }
Exemplo n.º 8
0
        public string GetPropertyDetails()
        {
            Session["QueryString"] = Request.QueryString["PropertyType"];
            StringBuilder html     = new StringBuilder();
            DataTable     dt       = new DataTable();
            DataTable     dtimages = new DataTable();

            Property1.MLSDataWebServiceSoapClient mlsClient       = new Property1.MLSDataWebServiceSoapClient();
            Property1.MLSDataWebServiceSoapClient mlsClientimages = new Property1.MLSDataWebServiceSoapClient();

            if (Convert.ToString(Session["QueryString"]) == "IDXImagesResidential" || Convert.ToString(Session["QueryString"]) == "VoxResidential")
            {
                dt = mlsClient.GetResidentialProperties(Convert.ToString(Request.QueryString["MLSID"]), "0", "0", "0", "0", "0", "0");
            }
            else if (Convert.ToString(Session["QueryString"]) == "IDXImagesCommercial" || Convert.ToString(Session["QueryString"]) == "VoxCommercial")
            {
                dt = mlsClient.GetAllCommercialProperties(Request.QueryString["MLSID"].ToString(), "0", "0", "0", "0", "0");
            }
            else if (Convert.ToString(Session["QueryString"]) == "IDXImagesCondo" || Convert.ToString(Session["QueryString"]) == "VoxCondo")
            {
                dt = mlsClient.GetProperties_Condo(Convert.ToString(Request.QueryString["MLSID"]), "0", "0", "0", "0", "0", "0");
            }
            if (Convert.ToString(Session["QueryString"]) == "IDXImagesResidential")
            {
                dtimages = mlsClientimages.GetImageByMLSID(Convert.ToString(Request.QueryString["MLSID"]));
            }
            else if (Convert.ToString(Session["QueryString"]) == "IDXImagesCommercial" || Convert.ToString(Session["QueryString"]) == "VoxCommercial")
            {
                dtimages = mlsClientimages.GetCommercialPropertiesByMLSID(Convert.ToString(Request.QueryString["MLSID"]));
            }
            else if (Convert.ToString(Session["QueryString"]) == "IDXImagesCondo")
            {
                dtimages = mlsClientimages.GetPropertiesByMLSID_Condo(Convert.ToString(Request.QueryString["MLSID"]));
            }
            if (dt.Rows.Count > 0)
            {
                html.AppendLine("<div id='divEmail' style='width:100%; float:left;'>");
                html.AppendLine("<h2 style='font-weight:bold; font-size:16px;'>Pavan Sharma for Property ID  " + dt.Rows[0]["MLS"].ToString() + ";</h2>");
                html.AppendLine("<h2 style='font-weight: bold; font-size: 16px;'>Message Received From:</h2>");
                html.AppendLine("<p style='float: left; margin: 0 40px 0 0;'>Phone Number:</p><span style='float:left;'>519-500-5729</span><br/>");
                html.AppendLine("<h2 style='font-weight: bold; font-size: 16px;'>Message:</h2>");
                html.AppendLine("<p>Please take a look at Property ID# " + dt.Rows[0]["MLS"].ToString() + " located at " + dt.Rows[0]["Address"].ToString() + "</p>");
                html.AppendLine("<h2 style='font-weight:bold; font-size:16px;'>Referring Page:</h2>");
                html.AppendLine("<p>http://pavansharma.ca///</p>");
                html.AppendLine("<h2 style='font-weight:bold; font-size:16px;'>Property Information:</h2>");
                html.AppendLine("<div style='float:left; width:30%;'>");
                html.AppendLine("<h2 style='font-weight:bold; font-size:13px; margin:0px;'>" + dt.Rows[0]["ListPrice"].ToString() + "<br />");
                //html.AppendLine("366 Hespeler Road, Unit 13 B, Cambridge, Ontario, N1R 6J6<br/>Property ID: " + dt.Rows[0]["MLS"].ToString() + "</h2>");
                html.AppendLine("</div>");
                html.AppendLine("<div style='float:left;'>");
                html.AppendLine("<p style='float:left; margin:0 12px 0 0; font-weight:bold;'>Beds:</p><span style='float:left; margin:0 30px 0 0;'>" + dt.Rows[0]["BedRooms"].ToString() + "</span>");
                html.AppendLine("<p style='float:left; margin:0 12px 0 0; font-weight:bold;'>Bath:</p><span style='float:left;'>" + dt.Rows[0]["WashRooms"].ToString() + "</span><br/>");
                //html.AppendLine("<p style='float:left; margin:0 12px 0 0; font-weight:bold;'>Square Feet:</p><span style='float:left;'>" + dt.Rows[0]["Maintenance"].ToString() + "</span><br/>");
                //html.AppendLine("<p style='float:left; margin:0 12px 0 0; font-weight:bold;'>Year Built:</p><span style='float:left;'>" + dt.Rows[0]["Maintenance"].ToString() + "</span><br/>");
                html.AppendLine("<p style='float:left; margin:0 12px 0 0; font-weight:bold;'>Style:</p><span style='float:left;'>" + dt.Rows[0]["PType"].ToString() + "</span><br/>");
                html.AppendLine("</div>");
                html.AppendLine("<p style='float:left; width:100%;'>For more information on this property, <a href='#'>click HERE.</a></p>");
                html.AppendLine("<div style='float:left; width:100%;'>");
                html.AppendLine("<div style='float:left; margin:0 0 0 250px; border-right:1px solid grey; padding-right:7px; width:400px;'>");
                html.AppendLine("<div style='float:left; margin:0 56px 0 0;'>");
                html.AppendLine("<p style='margin:0px;'>16 Bretton Circle<br/>" + dt.Rows[0]["Address"].ToString() + "</p></div>");
                html.AppendLine("<div style='float:left;'>");
                html.AppendLine("<p style='margin:0px;'>" + dt.Rows[0]["ListPrice"].ToString() + "</p>");
                html.AppendLine("<p style='float:left; margin:0 40px 0 0; font-size:12px;'>Property ID:</p><span style='float:left; font-size:12px;'>" + dt.Rows[0]["MLS"].ToString() + "</span><br/></div>");
                html.AppendLine("<p style='float:left; width:100%;'>ELEGANT EXECUTIVE GREENPARK HOME IN PRESTIGIOUS ROUGE FAIRWAYS</p>");
                html.AppendLine("" + dt.Rows[0]["RemarksForClients"].ToString() + "");
                html.AppendLine("<p>For more information visit <a href='#'>http://pavansharma.ca///</a> </p></div>");
                html.AppendLine("<div style='float:left; padding-left:12px;'>");
                html.AppendLine("<p style='margin:0px;'>Listed By</p><br/><p>Pavan Sharma<br/>Sales Representative</p>");
                //html.AppendLine(" <h2 style='font-size:16px;'>Leading Edge Realty Inc.</h2>");
                //html.AppendLine("<p style='margin:0px;'>2250 BOVAIRD DRIVE EAST UNIT # 502 BRAMPTON ON L6R 0W3 </p>");
                html.AppendLine("<p style='float:left; margin:0 40px 0 0; font-weight:bold;'>Cell::</p><span style='float:left;'>519-500-5729</span><br/>'");
                //html.AppendLine("<p style='float:left; margin:0 40px 0 0; font-weight:bold;'>Office:</p><span style='float:left;'>905-497-2300</span><br/>");
                //html.AppendLine("<p style='float:left; margin:0 40px 0 0; font-weight:bold;'>Office Fax:</p><span style='float:left;'>905-497-0400</span><br/>'");
                html.AppendLine("<p style='float:left; margin:0 40px 0 0; font-weight:bold;'>E-mail:</p><span style='float:left;'>[email protected]</span><br/>");
                html.AppendLine("<p style='float:left; margin:0 40px 0 0; font-weight:bold;'>Website:</p><span style='float:left;'>http://pavansharma.ca///</span><br/></div></div>");
                html.AppendLine("<div style='float:left; width:100%;'>");
                html.AppendLine("<div style='float:left; margin:0 0 0 250px; border-right:1px solid grey; padding-right:7px; width:400px; border-top:1px solid grey;>");
                html.AppendLine("<h2 style='font-size:16px;'>Property Details</h2>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>ID:</p><span style='float:left;'>" + dt.Rows[0]["MLS"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Style:</p><span style='float:left;'>" + dt.Rows[0]["PType"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Beds:</p><span style='float:left;'>" + dt.Rows[0]["BedRooms"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Baths:</p><span style='float:left;'>" + dt.Rows[0]["WashRooms"].ToString() + "   (Full: 2   3/4: 1   1/2: 1   Other: 0)</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Washrooms:</p><span style='float:left;'>" + dt.Rows[0]["WashRooms"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Status:</p><span style='float:left;'>Active</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Total Rooms:</p><span style='float:left;'>" + dt.Rows[0]["Rooms"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Storeys:</p><span style='float:left;>" + dt.Rows[0]["TypeOwn1Out"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Fireplaces:</p><span style='float:left;>1</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>New Construction:</p><span style='float:left;>No</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Financial Considerations Estimated Annual Taxes:</p><span style='float:left;>$5,663</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Locale County:</p><span style='float:left;>York</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>High School:</p><span style='float:left;>Markham District Highschool</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Elementary School:</p><span style='float:left;>Boxwood Public School</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Neighbourhood:</p><span style='float:left;>Rouge Fairways Community</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>School District:</p><span style='float:left;>York Region</span></div>");
                html.AppendLine("<h2 style='font-size:16px;'>Property Details</h2>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Bedroom 5</p><span style='float:left;'>" + dt.Rows[0]["Room5Length"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Kitchen </p><span style='float:left;'>" + dt.Rows[0]["Room3Length"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Living / Dining Room </p><span style='float:left;'>" + dt.Rows[0]["Room1Length"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Den / Office</p><span style='float:left;'>" + dt.Rows[0]["Room5Length"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Dining Room</p><span style='float:left;'>" + dt.Rows[0]["Room2Length"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Family Room</p><span style='float:left;'>" + dt.Rows[0]["Room5Length"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Kitchen</p><span style='float:left;'>" + dt.Rows[0]["Room5Length"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Living Room</p><span style='float:left;'>" + dt.Rows[0]["Room5Length"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Bathroom 2</p><span style='float:left;'>" + dt.Rows[0]["Room5Length"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Bathroom 3</p><span style='float:left;'>" + dt.Rows[0]["Room5Length"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Bathroom 4</p><span style='float:left;'>" + dt.Rows[0]["Room5Length"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Master Bedroom</p><span style='float:left;'>" + dt.Rows[0]["Room5Length"].ToString() + "</span></div> </div>");
                html.AppendLine("<div style='float:left; padding-left:12px; width:500px; border-top:1px solid grey;'>");
                html.AppendLine("<h2 style='font-size:16px;'>Features</h2>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Air Conditioning</p>");
                html.AppendLine("<p style='float:left; width:100%;' margin:0px;>Central Air</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Basement</p>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Full</p><span style='float:left;'>Finished</span></div>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Shingle - Newer Roof 2009 (40 Year Shingles)Other - Wrap Around</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Brick</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Family Room</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Y - Main Floor Family Room With</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Fireplace</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Garage Type</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Attached</p>");
                html.AppendLine(" <p style='float:left; width:100%; margin:0px;'>Laundry Access</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>In Area - Main Floor Laundry</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Parking/Drive</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Private - Parking For 4 Cars on </p>");
                html.AppendLine(" <p style='float:left; width:100%; margin:0px;'>Driveway</p> </div> </div> </div>");
            }
            //literal.Text = html.ToString();
            return(html.ToString());
        }
Exemplo n.º 9
0
        public void SendMailToAdmin(string UserEmailId)
        {
            MailMessage   mail     = new MailMessage();
            DataTable     dt1      = clsobj.GetSiteSettings();
            StringBuilder html     = new StringBuilder();
            DataTable     dt       = new DataTable();
            DataTable     dtimages = new DataTable();

            if (dt1.Rows.Count > 0)
            {
                //string ToEmailID = Convert.ToString(dt1.Rows[0]["Email"]);
                string ToEmailID = ConfigurationManager.AppSettings["ToEmailID"].ToString(); //From Email & To Email are same for admin
                //string ToEmailPassword = ConfigurationManager.AppSettings["ToEmailPassword"].ToString();
                string  FromEmailID            = ConfigurationManager.AppSettings["RegFromMailAddress"].ToString();
                string  FromEmailPassword      = ConfigurationManager.AppSettings["RegPassword"].ToString();
                string  _Host                  = ConfigurationManager.AppSettings["SmtpServer"].ToString();
                int     _Port                  = Convert.ToInt32(ConfigurationManager.AppSettings["Port"].ToString());
                Boolean _UseDefaultCredentials = false;
                Boolean _EnableSsl             = true;
                mail.To.Add(ToEmailID);
                mail.From    = new MailAddress(FromEmailID);
                mail.Subject = "Sharan Butan : '" + txtFirstName.Text + " :  " + txtPhoneNo.Text;
                //string body = "";
                ////body = "<p>Person Name : " + txtFirstName.Text + "</p>";
                ////body = body + "<p>Email ID : " + UserEmailId + "</p>";
                ////body = body + "<p>" + txtMessage.Text + "</p>";
                //body = "<p> First Name : " + txtFirstName.Text + "</p>";
                //body = body + "<p> Last Name : " + txtLastName.Text + "</p>";
                //body = body + "<p>E-Mail : " + txtEmail.Text + "</p>";
                //body = body + "<p>Phone Number : " + txtPhoneno.Text + "</p>";
                //body = body + "<p>Desired Property Type : " + ddltype.SelectedItem.Text + "</p>";
                //body = body + "<p>Price Range : " + ddlrange.SelectedItem.Text + "</p>";
                //body = body + "<p>Preferred Location : " + txtSearch.Text + "</p>";
                //body = body + "<p> Comments : " + txtMessage.Text + "</p>";
                Session["MLSID"] = txtSearch.Text;
                Property1.MLSDataWebServiceSoapClient mlsClient       = new Property1.MLSDataWebServiceSoapClient();
                Property1.MLSDataWebServiceSoapClient mlsClientimages = new Property1.MLSDataWebServiceSoapClient();
                dt = mlsClient.GetResidentialProperties(Convert.ToString(Session["MLSID"]), "0", "0", "0", "0", "0", "0");
                html.AppendLine("<div id='divEmail' style='width:100%; float:left;'>");
                html.AppendLine("<h2 style='font-weight:bold; font-size:16px;'>Sharan Butan for Property ID  " + dt.Rows[0]["MLS"].ToString() + ";</h2>");
                html.AppendLine("<h2 style='font-weight: bold; font-size: 16px;'>Message Received From:</h2>");
                html.AppendLine("<p style='float: left; margin: 0 40px 0 0;'>Name:</p><span style='float:left;'>" + txtFirstName.Text + "</span><br/>");

                html.AppendLine("<p style='float: left; margin: 0 40px 0 0;'>Phone Number:</p><span style='float:left;'>" + txtPhoneNo.Text + "</span><br/>");
                html.AppendLine("<h2 style='font-weight: bold; font-size: 16px;'>Message:</h2>");
                html.AppendLine("<p>Please take a look at Property ID " + dt.Rows[0]["MLS"].ToString() + " located at " + dt.Rows[0]["Address"].ToString() + "</p>");
                //html.AppendLine("<h2 style='font-weight:bold; font-size:16px;'>Referring Page:</h2>");
                //html.AppendLine("<p>Gurdeepkalra.tejassolutions.ca</p>");
                html.AppendLine("<h2 style='font-weight:bold; font-size:16px;'>Property Information:</h2>");
                html.AppendLine("<div style='float:left; width:30%;'>");
                html.AppendLine("<h2 style='font-weight:bold; font-size:16px; margin:0px;'>" + dt.Rows[0]["ListPrice"].ToString() + "<br />");
                html.AppendLine("" + dt.Rows[0]["Address"].ToString() + "  <br/>Property ID: " + dt.Rows[0]["MLS"].ToString() + "</h2>");
                html.AppendLine("</div>");
                html.AppendLine("<div style='float:left;'>");
                //html.AppendLine("<p style='float:left; margin:0 12px 0 0; font-weight:bold;'>Beds:</p><span style='float:left; margin:0 30px 0 0;'>" + dt.Rows[0]["BedRooms"].ToString() + "</span>");
                html.AppendLine("<p style='float:left; margin:0 12px 0 0; font-weight:bold;'>Bath:</p><span style='float:left;'>" + dt.Rows[0]["WashRooms"].ToString() + "</span><br/>");
                //html.AppendLine("<p style='float:left; margin:0 12px 0 0; font-weight:bold;'>Square Feet:</p><span style='float:left;'>" + dt.Rows[0]["Maintenance"].ToString() + "</span><br/>");
                //html.AppendLine("<p style='float:left; margin:0 12px 0 0; font-weight:bold;'>Year Built:</p><span style='float:left;'>" + dt.Rows[0]["Maintenance"].ToString() + "</span><br/>");
                html.AppendLine("<p style='float:left; margin:0 12px 0 0; font-weight:bold;'>Style:</p><span style='float:left;'>" + dt.Rows[0]["PType"].ToString() + "</span><br/>");
                html.AppendLine("</div>");
                html.AppendLine("<p style='float:left; width:100%;'>For more information on this property, <a href='#'>click HERE.</a></p>");
                html.AppendLine("<div style='float:left; width:100%;'>");
                html.AppendLine("<div style='float:left; margin:0 0 0 250px; border-right:1px solid grey; padding-right:7px; width:400px;'>");
                html.AppendLine("<div style='float:left; margin:0 56px 0 0;'>");
                html.AppendLine("<p style='margin:0px;'>16 Bretton Circle<br/>" + dt.Rows[0]["Address"].ToString() + "</p></div>");
                html.AppendLine("<div style='float:left;'>");
                html.AppendLine("<p style='margin:0px;'>" + dt.Rows[0]["ListPrice"].ToString() + "</p>");
                html.AppendLine("<p style='float:left; margin:0 40px 0 0; font-size:12px;'>Property ID:</p><span style='float:left; font-size:12px;'>" + dt.Rows[0]["MLS"].ToString() + "</span><br/></div>");
                html.AppendLine("<p style='float:left; width:100%;'>ELEGANT EXECUTIVE GREENPARK HOME IN PRESTIGIOUS ROUGE FAIRWAYS</p>");
                html.AppendLine("" + dt.Rows[0]["RemarksForClients"].ToString() + "");
                //html.AppendLine("<p>For more information visit <a href='#'>" + ConfigurationManager.AppSettings["WebSiteUrl"].ToString() + "</a> </p></div>");
                html.AppendLine("<div style='float:left; padding-left:12px;'>");
                html.AppendLine("<p style='margin:0px;'>Listed By</p><br/><p>Sharan Butan<br/>Broker of record</p>");
                html.AppendLine(" <h2 style='font-size:16px;'>Leading Edge Realty Inc.</h2>");
                html.AppendLine("<p style='margin:0px;'>470 Chrysler Dr. Unit #20 Brampton,Ontario</p>");
                html.AppendLine("<p style='float:left; margin:0 40px 0 0; font-weight:bold;'>Cell::</p><span style='float:left;'>" + dt1.Rows[0]["PhoneNumber"].ToString() + "</span><br/>'");
                //html.AppendLine("<p style='float:left; margin:0 40px 0 0; font-weight:bold;'>Office:</p><span style='float:left;'>905-497-2300</span><br/>");
                //html.AppendLine("<p style='float:left; margin:0 40px 0 0; font-weight:bold;'>Office Fax:</p><span style='float:left;'>905-497-0400</span><br/>'");
                html.AppendLine("<p style='float:left; margin:0 40px 0 0; font-weight:bold;'>E-mail:</p><span style='float:left;'[email protected]</span><br/>");
                //html.AppendLine("<p style='float:left; margin:0 40px 0 0; font-weight:bold;'>Website:</p><span style='float:left;'>" + ConfigurationManager.AppSettings["WebSiteUrl"].ToString() + "</span><br/></div></div>");
                html.AppendLine("<div style='float:left; width:100%; margin-left: 247px;'>");
                html.AppendLine("<div style='float:left; margin:0 0 0 250px; border-right:1px solid grey; padding-right:7px; width:400px; border-top:1px solid grey;>");
                html.AppendLine("<h2 style='font-size:16px;'>Property Details</h2>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>ID:</p><span style='float:left;'>" + dt.Rows[0]["MLS"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Style:</p><span style='float:left;'>" + dt.Rows[0]["PType"].ToString() + "</span></div>");
                //html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Beds:</p><span style='float:left;'>" + dt.Rows[0]["BedRooms"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Baths:</p><span style='float:left;'>" + dt.Rows[0]["WashRooms"].ToString() + "   (Full: 2   3/4: 1   1/2: 1   Other: 0)</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Washrooms:</p><span style='float:left;'>" + dt.Rows[0]["WashRooms"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Status:</p><span style='float:left;'>Active</span></div>");
                //html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Total Rooms:</p><span style='float:left;'>" + dt.Rows[0]["Rooms"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Storeys:</p><span style='float:left;>" + dt.Rows[0]["TypeOwn1Out"].ToString() + "</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Fireplaces:</p><span style='float:left;>1</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>New Construction:</p><span style='float:left;>No</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Financial Considerations Estimated Annual Taxes:</p><span style='float:left;>$5,663</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Locale County:</p><span style='float:left;>York</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>High School:</p><span style='float:left;>Markham District Highschool</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Elementary School:</p><span style='float:left;>Boxwood Public School</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Neighbourhood:</p><span style='float:left;>Rouge Fairways Community</span></div>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>School District:</p><span style='float:left;>York Region</span></div>");
                html.AppendLine("<h2 style='font-size:16px;'>Property Details</h2>");
                html.AppendLine("<div style='float:left; padding-left:12px; width:500px; border-top:1px solid grey;'>");
                html.AppendLine("<h2 style='font-size:16px;'>Features</h2>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Air Conditioning</p>");
                html.AppendLine("<p style='float:left; width:100%;' margin:0px;>Central Air</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Basement</p>");
                html.AppendLine("<div style='float:left; width:100%;'><p style='float:left; margin:0 80px 0 0; width:20%;'>Full</p><span style='float:left;'>Finished</span></div>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Shingle - Newer Roof 2009 (40 Year Shingles)Other - Wrap Around</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Brick</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Family Room</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Y - Main Floor Family Room With</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Fireplace</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Garage Type</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Attached</p>");
                html.AppendLine(" <p style='float:left; width:100%; margin:0px;'>Laundry Access</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>In Area - Main Floor Laundry</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Parking/Drive</p>");
                html.AppendLine("<p style='float:left; width:100%; margin:0px;'>Private - Parking For 4 Cars on </p>");
                html.AppendLine(" <p style='float:left; width:100%; margin:0px;'>Driveway</p> </div> </div> </div>");
                mail.Body       = html.ToString();
                mail.IsBodyHtml = true;
                SmtpClient smtp = new SmtpClient();
                smtp.Host = _Host;
                smtp.Port = _Port;
                smtp.UseDefaultCredentials = _UseDefaultCredentials;
                smtp.Credentials           = new System.Net.NetworkCredential
                                                 (FromEmailID, FromEmailPassword);// Enter senders User name and password
                smtp.EnableSsl = _EnableSsl;
                smtp.Send(mail);
            }
        }
        void GetPropertyDetails()
        {
            try
            {
                Property1.MLSDataWebServiceSoapClient mlsClient = new Property1.MLSDataWebServiceSoapClient();

                DataTable dt = new DataTable();
                if (Session["PropertySearchType"].ToString().Contains("Residential"))
                {
                    dt = mlsClient.GetResidentialProperties(Convert.ToString(Request.QueryString["MLSID"]), "0", "0", "0", "0", "0", "0");
                }
                else if (Session["PropertySearchType"].ToString().Contains("Commercial"))
                {
                    dt = mlsClient.GetAllCommercialProperties(Request.QueryString["MLSID"].ToString(), "0", "0", "0", "0", "0");
                }
                else if (Session["PropertySearchType"].ToString().Contains("Condo"))
                {
                    dt = mlsClient.GetProperties_Condo(Convert.ToString(Request.QueryString["MLSID"]), "0", "0", "0", "0", "0", "0");
                }

                //lblListBrokerage.Text = "Listing Contracted with: " + Convert.ToString(dt.Rows[0]["ListBrokerage"]);
                //if ((Convert.ToString(dt.Rows[0]["PImage"])) == "images/no-image.gif")
                //{
                //    imgge.Visible = false;
                //    img.Visible = true;
                //}
                //imgge.ImageUrl = Convert.ToString(dt.Rows[0]["PImage"]);

                //lblPrice.Text = "$" + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["ListPrice"]));
                //lblListPrice.Text = "$" + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["ListPrice"]));
                //try
                //{
                //    lblStyle.Text = Convert.ToString(dt.Rows[0]["TypeOwn1Out"]) + " " + Convert.ToString(dt.Rows[0]["Style"]);
                //}
                //catch
                //{
                //    lblStyle.Text = Convert.ToString(dt.Rows[0]["TypeOwn1Out"]) + " " + Convert.ToString(dt.Rows[0]["Category"]);
                //}
                // lblMLS.Text = Convert.ToString(dt.Rows[0]["MLS"]);
                Session["Address"]          = (CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["address"])) + ", " + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Municipality"])) + " , " + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["PostalCode"])));
                lblAddressBar1.Text         = (CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["address"])) + ", " + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Municipality"])) + ", " + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["PostalCode"])) + " , " + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["province"])));
                lblPropertyDescription.Text = Convert.ToString(dt.Rows[0]["remarksforclients"]);
                string extras;
                if (dt.Rows[0]["extras"].ToString().Length > 5)
                {
                    extras = "<b style='float:left; width:80px;'>Extras :</b>" + "<div style='margin:0 0 0 96px;'>" + Convert.ToString(dt.Rows[0]["extras"]) + "</div>";
                }
                else
                {
                    extras = "";
                }

                //lblCommunity.Text = Convert.ToString(dt.Rows[0]["Community"]);

                // lblprovince.Text = CheckNullOrEmptyvalue(dt.Rows[0]["Municipality"].ToString());

                //try
                //{
                //    lblStorey.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Style"]));
                //}
                //catch
                //{
                //    lblStorey.Text = "";
                //}

                //lblSubTypeofhome.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["typeown1out"]));
                string frontONNsew = "";
                try
                {
                    frontONNsew = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["FrontingOnNSEW"]));
                }
                catch
                { }
                //if (frontONNsew.ToString() == "E")
                //    lblfronting.Text = "<b>Fronting On: </b>" + "East";
                //else if (frontONNsew.ToString() == "W")
                //    lblfronting.Text = "<b>Fronting On: </b>" + "West";
                //else if (frontONNsew.ToString() == "N")
                //    lblfronting.Text = "<b>Fronting On: </b>" + "North";
                //else if (frontONNsew.ToString() == "S")
                //    lblfronting.Text = "<b>Fronting On: </b>" + "South";
                try
                {
                    //lbltype.Text = Convert.ToString(dt.Rows[0]["TypeOwn1Out"]) + " " + Convert.ToString(dt.Rows[0]["Style"]);
                }
                catch
                {
                    //lbltype.Text = Convert.ToString(dt.Rows[0]["TypeOwn1Out"]);
                }
                lblgarage.Text  = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["GarageType"]));
                lblgarage1.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["GarageType"]));
                try
                {
                    //lblbasement122.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Basement1"]));
                    //lblroom.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Rooms"]));
                    lblbed.Text     = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Bedrooms"]));
                    lblBedroom.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Bedrooms"]));
                    lblbath.Text    = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Washrooms"]));
                    lblbath1.Text   = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Washrooms"]));
                    //lblWashRooms.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Washrooms"]));
                    //lblDirCrossSt.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["DirectionsCrossStreets"]));
                    // lblAreaLabel.Text = "Area";
                    // lblAreaLabel.Text = CheckNullOrEmptyvalue(dt.Rows[0]["areacode"].ToString());
                    //lblAreaValue.Text = CheckNullOrEmptyvalue(dt.Rows[0]["area"].ToString());
                    //lblKitchen.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Kitchens"])) + "+" + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["KitchensPlus"]));
                    //lblfamilyrm.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["FamilyRoom"]));
                    //lblExterior.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Exterior1"]));
                    //  lblsqrfeet.Text = CheckNullOrEmptyvalue(dt.Rows[0]["totalarea"].ToString()) + " " + CheckNullOrEmptyvalue(dt.Rows[0]["totalareacode"].ToString());
                    lblremarks.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Remarksforclients"]));
                }
                catch
                {
                    //lblbasement122.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Basement1"]));
                    //lblAreaLabel.Text = "Office Area";
                    //lblAreaValue.Text = CheckNullOrEmptyvalue(dt.Rows[0]["OfficeAptarea"].ToString()) + " " + CheckNullOrEmptyvalue(dt.Rows[0]["officeaptareacode"].ToString());
                    //lblBedLabel.Text = "Total Area";
                    //lblbed.Text = CheckNullOrEmptyvalue(dt.Rows[0]["totalarea"].ToString()) + " " + CheckNullOrEmptyvalue(dt.Rows[0]["totalareacode"].ToString());
                    //lblBathLabel.Text = "Water";
                    lblbath.Text = CheckNullOrEmptyvalue(dt.Rows[0]["Water"].ToString());
                }

                //   lblMLS1.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["MLS"]));
                //lbltx.Text = dt.Rows[0]["TotalTaxes"].ToString();
                // lblBasement.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Basement1"]));
                // lblGarageType.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["GarageType"]));
                // lblParking.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["ParkingSpaces"]));
            }
            catch (Exception ex)
            { }
        }
        void GetPropertyDetails()
        {
            try
            {
                Property1.MLSDataWebServiceSoapClient mlsClient = new Property1.MLSDataWebServiceSoapClient();

                DataTable dt = new DataTable();
                if (Session["PropertySearchType"].ToString().Contains("Residential") || Session["PropertySearchType"].ToString().Contains("IDXImagesResidential"))
                {
                    dt = mlsClient.GetResidentialProperties(Convert.ToString(Request.QueryString["MLSID"]), "0", "0", "0", "0", "0", "0");
                }
                else if (Session["PropertySearchType"].ToString().Contains("Commercial") || Session["PropertySearchType"].ToString().Contains("IDXImagesCommercial"))
                {
                    dt = mlsClient.GetAllCommercialProperties(Request.QueryString["MLSID"].ToString(), "0", "0", "0", "0", "0");
                }
                else if (Session["PropertySearchType"].ToString().Contains("Condo") || Session["PropertySearchType"].ToString().Contains("IDXImagesCondo"))
                {
                    dt = mlsClient.GetProperties_Condo(Convert.ToString(Request.QueryString["MLSID"]), "0", "0", "0", "0", "0", "0");
                }
                try
                {
                    lblroom.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Rooms"]));
                    lblMLS.Text  = Convert.ToString(dt.Rows[0]["MLS"]);
                    lblbed.Text  = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Bedrooms"]));
                    //lblApxAge1.Text = Convert.ToString(dt.Rows[0]["ApproxAge"]) != "null" && Convert.ToString(dt.Rows[0]["ApproxAge"]) != "" ? Convert.ToString(dt.Rows[0]["ApproxAge"]) : "";
                    //lblSubTypeofhome.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["typeown1out"]));
                    //lblHeat1.Text = Convert.ToString(dt.Rows[0]["HeatType"]) != "null" && Convert.ToString(dt.Rows[0]["HeatType"]) != "" ? Convert.ToString(dt.Rows[0]["HeatType"]) : "";
                    //lblBasement1.Text = Convert.ToString(dt.Rows[0]["Basement1"]) != "null" && Convert.ToString(dt.Rows[0]["Basement1"]) != "" ? Convert.ToString(dt.Rows[0]["Basement1"]) : "";
                    //lblSewers1.Text = Convert.ToString(dt.Rows[0]["Sewers"]) != "null" && Convert.ToString(dt.Rows[0]["Sewers"]) != "" ? Convert.ToString(dt.Rows[0]["Sewers"]) : "";
                    //lblGarageTypes1.Text = Convert.ToString(dt.Rows[0]["GarageType"]) != "null" && Convert.ToString(dt.Rows[0]["GarageType"]) != "" ? Convert.ToString(dt.Rows[0]["GarageType"]) : "";
                    //lblParking1.Text = Convert.ToString(dt.Rows[0]["ParkingSpaces"]) != "null" && Convert.ToString(dt.Rows[0]["ParkingSpaces"]) != "" ? Convert.ToString(dt.Rows[0]["ParkingSpaces"]) : "";
                    //lblKitchen.Text = (Convert.ToString(dt.Rows[0]["Kitchens"]) != "null" && (Convert.ToString(dt.Rows[0]["Kitchens"]) != "") ? (Convert.ToString(dt.Rows[0]["Kitchens"])) : "") + (Convert.ToString(dt.Rows[0]["KitchensPlus"]) != "null" && (Convert.ToString(dt.Rows[0]["KitchensPlus"]) != "") ? ("+" + Convert.ToString(dt.Rows[0]["KitchensPlus"])) : "");
                    //lblfamilyrm.Text = Convert.ToString(dt.Rows[0]["FamilyRoom"]) != "null" && (Convert.ToString(dt.Rows[0]["FamilyRoom"]) != "") ? (Convert.ToString(dt.Rows[0]["FamilyRoom"])) : "";
                    //lblbasement.Text = (Convert.ToString(dt.Rows[0]["Basement1"]) != "null" && (Convert.ToString(dt.Rows[0]["Basement1"]) != "") ? (Convert.ToString(dt.Rows[0]["Basement1"])) : "") + " " + (Convert.ToString(dt.Rows[0]["Basement2"]) != "null" && (Convert.ToString(dt.Rows[0]["Basement2"]) != "") ? (Convert.ToString(dt.Rows[0]["Basement2"])) : "");
                    //lblExterior.Text = Convert.ToString(dt.Rows[0]["Exterior1"]) != "null" && Convert.ToString(dt.Rows[0]["Exterior1"]) != "" ? Convert.ToString(dt.Rows[0]["Exterior1"]) : "";
                    //lblGarageType.Text = (Convert.ToString(dt.Rows[0]["GarageType"]) != "null" && Convert.ToString(dt.Rows[0]["GarageType"]) != "" ? Convert.ToString(dt.Rows[0]["GarageType"]) : "") + (Convert.ToString(dt.Rows[0]["GarageParkSpaces"]) != "" && Convert.ToString(dt.Rows[0]["GarageParkSpaces"]) != "null" ? ("/" + Convert.ToString(dt.Rows[0]["GarageParkSpaces"])) : "");
                    // lblParking.Text = Convert.ToString(dt.Rows[0]["ParkingSpaces"]) != "null" && Convert.ToString(dt.Rows[0]["ParkingSpaces"]) != "" ? Convert.ToString(dt.Rows[0]["ParkingSpaces"]) : "";
                    //lblPool.Text = "<b>Pets Permitted:</b>" + (Convert.ToString(dt.Rows[0]["PetsPermitted"]) != "null" && Convert.ToString(dt.Rows[0]["PetsPermitted"]) != "" ? Convert.ToString(dt.Rows[0]["PetsPermitted"]) : "");
                    //lblWater.Text = Convert.ToString(dt.Rows[0]["WaterIncluded"]) != "null" && Convert.ToString(dt.Rows[0]["WaterIncluded"]) != "" ? Convert.ToString(dt.Rows[0]["WaterIncluded"]) : "";
                    //lblSewers.Text = "<b>Bldg Insur Incl:</b>" + (Convert.ToString(dt.Rows[0]["BuildingInsuranceIncluded"]) != "" && Convert.ToString(dt.Rows[0]["WaterIncluded"]) != "null" ? Convert.ToString(dt.Rows[0]["WaterIncluded"]) : "");
                    //lblSpecificDesignation.Text = Convert.ToString(dt.Rows[0]["SpecialDesignation1"]) != "" && Convert.ToString(dt.Rows[0]["SpecialDesignation1"]) != "null" ? Convert.ToString(dt.Rows[0]["SpecialDesignation1"]) : "";
                    //LblParkingInc.Text = Convert.ToString(dt.Rows[0]["ParkingIncluded"]) != "" && Convert.ToString(dt.Rows[0]["ParkingIncluded"]) != "null" ? Convert.ToString(dt.Rows[0]["ParkingIncluded"]) : "";
                    //lblBalcony.Text = Convert.ToString(dt.Rows[0]["Balcony"]) != "" && Convert.ToString(dt.Rows[0]["Balcony"]) != "null" ? Convert.ToString(dt.Rows[0]["Balcony"]) : "";
                    Session["Address"]             = (CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["address"])) + ", " + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Municipality"])) + " , " + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["PostalCode"])));
                    lblAddressBar1.Text            = (CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["address"])) + ", " + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Municipality"])) + ", " + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["PostalCode"])) + " , " + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["province"])));
                    lblPropertyDescriptionnew.Text = Convert.ToString(dt.Rows[0]["remarksforclients"]);
                }
                catch (Exception ex)
                {
                }
                string extras;
                if (dt.Rows[0]["extras"].ToString().Length > 5)
                {
                    extras = "<b style='float:left; width:80px;'>Extras :</b>" + "<div style='margin:0 0 0 96px;'>" + Convert.ToString(dt.Rows[0]["extras"]) + "</div>";
                }
                else
                {
                    extras = "";
                }

                //lblCommunity.Text = Convert.ToString(dt.Rows[0]["Community"]);

                // lblprovince.Text = CheckNullOrEmptyvalue(dt.Rows[0]["Municipality"].ToString());

                try
                {
                    //  lblStorey.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Style"]));
                }
                catch
                {
                    //lblStorey.Text = "";
                }

                // lblSubTypeofhome.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["typeown1out"]));
                string frontONNsew = "";
                try
                {
                    frontONNsew = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["FrontingOnNSEW"]));
                }
                catch
                { }
                //if (frontONNsew.ToString() == "E")
                //    lblfronting.Text = "<b>Fronting On: </b>" + "East";
                //else if (frontONNsew.ToString() == "W")
                //    lblfronting.Text = "<b>Fronting On: </b>" + "West";
                //else if (frontONNsew.ToString() == "N")
                //    lblfronting.Text = "<b>Fronting On: </b>" + "North";
                //else if (frontONNsew.ToString() == "S")
                //    lblfronting.Text = "<b>Fronting On: </b>" + "South";
                try
                {
                    //lbltype.Text = Convert.ToString(dt.Rows[0]["TypeOwn1Out"]) + " " + Convert.ToString(dt.Rows[0]["Style"]);
                }
                catch
                {
                    //lbltype.Text = Convert.ToString(dt.Rows[0]["TypeOwn1Out"]);
                }
                lblgarage.Text  = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["GarageType"]));
                lblgarage1.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["GarageType"]));
                try
                {
                    lblprice.Text                  = "$" + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["ListPrice"]));
                    lbltax.Text                    = dt.Rows[0]["TotalTaxes"].ToString();
                    lblgarage.Text                 = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["GarageType"]));
                    lblbasement.Text               = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Basement1"]));
                    lblarea.Text                   = CheckNullOrEmptyvalue(dt.Rows[0]["area"].ToString());
                    lblcity.Text                   = CheckNullOrEmptyvalue(dt.Rows[0]["Municipality"].ToString());
                    lblcommunity.Text              = Convert.ToString(dt.Rows[0]["Community"]);
                    lbltype.Text                   = Convert.ToString(dt.Rows[0]["TypeOwn1Out"]) + " " + Convert.ToString(dt.Rows[0]["Style"]);
                    lblbed.Text                    = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Bedrooms"]));
                    lblBedroom.Text                = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Bedrooms"]));
                    lblbath.Text                   = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Washrooms"]));
                    lblbath1.Text                  = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Washrooms"]));
                    Session["Address"]             = (CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["address"])) + ", " + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Municipality"])) + " , " + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["PostalCode"])));
                    lblAddressBar1.Text            = (CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["address"])) + ", " + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Municipality"])) + ", " + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["PostalCode"])) + " , " + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["province"])));
                    lblPropertyDescriptionnew.Text = Convert.ToString(dt.Rows[0]["remarksforclients"]);
                    if (dt.Rows[0]["extras"].ToString().Length > 5)
                    {
                        extras = "<b style='float:left; width:80px;'>Extras :</b>" + "<div style='margin:0 0 0 96px;'>" + Convert.ToString(dt.Rows[0]["extras"]) + "</div>";
                    }
                    else
                    {
                        extras = "";
                    }
                    try
                    {
                        //lblStorey.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Style"]));
                    }
                    catch
                    {
                        lbltype.Text = Convert.ToString(dt.Rows[0]["TypeOwn1Out"]);
                        // lblStorey.Text = "";
                    }

                    try
                    {
                        // lblWater1.Text = Convert.ToString(dt.Rows[0]["water"]) != "null" && Convert.ToString(dt.Rows[0]["water"]) != "" ? Convert.ToString(dt.Rows[0]["water"]) : "";
                        //frontONNsew = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["FrontingOnNSEW"]));
                    }
                    catch
                    { }
                    //if (frontONNsew.ToString() == "E")
                    //    lblfronting.Text = "Fronting On:" + "East";
                    //else if (frontONNsew.ToString() == "W")
                    //    lblfronting.Text = "Fronting On: " + "West";
                    //else if (frontONNsew.ToString() == "N")
                    //    lblfronting.Text = "Fronting On:" + "North";
                    //else if (frontONNsew.ToString() == "S")
                    //    lblfronting.Text = "Fronting On:" + "South";

                    lblgarage.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["GarageType"]));
                    try
                    {
                        lblbed.Text     = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Bedrooms"]));
                        lblBedroom.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Bedrooms"]));
                        lblbath.Text    = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Washrooms"]));
                        //lblWashRooms.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Washrooms"]));
                        //lblDirCrossSt.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["DirectionsCrossStreets"]));

                        //lblKitchen.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Kitchens"])) + "+" + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["KitchensPlus"]));
                        //lblfamilyrm.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["FamilyRoom"]));
                        //lblExterior.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Exterior1"]));
                    }
                    catch
                    {
                        lblbed.Text  = CheckNullOrEmptyvalue(dt.Rows[0]["totalarea"].ToString()) + " " + CheckNullOrEmptyvalue(dt.Rows[0]["totalareacode"].ToString());
                        lblbath.Text = CheckNullOrEmptyvalue(dt.Rows[0]["Water"].ToString());
                    }
                    lblremarks.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Remarksforclients"]));
                }
                catch
                {
                    //lblbasement122.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Basement1"]));
                    //lblAreaLabel.Text = "Office Area";
                    //lblAreaValue.Text = CheckNullOrEmptyvalue(dt.Rows[0]["OfficeAptarea"].ToString()) + " " + CheckNullOrEmptyvalue(dt.Rows[0]["officeaptareacode"].ToString());
                    //lblBedLabel.Text = "Total Area";
                    //lblbed.Text = CheckNullOrEmptyvalue(dt.Rows[0]["totalarea"].ToString()) + " " + CheckNullOrEmptyvalue(dt.Rows[0]["totalareacode"].ToString());
                    //lblBathLabel.Text = "Water";
                    lblbath.Text = CheckNullOrEmptyvalue(dt.Rows[0]["Water"].ToString());
                }

                //  lblMLS1.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["MLS"]));
                //lbltx.Text = dt.Rows[0]["TotalTaxes"].ToString();
                // lblBasement.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Basement1"]));
                // lblGarageType.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["GarageType"]));
                // lblParking.Text = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["ParkingSpaces"]));
                int       NoOfRoom = Convert.ToInt32("0" + lblroom.Text);
                DataTable dtRooms  = new DataTable();
                dtRooms.Columns.Add("Room", typeof(string));
                dtRooms.Columns.Add("Level", typeof(string));
                dtRooms.Columns.Add("RoomDim", typeof(string));
                dtRooms.Columns.Add("RoomDesc", typeof(string));

                for (int i = 0; i < NoOfRoom; i++)
                {
                    int    RowIndex  = i + 1;
                    string vRoom     = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Room" + RowIndex + ""]));
                    string vLevel    = CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Level" + RowIndex + ""])) != "" ? Convert.ToString(dt.Rows[0]["Level" + RowIndex + ""]) : "0";
                    string vRoomDim  = (CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Room" + RowIndex + "Length"])) != "" ? (Convert.ToString(dt.Rows[0]["Room" + RowIndex + "Length"])) : "0") + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Room" + RowIndex + "Width"]) != "" ? ("x" + Convert.ToString(dt.Rows[0]["Room" + RowIndex + "Width"])) : "");// Convert.ToString(dt.Rows[0]["Room1Length"]) + "x" + Convert.ToString(dt.Rows[0]["Room1Width"]);
                    string vRoomDesc = (CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Room" + RowIndex + "Desc1"])) != "" ? (Convert.ToString(dt.Rows[0]["Room" + RowIndex + "Desc1"])) : "----") + CheckNullOrEmptyvalue(Convert.ToString(dt.Rows[0]["Room" + RowIndex + "Desc2"]) != "" ? ("," + Convert.ToString(dt.Rows[0]["Room" + RowIndex + "Desc2"])) : "");

                    DataRow dr = dtRooms.NewRow();
                    dr["Room"]     = vRoom;
                    dr["Level"]    = vLevel;
                    dr["RoomDim"]  = vRoomDim;
                    dr["RoomDesc"] = vRoomDesc;
                    dtRooms.Rows.Add(dr);
                    LVroom.DataSource = dtRooms;
                    LVroom.DataBind();
                }
            }

            catch (Exception ex)
            { }
        }