示例#1
0
        /// <summary>
        /// Populates UI with page and its sections from db
        /// </summary>
        /// <param name="eformName"></param>
        private void BuildPageFromEForm(string eformName)
        {
            IEnumerable <XElement> metadataList = EformMetadata.GetMetadata(eformName, BuildPage, BuildSection, BuildSectionStatic);
            Action <BOL.BusinessObject, string, IDictionary <string, string> > addControl = AddControl;
            Action <Func <IEnumerable <IBusinessObject> >, Action <IBusinessObject>, IEnumerable <string>, XElement> addGrid =
                (f, a, c, x) => AddGrid(f, a, x);
            Action <string> doTransition = null;

            // add controls via bizo convert
            int?patientId;

            if (!string.IsNullOrEmpty(EPID))
            {
                string dpid = Security.CustomCryptoHelper.Decrypt(EPID);
                if (!string.IsNullOrEmpty(dpid))
                {
                    patientId = int.Parse(dpid);
                }
            }
            var bizos = BOL.BusinessObject.Convert(metadataList, addControl, addGrid, doTransition, null, null);

            _eform.Pages[0].Sections = pageSections.ToArray();
            PageOne.BuildPage(_eform.Pages[0]);
        }
示例#2
0
 /// <summary>
 /// Builds a blank page with a single section
 /// </summary>
 private void BuildBlankPage()
 {
     // build page
     PageOne.BuildPage(_eform.Pages.First());
 }