Example #1
0
        /// <summary>
        /// Fill set of grouped fields
        /// </summary>
        /// <param name="group_name">Group name/id</param>
        /// <param name="values">Values</param>
        /// <seealso cref="FieldsExpansion"/>
        /// <returns>True if new page have been created false otherwise</returns>
        public bool FillSet(string group_name, bool format, params object[] values)
        {
            TemplateForm _tfCurrentPage = _lstPageForms[_nCurrentPageIndex];

            if (_tfCurrentPage == null)
            {
                throw (new KeyNotFoundException("Page not found"));
            }

            bool _result = _tfCurrentPage.FillSet(group_name, format, values);

            // If the FillSet require a new page we add new page and reiterate the FillSet
            if (_result)
            {
                _tfCurrentPage = AddPage();
                _result        = _tfCurrentPage.FillSet(group_name, format, values);

                return(true);
            }

            return(false);
        }
Example #2
0
        private void btnFieldsSetFill_Click(object sender, EventArgs e)
        {
            string[] _rgsValues = txtSetValues.Text.Split(',');


            if (cbPager.Checked)
            {
                if (_tpPager == null)
                {
                    _tpPager = new TemplatePager(_tfTemplate);
                }

                _tpPager.FillSet(cbGroupIdx.Text, true, _rgsValues);

                return;
            }

            _tfTemplate.FillSet(cbGroupIdx.Text, true, _rgsValues);
        }