Ejemplo n.º 1
0
 void SearchCommercialProperties()
 {
     try
     {
         Session["QueryString"] = "Commercial";
         Property1.MLSDataWebServiceSoapClient mlsClient = new Property1.MLSDataWebServiceSoapClient();
         DataTable dt = new DataTable();
         if (Convert.ToString(Session["QueryString"]) == "Commercial")
         {
             dt = mlsClient.GetAllCommercialPropertiesTop3("0", "0", "0", "0", "0", "0");
         }
         else
         {
             dt = mlsClient.GetAllCommercialPropertiesTop3(Session["SearchText"].ToString(), Session["HomeType"].ToString(), Session["MinPrice"].ToString(), Session["MaxPrice"].ToString(), Session["Baths"].ToString(), Session["SaleLease"].ToString());
         }
         if (dt.Rows.Count > 0)
         {
             string s = dt.Rows[0]["RemarksForClients"].ToString();
             if (s.Length > 100)
             {
             }
             imgcomm1.ImageUrl  = dt.Rows[0]["pImage"].ToString();
             hlcom1.NavigateUrl = "../Search.aspx?Municipality=" + "Toronto&PropertyType=Commercial";
             string s1 = dt.Rows[1]["RemarksForClients"].ToString();
             if (s1.Length > 100)
             {
             }
             imgcomm2.ImageUrl  = dt.Rows[1]["pImage"].ToString();
             hlcom2.NavigateUrl = "../Search.aspx?Municipality=" + "Mississauga&PropertyType=Commercial";
             string s2 = dt.Rows[2]["RemarksForClients"].ToString();
             if (s2.Length > 100)
             {
             }
             imgcomm3.ImageUrl  = dt.Rows[2]["pImage"].ToString();
             hlcom3.NavigateUrl = "../Search.aspx?Municipality=" + "Brampton&PropertyType=Commercial";
             string s3 = dt.Rows[3]["RemarksForClients"].ToString();
             if (s3.Length > 100)
             {
             }
             imgcomm4.ImageUrl  = dt.Rows[3]["pImage"].ToString();
             hlcom4.NavigateUrl = "../Search.aspx?Municipality=" + "Markham&PropertyType=Commercial";
             string s4 = dt.Rows[4]["RemarksForClients"].ToString();
             if (s4.Length > 100)
             {
             }
         }
         else
         {
         }
     }
     catch (Exception ex)
     {
     }
     finally
     {
     }
 }
Ejemplo n.º 2
0
        void SearchCommercialProperties()
        {
            //Session["QueryString112"] = "Commercial";
            try
            {
                Property1.MLSDataWebServiceSoapClient mlsClient = new Property1.MLSDataWebServiceSoapClient();

                DataTable dt = new DataTable();
                // if (Convert.ToString(Session["QueryString112"]) == "Commercial")
                dt = mlsClient.GetAllCommercialPropertiesTop3("0", "0", "0", "0", "0", "0");
                // else
                // dt = mlsClient.GetAllCommercialPropertiesTop3(Session["SearchText"].ToString(), Session["HomeType"].ToString(), Session["MinPrice"].ToString(), Session["MaxPrice"].ToString(), Session["Baths"].ToString(), Session["SaleLease"].ToString());
                if (dt.Rows.Count > 0)
                {
                    string s = dt.Rows[0]["RemarksForClients"].ToString();
                    if (s.Length > 100)
                    {
                        commRemarksForClients1.Text = GetText(s);
                    }
                    //imgcomm.ImageUrl = dt.Rows[2]["pImage"].ToString();

                    imgcomm1.ImageUrl       = dt.Rows[0]["pImage"].ToString();
                    commaddress1.Text       = dt.Rows[0]["Address"].ToString() + ", " + dt.Rows[0]["Municipality"].ToString() + ", " + dt.Rows[0]["PostalCode"].ToString();
                    commmls1.Text           = dt.Rows[0]["mls"].ToString();
                    commstatus1.Text        = dt.Rows[0]["SaleLease"].ToString();
                    commtype1.Text          = dt.Rows[0]["TypeOwn1Out"].ToString();
                    commprice1.Text         = dt.Rows[0]["ListPrice"].ToString();
                    btnComview1.NavigateUrl = "../Search.aspx?Municipality=Toronto";
                    //btnComview1.NavigateUrl = "../PropertyDetails.aspx?MLSID=" + dt.Rows[0]["MLS"].ToString() + "&PropertyType=" + dt.Rows[0]["pType"].ToString();
                    hlcom1.NavigateUrl = btnComview1.NavigateUrl;
                    string s1 = dt.Rows[1]["RemarksForClients"].ToString();
                    if (s1.Length > 100)
                    {
                        commRemarksForClients2.Text = GetText(s1);
                    }
                    imgcomm2.ImageUrl = dt.Rows[1]["pImage"].ToString();

                    commaddress2.Text       = dt.Rows[1]["Address"].ToString() + ", " + dt.Rows[1]["Municipality"].ToString() + ", " + dt.Rows[1]["PostalCode"].ToString();
                    commmls2.Text           = dt.Rows[1]["mls"].ToString();
                    commstatus2.Text        = dt.Rows[1]["SaleLease"].ToString();
                    commtype2.Text          = dt.Rows[1]["TypeOwn1Out"].ToString();
                    commprice2.Text         = dt.Rows[1]["ListPrice"].ToString();
                    btnComview2.NavigateUrl = "../Search.aspx?Municipality=Mississauga";
                    //btnComview2.NavigateUrl = "../PropertyDetails.aspx?MLSID=" + dt.Rows[1]["MLS"].ToString() + "&PropertyType=" + dt.Rows[1]["pType"].ToString();
                    hlcom2.NavigateUrl = btnComview2.NavigateUrl;
                    string s2 = dt.Rows[2]["RemarksForClients"].ToString();
                    if (s2.Length > 100)
                    {
                        commRemarksForClients3.Text = GetText(s2);
                    }
                    imgcomm3.ImageUrl       = dt.Rows[2]["pImage"].ToString();
                    commaddress3.Text       = dt.Rows[2]["Address"].ToString() + ", " + dt.Rows[2]["Municipality"].ToString() + ", " + dt.Rows[2]["PostalCode"].ToString();
                    commmls3.Text           = dt.Rows[2]["mls"].ToString();
                    commstatus3.Text        = dt.Rows[2]["SaleLease"].ToString();
                    commtype3.Text          = dt.Rows[2]["TypeOwn1Out"].ToString();
                    commprice3.Text         = dt.Rows[2]["ListPrice"].ToString();
                    btnComview3.NavigateUrl = "../Search.aspx?Municipality=Brampton";
                    // btnComview3.NavigateUrl = "../PropertyDetails.aspx?MLSID=" + dt.Rows[2]["MLS"].ToString() + "&PropertyType=" + dt.Rows[2]["pType"].ToString();
                    hlcom3.NavigateUrl = btnComview3.NavigateUrl;

                    string s3 = dt.Rows[3]["RemarksForClients"].ToString();
                    if (s3.Length > 100)
                    {
                        commRemarksForClients4.Text = GetText(s3);
                    }
                    imgcomm4.ImageUrl       = dt.Rows[3]["pImage"].ToString();
                    commaddress4.Text       = dt.Rows[3]["Address"].ToString() + ", " + dt.Rows[3]["Municipality"].ToString() + ", " + dt.Rows[3]["PostalCode"].ToString();
                    commmls4.Text           = dt.Rows[3]["mls"].ToString();
                    commstatus4.Text        = dt.Rows[3]["SaleLease"].ToString();
                    commtype4.Text          = dt.Rows[3]["TypeOwn1Out"].ToString();
                    commprice4.Text         = dt.Rows[3]["ListPrice"].ToString();
                    btnComview4.NavigateUrl = "../Search.aspx?Municipality=Markham";
                    // btnComview4.NavigateUrl = "../PropertyDetails.aspx?MLSID=" + dt.Rows[3]["MLS"].ToString() + "&PropertyType=" + dt.Rows[3]["pType"].ToString();
                    hlcom4.NavigateUrl = btnComview3.NavigateUrl;
                }
                else
                {
                    //resultSearch.Visible = true;
                    //pagesLink.Visible = false;
                    //resultSearch.Text = "Property is not available ";
                }
            }
            catch (Exception ex)
            {
            }
            finally
            {
            }
        }