Example #1
0
        private void GVDataBind()
        {
            if (_textObjectList != null)
            {
                ISTATUtils.LocalizedUtils loc = new ISTATUtils.LocalizedUtils(Utils.LocalizedCulture);
                txtViewText.Text = loc.GetLocalizedText(_textObjectList);

                gvText.DataSource = _textObjectList;
                gvText.DataBind();

            }
        }
        private void BindData()
        {
            if (_annotations == null)
            {
                gridView.DataBind();
                return;
            }

            ISTATUtils.LocalizedUtils localUtils = new ISTATUtils.LocalizedUtils(Utils.LocalizedCulture);
            ISTAT.EntityMapper.EntityMapper eMapper = new ISTAT.EntityMapper.EntityMapper(Utils.LocalizedLanguage);

            IList<ISTAT.Entity.Annotation> lAnnoations = new List<ISTAT.Entity.Annotation>();
            foreach (IAnnotationMutableObject annotation in _annotations)
            {
                if (annotation.Type == null || ((annotation.Type != null) && (annotation.Type.Trim() != "@ORDER@" && annotation.Type.Trim() != "CategoryScheme_node_order")))
                {
                    // Valore standard per le codelist immesso automaticmante
                    lAnnoations.Add(new ISTAT.Entity.Annotation(
                        annotation.Id,
                        annotation.Title,
                        annotation.Type,
                        (annotation.Uri != null) ? annotation.Uri.AbsoluteUri : string.Empty,
                        localUtils.GetLocalizedText(annotation.Text)));
                }
            }
            gridView.DataSource = lAnnoations.OrderBy(ann => ann.ID).ToList();
            gridView.DataBind();
        }