Esempio n. 1
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            try
            {
                financedEstateList      = SharePointConnector.GetFinancedEstate();
                financedEstateImageList = SharePointConnector.GetFinancedEstateImages();

                this.LoadFilterControls();
            }
            catch (Exception ex)
            {
                LiteralControl errorMessage = new LiteralControl();
                errorMessage.Text = ex.Message;

                this.Controls.Clear();
                this.Controls.Add(errorMessage);
            }
        }
        private string LoadPropertyImage()
        {
            string assetCode = this.Request.QueryString["AssetCode"];

            List <FinancedEstateImage> financedEstateImageList = SharePointConnector.GetFinancedEstateImages();

            FinancedEstateImage gifImage =
                financedEstateImageList.Find(gif =>
                                             gif.Name.Equals(assetCode + GIF, StringComparison.CurrentCultureIgnoreCase));

            string gifImageUrl = financedEstateImageList.Find(fei => fei.Name.Equals(DEFAULT_IMAGE)).Url;

            if (gifImage != null)
            {
                gifImageUrl = gifImage.Url;
            }

            string formatedResult = string.Format(
                "<img src='{0}' alt='' />",
                gifImageUrl);

            return(formatedResult);
        }