Beispiel #1
0
        /// <summary>
        /// Handles the DataBound event of the lAddress control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="RowEventArgs"/> instance containing the event data.</param>
        protected void lAddress_DataBound(object sender, RowEventArgs e)
        {
            Literal            lAddress           = e.Row.FindControl("lAddress") as Literal;
            BusinessSelectInfo businessSelectInfo = e.Row.DataItem as BusinessSelectInfo;

            if (lAddress != null && businessSelectInfo != null && businessSelectInfo.Address != null)
            {
                lAddress.Text = businessSelectInfo.Address.FormattedHtmlAddress;
            }
        }
Beispiel #2
0
        /// <summary>
        /// Handles the DataBound event of the lContacts control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="RowEventArgs"/> instance containing the event data.</param>
        protected void lContacts_DataBound(object sender, RowEventArgs e)
        {
            Literal            lContacts          = e.Row.FindControl("lContacts") as Literal;
            BusinessSelectInfo businessSelectInfo = e.Row.DataItem as BusinessSelectInfo;

            if (lContacts != null && businessSelectInfo != null)
            {
                lContacts.Text = businessSelectInfo.Contacts.ToList().AsDelimited("<br />");
            }
        }
Beispiel #3
0
        /// <summary>
        /// Handles the DataBound event of the lContactInformation control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="RowEventArgs"/> instance containing the event data.</param>
        protected void lContactInformation_DataBound(object sender, RowEventArgs e)
        {
            Literal            lContactInformation = e.Row.FindControl("lContactInformation") as Literal;
            BusinessSelectInfo businessSelectInfo  = e.Row.DataItem as BusinessSelectInfo;

            if (lContactInformation != null && businessSelectInfo != null)
            {
                lContactInformation.Text = FormatContactInfo(businessSelectInfo.PhoneNumber, businessSelectInfo.Email);
            }
        }