Exemplo n.º 1
0
 void SearchCondoProperties()
 {
     try
     {
         Session["QueryString"] = "Condo";
         Property1.MLSDataWebServiceSoapClient mlsClient = new Property1.MLSDataWebServiceSoapClient();
         DataTable dt = new DataTable();
         if (Convert.ToString(Session["QueryString"]) == "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)
             {
             }
             imgcondo1.ImageUrl = dt.Rows[0]["pImage"].ToString();
             hlcon1.NavigateUrl = "../Search.aspx?Municipality=" + "Toronto&PropertyType=Condo";
             string s1 = dt.Rows[1]["RemarksForClients"].ToString();
             if (s1.Length > 100)
             {
             }
             imgcondo2.ImageUrl = dt.Rows[1]["pImage"].ToString();
             hlcon2.NavigateUrl = "../Search.aspx?Municipality=" + "Mississauga&PropertyType=Condo";
             string s2 = dt.Rows[2]["RemarksForClients"].ToString();
             if (s2.Length > 100)
             {
             }
             imgcondo3.ImageUrl = dt.Rows[2]["pImage"].ToString();
             hlcon3.NavigateUrl = "../Search.aspx?Municipality=" + "Brampton&PropertyType=Condo";
             string s3 = dt.Rows[3]["RemarksForClients"].ToString();
             if (s3.Length > 100)
             {
             }
             imgcondo4.ImageUrl = dt.Rows[3]["pImage"].ToString();
             hlcon4.NavigateUrl = "../Search.aspx?Municipality=" + "Markham&PropertyType=Condo";
             string s4 = dt.Rows[4]["RemarksForClients"].ToString();
             if (s3.Length > 100)
             {
             }
         }
         else
         {
         }
     }
     catch (Exception ex)
     {
     }
     finally
     {
     }
 }
Exemplo n.º 2
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
            {
            }
        }