Exemplo n.º 1
0
        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"]));
                    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)
            { }
        }
Exemplo n.º 2
0
        void GetCondoImages()
        {
            Property1.MLSDataWebServiceSoapClient mlsClient = new Property1.MLSDataWebServiceSoapClient();
            DataTable dt = mlsClient.GetPropertiesByMLSID_Condo(Convert.ToString(Request.QueryString["MLSID"]));

            if (dt.Rows.Count > 0)
            {
                string var = Convert.ToString(dt.Rows[0]["MLSImage"]);
                if (var != "")
                {
                    img1.ImageUrl = Convert.ToString(dt.Rows[0]["MLSImage"]);
                    img2.ImageUrl = Convert.ToString(dt.Rows[0]["MLSImage"]);
                }
                else
                {
                    img1.ImageUrl = "images\no-image.gif";
                    img2.ImageUrl = "images\no-image.gif";
                }
                string var1 = Convert.ToString(dt.Rows[1]["MLSImage"]);
                if (var1 != "")
                {
                    Image1.ImageUrl = Convert.ToString(dt.Rows[1]["MLSImage"]);
                }
                else
                {
                    Image1.ImageUrl = "images\no-image.gif";
                }
                string var2 = Convert.ToString(dt.Rows[2]["MLSImage"]);
                if (var2 != "")
                {
                    Image2.ImageUrl = Convert.ToString(dt.Rows[2]["MLSImage"]);
                }
                else
                {
                    Image2.ImageUrl = "images\no-image.gif";
                }

                string var3 = Convert.ToString(dt.Rows[3]["MLSImage"]);
                if (var3 != "")
                {
                    Image3.ImageUrl = Convert.ToString(dt.Rows[3]["MLSImage"]);
                }
                else
                {
                    Image3.ImageUrl = "images\no-image.gif";
                }
                string var4 = Convert.ToString(dt.Rows[4]["MLSImage"]);
                if (var4 != "")
                {
                    Image4.ImageUrl = Convert.ToString(dt.Rows[4]["MLSImage"]);
                }
                else
                {
                    Image4.ImageUrl = "images\no-image.gif";
                }
                string var5 = Convert.ToString(dt.Rows[5]["MLSImage"]);
                if (var5 != "")
                {
                    Image5.ImageUrl = Convert.ToString(dt.Rows[5]["MLSImage"]);
                }
                else
                {
                    Image5.ImageUrl = "images\no-image.gif";
                }
            }
            else
            {
            }

            mlsClient = null;
        }
        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;'>Paresh Desai 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;'>647-832-2369</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://pareshdesai.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("470 Chrysler Dr # 20, Brampton, L6S0C1<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://pareshdesai.ca//</a> </p></div>");
                html.AppendLine("<div style='float:left; padding-left:12px;'>");
                html.AppendLine("<p style='margin:0px;'>Listed By</p><br/><p>Paresh Desai<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;'>647-832-2369</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://pareshdesai.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.º 4
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 = "Ravi S Bakshi : '" + 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;'>Ravi S Bakshi 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>Ravi S Bakshi<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);
            }
        }
Exemplo n.º 5
0
        void SearchCondoProperties()
        {
            //  Session["QueryString112"] = "Condo";
            try
            {
                Property1.MLSDataWebServiceSoapClient mlsClient = new Property1.MLSDataWebServiceSoapClient();

                DataTable dt = new DataTable();
                // if (Convert.ToString(Session["QueryString112"]) == "Condo")
                dt = mlsClient.GetProperties_CondoTop3("0", "0", "0", "0", "0", "0", "0", "0");
                // else
                // dt = mlsClient.GetProperties_CondoTop3(Session["SearchText"].ToString(), Session["HomeType"].ToString(), Session["MinPrice"].ToString(), Session["MaxPrice"].ToString(), Session["Beds"].ToString(), Session["Baths"].ToString(), Session["SaleLease"].ToString(), "0");
                if (dt.Rows.Count > 0)
                {
                    string s = dt.Rows[0]["RemarksForClients"].ToString();
                    if (s.Length > 100)
                    {
                        condoRemarksForClients1.Text = GetText(s);
                    }
                    //imgcondo.ImageUrl = dt.Rows[2]["pImage"].ToString();
                    imgcondo1.ImageUrl = dt.Rows[0]["pImage"].ToString();
                    condoaddress1.Text = dt.Rows[0]["Address"].ToString() + ", " + dt.Rows[0]["Municipality"].ToString() + ", " + dt.Rows[0]["PostalCode"].ToString();
                    condomls1.Text     = dt.Rows[0]["mls"].ToString();
                    condostatus1.Text  = dt.Rows[0]["SaleLease"].ToString();
                    condotype1.Text    = dt.Rows[0]["TypeOwn1Out"].ToString();
                    condoprice1.Text   = dt.Rows[0]["ListPrice"].ToString();
                    // btnConview1.NavigateUrl = "../PropertyDetails.aspx?MLSID=" + dt.Rows[0]["MLS"].ToString() + "&PropertyType=" + dt.Rows[0]["pType"].ToString();
                    btnConview1.NavigateUrl = "../Search.aspx?Municipality=Toronto";
                    hlcon1.NavigateUrl      = btnConview1.NavigateUrl;
                    string s1 = dt.Rows[1]["RemarksForClients"].ToString();
                    if (s1.Length > 100)
                    {
                        condoRemarksForClients2.Text = GetText(s1);
                    }
                    imgcondo2.ImageUrl      = dt.Rows[1]["pImage"].ToString();
                    condoaddress2.Text      = dt.Rows[1]["Address"].ToString() + ", " + dt.Rows[1]["Municipality"].ToString() + ", " + dt.Rows[1]["PostalCode"].ToString();
                    condomls2.Text          = dt.Rows[1]["mls"].ToString();
                    condostatus2.Text       = dt.Rows[1]["SaleLease"].ToString();
                    condotype2.Text         = dt.Rows[1]["TypeOwn1Out"].ToString();
                    condoprice2.Text        = dt.Rows[1]["ListPrice"].ToString();
                    btnConview2.NavigateUrl = "../Search.aspx?Municipality=Mississauga";
                    // btnConview2.NavigateUrl = "../PropertyDetails.aspx?MLSID=" + dt.Rows[1]["MLS"].ToString() + "&PropertyType=" + dt.Rows[1]["pType"].ToString();
                    hlcon2.NavigateUrl = btnConview2.NavigateUrl;

                    string s2 = dt.Rows[2]["RemarksForClients"].ToString();
                    if (s2.Length > 100)
                    {
                        condoRemarksForClients3.Text = GetText(s2);
                    }
                    imgcondo3.ImageUrl      = dt.Rows[2]["pImage"].ToString();
                    condoaddress3.Text      = dt.Rows[2]["Address"].ToString() + ", " + dt.Rows[1]["Municipality"].ToString() + ", " + dt.Rows[1]["PostalCode"].ToString();
                    condomls3.Text          = dt.Rows[2]["mls"].ToString();
                    condostatus3.Text       = dt.Rows[2]["SaleLease"].ToString();
                    condotype3.Text         = dt.Rows[2]["TypeOwn1Out"].ToString();
                    condoprice3.Text        = dt.Rows[2]["ListPrice"].ToString();
                    hlcon3.NavigateUrl      = btnConview3.NavigateUrl;
                    btnConview3.NavigateUrl = "../Search.aspx?Municipality=Brampton";
                    // btnConview3.NavigateUrl = "../PropertyDetails.aspx?MLSID=" + dt.Rows[2]["MLS"].ToString() + "&PropertyType=" + dt.Rows[2]["pType"].ToString();
                    hlcon3.NavigateUrl = btnConview3.NavigateUrl;

                    string s3 = dt.Rows[3]["RemarksForClients"].ToString();
                    if (s3.Length > 100)
                    {
                        condoRemarksForClients4.Text = GetText(s3);
                    }
                    imgcondo4.ImageUrl      = dt.Rows[3]["pImage"].ToString();
                    condoaddress4.Text      = dt.Rows[3]["Address"].ToString() + ", " + dt.Rows[3]["Municipality"].ToString() + ", " + dt.Rows[3]["PostalCode"].ToString();
                    condomls4.Text          = dt.Rows[3]["mls"].ToString();
                    condostatus4.Text       = dt.Rows[3]["SaleLease"].ToString();
                    condotype4.Text         = dt.Rows[3]["TypeOwn1Out"].ToString();
                    condoprice4.Text        = dt.Rows[3]["ListPrice"].ToString();
                    hlcon4.NavigateUrl      = btnConview3.NavigateUrl;
                    btnConview4.NavigateUrl = "../Search.aspx?Municipality=Markham";
                    //  btnConview4.NavigateUrl = "../PropertyDetails.aspx?MLSID=" + dt.Rows[3]["MLS"].ToString() + "&PropertyType=" + dt.Rows[3]["pType"].ToString();
                    hlcon4.NavigateUrl = btnConview3.NavigateUrl;
                }
                else
                {
                    //pagesLink.Visible = false;
                    //resultSearch.Visible = true;
                    //resultSearch.Text = "Property is not available ";
                }
            }
            catch (Exception ex)
            {
            }
            finally
            {
            }
        }
Exemplo n.º 6
0
        void SearchResidentialProperties()
        {
            //Session["QueryString112"] = "Residential";
            try
            {
                Property1.MLSDataWebServiceSoapClient mlsClient = new Property1.MLSDataWebServiceSoapClient();
                DataTable dt = new DataTable();
                //if (Convert.ToString(Session["QueryString112"]) == "Residential" || Convert.ToString(Session["QueryString"]) == "IDXImagesResidential")


                dt = mlsClient.GetResidentialPropertiesTop3("0", "0", "0", "0", "0", "0", "0");
                //else
                //dt = mlsClient.GetResidentialPropertiesTop3 (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)
                {
                    //imgresi.ImageUrl = dt.Rows[2]["pImage"].ToString();
                    imgresi1.ImageUrl = dt.Rows[0]["pImage"].ToString();

                    string s = dt.Rows[0]["RemarksForClients"].ToString();
                    if (s.Length > 100)
                    {
                        //txtDescription = txtDescription.Substring(0, txtDescription.IndexOf(",", 100)).Trim();

                        resiRemarksForClients1.Text = GetText(s);
                    }
                    lbladdressresi1.Text = dt.Rows[0]["Address"].ToString() + ", " + dt.Rows[0]["Municipality"].ToString() + ", " + dt.Rows[0]["PostalCode"].ToString();

                    lblresimls1.Text        = dt.Rows[0]["mls"].ToString();
                    lblresistatus1.Text     = dt.Rows[0]["SaleLease"].ToString();
                    lblresitype1.Text       = dt.Rows[0]["TypeOwn1Out"].ToString();
                    lblresiprice1.Text      = dt.Rows[0]["ListPrice"].ToString();
                    btnResview1.NavigateUrl = "../Search.aspx?Municipality=Toronto";
                    btnResview1.NavigateUrl = "../PropertyDetails.aspx?MLSID=" + dt.Rows[0]["MLS"].ToString() + "&PropertyType=" + dt.Rows[0]["pType"].ToString();
                    hlresi1.NavigateUrl     = btnResview1.NavigateUrl;
                    string s1 = dt.Rows[1]["RemarksForClients"].ToString();
                    if (s1.Length > 100)
                    {
                        resiRemarksForClients2.Text = GetText(s1);
                    }
                    imgresi2.ImageUrl       = dt.Rows[1]["pImage"].ToString();
                    lbladdressresi2.Text    = dt.Rows[1]["Address"].ToString() + ", " + dt.Rows[1]["Municipality"].ToString() + ", " + dt.Rows[1]["PostalCode"].ToString();
                    lblresimls2.Text        = dt.Rows[1]["mls"].ToString();
                    lblresistatus2.Text     = dt.Rows[1]["SaleLease"].ToString();
                    lblresitype2.Text       = dt.Rows[1]["TypeOwn1Out"].ToString();
                    lblresiprice2.Text      = dt.Rows[1]["ListPrice"].ToString();
                    btnResview2.NavigateUrl = "../Search.aspx?Municipality=Mississauga";
                    // btnResview2.NavigateUrl = "../PropertyDetails.aspx?MLSID=" + dt.Rows[1]["MLS"].ToString() + "&PropertyType=" + dt.Rows[1]["pType"].ToString();
                    hlresi2.NavigateUrl = btnResview2.NavigateUrl;
                    string s2 = dt.Rows[2]["RemarksForClients"].ToString();
                    if (s2.Length > 100)
                    {
                        resiRemarksForClients3.Text = GetText(s2);
                    }
                    imgresi3.ImageUrl       = dt.Rows[2]["pImage"].ToString();
                    lbladdressresi3.Text    = dt.Rows[2]["Address"].ToString() + ", " + dt.Rows[2]["Municipality"].ToString() + ", " + dt.Rows[2]["PostalCode"].ToString();
                    lblresimls3.Text        = dt.Rows[2]["mls"].ToString();
                    lblresistatus3.Text     = dt.Rows[2]["SaleLease"].ToString();
                    lblresitype3.Text       = dt.Rows[2]["TypeOwn1Out"].ToString();
                    lblresiprice3.Text      = dt.Rows[2]["ListPrice"].ToString();
                    btnResview3.NavigateUrl = "../Search.aspx?Municipality=Brampton";
                    // btnResview3.NavigateUrl = "../PropertyDetails.aspx?MLSID=" + dt.Rows[2]["MLS"].ToString() + "&PropertyType=" + dt.Rows[2]["pType"].ToString();
                    hlresi3.NavigateUrl = btnResview3.NavigateUrl;

                    string s3 = dt.Rows[3]["RemarksForClients"].ToString();
                    if (s3.Length > 100)
                    {
                        resiRemarksForClients4.Text = GetText(s3);
                    }
                    imgresi4.ImageUrl       = dt.Rows[3]["pImage"].ToString();
                    lbladdressresi4.Text    = dt.Rows[3]["Address"].ToString() + ", " + dt.Rows[3]["Municipality"].ToString() + ", " + dt.Rows[3]["PostalCode"].ToString();;
                    lblresimls4.Text        = dt.Rows[3]["mls"].ToString();
                    lblresistatus4.Text     = dt.Rows[3]["SaleLease"].ToString();
                    lblresitype4.Text       = dt.Rows[3]["TypeOwn1Out"].ToString();
                    lblresiprice4.Text      = dt.Rows[3]["ListPrice"].ToString();
                    btnResview4.NavigateUrl = "../Search.aspx?Municipality=Markham";
                    // btnResview4.NavigateUrl = "../PropertyDetails.aspx?MLSID=" + dt.Rows[3]["MLS"].ToString() + "&PropertyType=" + dt.Rows[3]["pType"].ToString();
                    hlresi4.NavigateUrl = btnResview3.NavigateUrl;
                    //DataList1.DataSource = dt;
                    //DataList1.DataBind();
                }
                else
                {
                    //resultSearch.Visible = true;
                    //pagesLink.Visible = false;
                    //resultSearch.Text = "Property is not available ";
                }
            }
            catch (Exception ex)
            {
            }
            finally
            {
            }
        }