Exemple #1
0
        private void btnAllReadings_Click(object sender, EventArgs e)
        {
            DialogResult result;

            switch (ReadingsMode)
            {
            case ReadingsMode.CreateNewReading:
                result = XtraMessageBox.Show("Do you want to Cancel this Reading ?", "Note", MessageBoxButtons.YesNo,
                                             MessageBoxIcon.Exclamation);
                switch (result)
                {
                case DialogResult.Yes:
                    ReadingsMode = 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;

                    List <GetPreviousVisitTiming_VisionRefractionReading_Result> list =
                        PEMRBusinessLogic.GetPrevious_VisitTiming_VisionRefractionReading(
                            PEMRBusinessLogic.ActivePEMRObject.Active_Patient.ID, dtSearchFrom.EditValue,
                            dtSearchTo.EditValue);
                    grdControl.DataSource = list;
                    grdControl.RefreshDataSource();
                    SetToolTip(list);
                    break;
                }
                break;
            }
        }
Exemple #2
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            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);
        }
Exemple #3
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);
            }
        }
Exemple #4
0
        public void Initialize(ReadingsType readingsType, object patientID, object dateFrom, object dateTo)
        {
            ReadingsType = readingsType;
            PatientID    = patientID;
            DateFrom     = dateFrom;
            DateTo       = dateTo;

            SetChartControl(ReadingsType);
            SetControls(ReadingsType);

            if (dateFrom != null)
            {
                DateFrom = Convert.ToDateTime(DateFrom).Date;
            }
            if (dateTo != null)
            {
                DateTo = Convert.ToDateTime(DateTo).Date;
            }

            switch (readingsType)
            {
            case ReadingsType.VisionAndRefractionRading:
                List <GetPreviousVisitTiming_VisionRefractionReading_Result> list_VisionRefraction =
                    PEMRBusinessLogic.GetPrevious_VisitTiming_VisionRefractionReading(patientID, DateFrom, DateTo);
                if (list_VisionRefraction != null)
                {
                    list_VisionRefraction = list_VisionRefraction.OrderByDescending(item => item.TakenDateTime).ToList();
                }
                chartControl1.DataSource = chartControl2.DataSource = list_VisionRefraction;
                break;

            case ReadingsType.EOMReading:
                List <GetPreviousVisitTiming_EOMReading_Result> list_EOMReading =
                    PEMRBusinessLogic.GetPrevious_VisitTiming_EOMReading_Result(patientID, DateFrom, DateTo);
                if (list_EOMReading != null)
                {
                    list_EOMReading = list_EOMReading.OrderByDescending(item => item.TakenDateTime).ToList();
                }
                chartControl1.DataSource = chartControl2.DataSource = list_EOMReading;
                break;
            }
        }
Exemple #5
0
        private void btnPreviousReading_Click(object sender, EventArgs e)
        {
            dtSearchFrom.EditValue            = null;
            dtSearchTo.EditValue              = null;
            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;

            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);
        }
Exemple #6
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            DialogResult result = XtraMessageBox.Show("Do you to add this Readings?", "Note", MessageBoxButtons.YesNo,
                                                      MessageBoxIcon.Exclamation);

            switch (result)
            {
            case DialogResult.Yes:
                VisitTiming_VisionRefractionReading visitTimingVisionRefraction =
                    PEMRBusinessLogic.CreateNew_VisitTiming_VisionRefractionReading(this,
                                                                                    ApplicationStaticConfiguration.PEMRSavingMode);
                if (visitTimingVisionRefraction != null)
                {
                    if (PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_VisionRefractionReading == null)
                    {
                        PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_VisionRefractionReading =
                            new List <VisitTiming_VisionRefractionReading>();
                    }
                    PEMRBusinessLogic.ActivePEMRObject.List_VisitTiming_VisionRefractionReading.Add(
                        visitTimingVisionRefraction);
                    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);
                    ClearControls(true);
                }
                break;
            }
        }