public void Initialize(GetPreviousVisitTiming_VisionRefractionReading_Result active)
 {
     Active_VisitTiming_VisionRefractionReading = active;
     CommonViewsActions.ShowUserControl(ref _visionRefraction, this);
     _visionRefraction.Initialize(ReadingsMode.ViewingPreviousReadings,
                                  Active_VisitTiming_VisionRefractionReading);
 }
示例#2
0
        public void Initialize(ReadingsMode readingMode,
                               GetPreviousVisitTiming_VisionRefractionReading_Result visionRefractionToLoad)
        {
            ReadingsMode = readingMode;
            switch (readingMode)
            {
            case ReadingsMode.ViewingActiveAllReadings:
                lytGroup_AllReadings.Visibility   = LayoutVisibility.Always;
                lytGroup_AllReadings.Expanded     = true;
                lytGroup_ReadingParent.Visibility = lytGroup_ReadingDetails.Visibility = lyt_Cancel.Visibility =
                    emptySpaceItem4.Visibility    =
                        lyt_Add.Visibility        = emptySpaceItem15.Visibility = LayoutVisibility.Never;
                emptySpaceItem2.Visibility        = lytNewReadings.Visibility = LayoutVisibility.Always;
                btnAllReadings_Click(null, null);
                break;

            case ReadingsMode.ViewingPreviousReadings:
                Selected_VisitTiming_VisionRefractionReading = visionRefractionToLoad;
                btnNewReading.Text         = "Active Reading";
                btnAllReadings.Text        = "Previous Readings";
                emptySpaceItem2.Visibility = lytNewReadings.Visibility = LayoutVisibility.Never;
                ReadyForNewOrEditing(false);
                SetControlsValues();
                lyt_Cancel.Visibility             = lyt_Add.Visibility = emptySpaceItem4.Visibility =
                    lytViewAllReadings.Visibility = LayoutVisibility.Never;
                break;
            }

            if (PEMRBusinessLogic.ActivePEMRObject != null)
            {
                List <GetPreviousVisitTiming_VisionRefractionReading_Result> list =
                    PEMRBusinessLogic.GetPrevious_VisitTiming_VisionRefractionReading(
                        PEMRBusinessLogic.ActivePEMRObject.Active_Patient.ID, dtSearchFrom.EditValue,
                        dtSearchTo.EditValue);
                if (list != null)
                {
                    list = list.OrderByDescending(item => item.TakenDateTime).ToList();
                }
                grdControl.DataSource = list;
                grdControl.RefreshDataSource();
                SetToolTip(list);
            }
        }
示例#3
0
 private void gridView2_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
 {
     Selected_VisitTiming_VisionRefractionReading =
         CommonViewsActions.GetSelectedRowObject <GetPreviousVisitTiming_VisionRefractionReading_Result>(gridView2);
 }