Esempio n. 1
0
        public string GetValue(Control src, XmlNode renderingDocument)
        {
            UpdatePanel up = ((UpdatePanel)src);
            ChoicePanel cp = ((ChoicePanel)up.ContentTemplateContainer.Controls[0]);

            int schemaChildCount = 0;
            int controlCount     = 0;

            foreach (XmlNode n in renderingDocument.ChildNodes)
            {
                if (n.Name.StartsWith("xs_"))
                {
                    if (((RadioButton)cp.Controls[controlCount]).Checked)
                    {
                        return(FieldsManager.GetInstance(n, namedChoice.Items[schemaChildCount], schemas).GetValue(cp.Controls[controlCount + 1], n));
                    }
                    schemaChildCount++;
                    controlCount += 3;
                }
                else
                {
                    controlCount++;
                }
            }
            return("");
        }
Esempio n. 2
0
        public Control GetWebControl(System.Web.HttpServerUtility server, System.Xml.XmlNode renderingDocument)
        {
            UpdatePanel up = new UpdatePanel();
            ChoicePanel cp = new ChoicePanel(renderingDocument, namedChoice, schemas, value);

            up.ContentTemplateContainer.Controls.Add(cp);
            return(up);
        }