示例#1
0
        private void AddControl(BOL.BusinessObject b, string fieldname, IDictionary <string, string> extensions)
        {
            ICaisisInputControl control = controller.BuildControl(b, fieldname);

            // TODO: handle control.Required via js list
            if (control.Required)
            {
                controlsToValidate.Add(control as Control);
            }

            // kill the labels and help
            control.ShowHelpBubble = false;
            // control.ShowLabel = false;

            // use extensions to find page#, section#, row#, column#
            int page    = int.Parse(extensions["Page"]);
            int section = int.Parse(extensions["Section"]);
            int row     = int.Parse(extensions["Row"]);
            int column  = int.Parse(extensions["Column"]);

            Panel panel = new Panel();

            panel.CssClass = "dataEntrControlCell";
            panel.Controls.Add(control as Control);

            AddControl(panel, page, section, row, column);
        }
示例#2
0
        private void AddControl(BOL.BusinessObject b, string fieldname, IDictionary <string, string> extensions)
        {
            int page         = int.Parse(extensions["Page"]);
            int section      = int.Parse(extensions["Section"]);
            int row          = int.Parse(extensions["Row"]);
            int column       = int.Parse(extensions["Column"]);
            int sectionIndex = section - 1;

            EformSection eFormSection = pageSections.ElementAt(sectionIndex);
            EformField   field        = GetField(b.TableName, fieldname, column, row);

            eFormSection.AddField(field);
        }