Esempio n. 1
0
 public void AddControlPage(HtmlForm form, BaseSurveyControl surveyControl)
 {
     form.Controls.Add(surveyControl);
     _fileInformation = new FileInfo();
     _fileInformation.IsControlPage    = true;
     _fileInformation.ControlPageIndex = form.Controls.Count > 0 ? form.Controls.Count - 1 : 0;
     _fileInformation.FileName         = String.Empty;
     _fileInformation.PhysicalFilePath = String.Empty;
     _fileInformation.PagesToSkip      = new ArrayList();
     _fileInformation.PagesToSkip.Add(String.Empty);
     _fileList.Add(_fileInformation);
     _fileCount = _fileCount + 1;
 }
Esempio n. 2
0
        protected void CreateChildControls()
        {
            if (null != formHolder)
            {
                if (Request["batchPrint"] != null && Request["batchPrint"].Equals("true"))
                {
                    foreach (string patientId in ParsedParameters.Keys)
                    {
                        BaseSurveyControl surveyControl = null;

                        if (patientId.Length > 0 && patientId != "batchPrint" && patientId != "proc" && patientId != "createBatchButton")
                        {
                            string monthNumber = ParsedParameters[patientId][0];
                            string surveyName  = ParsedParameters[patientId][1].Replace(" ", "");

                            string batchModuleDirectory;
                            string formControlFileName = surveyName + ".ascx";

                            if (formControlFileName.Contains(","))
                            {
                                // TODO: write output to error note because patient has multiple RP's - should not happen with production data
                            }
                            else
                            {
                                // get ascx control (survey)
                                surveyControl           = (BaseSurveyControl)this.LoadControl("../../Modules/FollowUp/Surveys/" + formControlFileName);
                                surveyControl.PatientId = Convert.ToInt32(patientId);
                                surveyControl.Procedure = Request.QueryString["proc"];
                                surveyControl.FuMonth   = monthNumber;

                                // load .ascx control onto page
                                formHolder.Controls.Add(surveyControl);
                            }
                        }
                    }
                }
            }
        }