Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //Hide Our Team unless the "showTeam=1" parameter provided in queryString
        if (Request.QueryString["showTeam"] == "1")
        {
            pnlOurTeam.Visible = true;
        }
        else
        {
            return;
        }

        try
        {
            if (!IsPostBack)
            {
                Agency = REIQ.Access.Agency.GetFromAgencyId(this.AgencyId);

                //Our team init
                if (Agency != null)
                {
                    rptAgent.DataSource = REIQ.Access.Agency.GetOfficeAgentsImisProfile(this.AgencyId);
                    rptAgent.DataBind();
                }
            }
        }
        catch (Exception ex)
        {
            AutoMail.sendErrorMail(ex);
        }
    }
Exemplo n.º 2
0
    protected override void OnLoad(EventArgs e)
    {
        Agent  = REIQ.Access.Agent.GetFromPropertyId(this.PropertyId);
        Agency = REIQ.Access.Agency.GetFromPropertyId(this.PropertyId);


        base.OnLoad(e);
    }
Exemplo n.º 3
0
    protected void rptProperties_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        {
            REIQ.Entities.Property property = (REIQ.Entities.Property)e.Item.DataItem;

            Literal litAgencyImage = e.Item.FindControl("litAgencyImage") as Literal;

            if (property.acID > 0)
            {
                REIQ.Entities.Agency agency = REIQ.Access.Agency.GetFromPropertyId(property.pID);
                litAgencyImage.Text = "<a href='/" + REIQ.Helpers.PropertyHelper.GenerateURLAgency(agency.name.ToString(), property.suburb.ToString(), property.acID) + "'><img src=" + Images.GetAgencyImage(property.acID, 196, 88) + " class='agent-logo'/></a>";
            }
        }
    }
Exemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         Agency = REIQ.Access.Agency.GetFromAgencyId(this.AgencyId);
         if (Agency != null)
         {
             AgencyAddress = AgencyHelper.GetAgencyAddress(Agency);
         }
     }
     catch (Exception ex)
     {
         AutoMail.sendErrorMail(ex);
     }
 }
Exemplo n.º 5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         Agency = REIQ.Access.Agency.GetFromAgencyId(this.AgencyId);
         //Gmap  initialise
         if (Agency != null)
         {
             ClientScriptManager cs = Page.ClientScript;
             cs.RegisterStartupScript(GetType(), "onLoadCall", "<Script>load('" + AgencyHelper.GetAgencyAddress(Agency) + "')</Script>", false);
         }
     }
     catch (Exception ex)
     {
         AutoMail.sendErrorMail(ex);
     }
 }
Exemplo n.º 6
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         Agent = REIQ.Access.Agent.GetFromAgentId(this.AgentId);
         if (Agent != null)
         {
             if (Agent.acID != null)
             {
                 Agency = REIQ.Access.Agency.GetFromAgencyId((int)Agent.acID);
             }
         }
     }
     catch (Exception ex)
     {
         AutoMail.sendErrorMail(ex);
     }
 }
Exemplo n.º 7
0
    protected void rptProperties_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        {
            REIQ.Entities.Property property = (REIQ.Entities.Property)e.Item.DataItem;

            //Label lblPrice = e.Item.FindControl("lblPrice") as Label;
            Literal litAgencyImage = e.Item.FindControl("litAgencyImage") as Literal;

            if (property.acID > 0)
            {
                REIQ.Entities.Agency agency = REIQ.Access.Agency.GetFromPropertyId(property.pID);
                litAgencyImage.Text = "<a href='/" + REIQ.Helpers.PropertyHelper.GenerateURLAgency(agency.name.ToString(), property.suburb.ToString(), property.acID) + "'><img src=" + Images.GetAgencyImage(property.acID, 196, 88) + " class='agent-logo'/></a>";
            }

            REIQ.Entities.Agent agent = REIQ.Access.Agent.GetFromPropertyId(property.pID);

            if (agent != null)
            {
                Literal litAgentName  = e.Item.FindControl("litAgentName") as Literal;
                Literal litAgentPhone = e.Item.FindControl("litAgentPhone") as Literal;
                litAgentName.Text  = "<span class='agent-name'>" + (agent.firstname + " " + agent.surname).ToUpper() + "</span><br />";
                litAgentPhone.Text = "<span class='agent-pg' nowrap>" + AgentHelper.GetAgentPhoneWithLog(agent) + "</span>";//"<span class='agent-pg' nowrap>" + agent.phone + "</span>";
            }

            //Showing New span
            Literal ltlNew = e.Item.FindControl("ltlNew") as Literal;
            if (REIQ.Helpers.PropertyHelper.isNewlyAdded(property.dateListed))
            {
                ltlNew.Text = "<span class='new-label'></span>";
            }

            //Banner ads management, showing banner after each 5th property
            if (e.Item.ItemIndex > 0 && (e.Item.ItemIndex + 1) % 5 == 0)
            {
                Literal ltlBannerAd = e.Item.FindControl("ltlBannerAd") as Literal;
                ltlBannerAd.Text = GetRandomBannerAdFromList(e.Item.ItemIndex + 1);
            }
        }
    }
Exemplo n.º 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            Agency = REIQ.Access.Agency.GetFromAgencyId(this.AgencyId);

            if (Agency != null)
            {
                if (Agency.email != null && !String.IsNullOrEmpty(Agency.email))
                {
                    ToEmail = DataUtility.Encrypt(Agency.email);
                }
                if (Agency.name != null && !String.IsNullOrEmpty(Agency.name))
                {
                    AgencyName = Agency.name;
                }

                CurrentPage = Node.GetCurrent();

                if (CurrentPage.GetProperty("relatedThankYouPage") != null && !String.IsNullOrEmpty(CurrentPage.GetProperty("relatedThankYouPage").Value))
                {
                    Int32 relatedThankYouPageID = Convert.ToInt32(CurrentPage.GetProperty("relatedThankYouPage").Value);
                    if (relatedThankYouPageID > 0)
                    {
                        Node relatedThankYouPageNode = new Node(relatedThankYouPageID);
                        if (relatedThankYouPageNode != null)
                        {
                            RelatedThankYouPage = relatedThankYouPageNode.Url;
                        }
                    }
                }
            }
        }
        catch (Exception ex)
        {
            AutoMail.sendErrorMail(ex);
        }
    }
Exemplo n.º 9
0
    protected void rptProperties_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
        {
            REIQ.Entities.Property property = (REIQ.Entities.Property)e.Item.DataItem;

            //Label lblPrice = e.Item.FindControl("lblPrice") as Label;
            Literal litAgencyImage = e.Item.FindControl("litAgencyImage") as Literal;

            //if (property.pricetext == "0$" || String.IsNullOrEmpty(property.pricetext))
            //    lblPrice.Text = "N/A";
            //else lblPrice.Text = HttpUtility.HtmlDecode(property.pricetext).ToUpper();

            if (property.acID > 0)
            {
                REIQ.Entities.Agency agency = REIQ.Access.Agency.GetFromPropertyId(property.pID);
                litAgencyImage.Text = "<a href='/" + REIQ.Helpers.PropertyHelper.GenerateURLAgency(agency.name.ToString(), property.suburb.ToString(), property.acID) + "'><img src=" + Images.GetAgencyImage(property.acID, 150, 50) + " class='agent-logo'/></a>";
            }
            REIQ.Entities.Agent agent = REIQ.Access.Agent.GetFromPropertyId(property.pID);

            if (agent != null)
            {
                Literal litAgentName  = e.Item.FindControl("litAgentName") as Literal;
                Literal litAgentPhone = e.Item.FindControl("litAgentPhone") as Literal;
                litAgentName.Text  = "<span class='agent-name'>" + (agent.firstname + " " + agent.surname).ToUpper() + "</span><br />";
                litAgentPhone.Text = "<span class='agent-pg'>" + AgentHelper.GetAgentPhoneWithLog(agent) + "</span>";//"<span class='agent-pg'>" + agent.phone + "</span>";
            }

            //Showing New span
            Literal ltlNew = e.Item.FindControl("ltlNew") as Literal;
            if (REIQ.Helpers.PropertyHelper.isNewlyAdded(property.dateListed))
            {
                ltlNew.Text = "<span class='new-label'></span>";
            }
        }
    }