Created
April 10, 2013 08:59
-
-
Save alexszilagyi/5353036 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.UI; | |
using System.Web.UI.WebControls; | |
using Sitefinity.Controls.Selectors; | |
using Telerik.Sitefinity.Web.UI.ControlDesign; | |
using SitefinityWebApp.Widgets.CI.Designer; | |
namespace SitefinityWebApp.Widgets.CI | |
{ | |
[ControlDesigner(typeof(CIDesigner))] | |
public partial class CIWidget : System.Web.UI.UserControl | |
{ | |
#region designer properties | |
public string CompanyName { get; set; } | |
public string StreetAndNumber { get; set; } | |
public string PostOffice { get; set; } | |
public string PostCodeAndCity { get; set; } | |
public string TelephoneNumber { get; set; } | |
public string FaxNumber { get; set;} | |
public string Email { get; set; } | |
public string gMapsPictureID { get; set; } | |
public string gMapsRetinaPictureID { get; set; } | |
#endregion | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
litCompanyName.Text = this.CompanyName; | |
litStreetAndNumber.Text = this.StreetAndNumber; | |
litPostOffice.Text = this.PostOffice; | |
litPostCodeAndCity.Text = this.PostCodeAndCity; | |
litTelephoneNumber.Text = this.TelephoneNumber; | |
litFaxNumber.Text = this.FaxNumber; | |
litEmail.Text = this.Email; | |
if (!string.IsNullOrEmpty(this.gMapsPictureID)) | |
{ | |
Guid gPictureId; | |
if (Guid.TryParse(gMapsPictureID, out gPictureId)) | |
if (gPictureId != Guid.Empty) | |
pictureGoogleMaps.ImageUrl = Helper.GetImageUrl(this.gMapsPictureID); | |
} | |
if (!string.IsNullOrEmpty(this.gMapsRetinaPictureID)) | |
{ | |
Guid hPictureId; | |
if (Guid.TryParse(gMapsRetinaPictureID, out hPictureId)) | |
if (hPictureId != Guid.Empty) | |
retinaPictureGoogleMaps.ImageUrl = Helper.GetImageUrl(this.gMapsRetinaPictureID); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment