Example #1
0
        protected void SaveClick(object sender, EventArgs e)
        {
            // Save Diagnostic Record
            Diagnostic biz = new Diagnostic();

            // load existing record
            if (!IsNew)
            {
                biz.Get(DiagnosticId);
            }
            // important, get current uptake value before setting biz fields
            string currentDBDxResult = biz[Diagnostic.DxResult].ToString();

            // set biz fields from control fields
            CICHelper.SetBOValues(this.Controls, biz, (int.Parse(BaseDecryptedPatientId)));

            // handle tracer uptake, use existing db value andget computed value
            //biz[Diagnostic.DxResult] = GetTracerUptake(currentDBDxResult);

            // finally save diagnostic and child findings
            biz.Save();
            int diagnosticId = (int)biz[Diagnostic.DiagnosticId];

            // Save DxImageFindings
            DxGrid1.Save(diagnosticId);
            DxGrid2.Save(diagnosticId);

            // Re-populate form with new request
            ReloadPage(diagnosticId.ToString());
        }
Example #2
0
        private void PopulateGrids(int?diagnosticId)
        {
            int      parKey     = diagnosticId.HasValue ? diagnosticId.Value : int.MinValue;
            DataView dataSource = BOL.BusinessObject.GetByParentAsDataView <BOL.ImageFinding>(parKey);

            DxGrid1.DataSource = dataSource;
            DxGrid1.DataBind();

            DxGrid2.DataSource = new DataView(dataSource.Table);
            DxGrid2.DataBind();
        }