Пример #1
0
        private void BasicReportPopupView_BackgroundClicked(object sender, EventArgs e)
        {
            ReportViewModel.isLocationPopupOpen = false;

            if (ReportViewModel.LocationsSelected == "Select location" || ReportViewModel.LocationsSelected == "No results found" || ReportViewModel.LocationsSelected == null)
            {
                ReportViewModel.IsChildRecordButtonEnabled = false;
                ReportViewModel.IsBatteryTypeButtonEnabled = false;
                ReportViewModel.IsRecordFormButtonEnabled  = false;

                ReportViewModel.SelectedChild          = null;
                ReportViewModel.SelectedAssessmentType = null;
                ReportViewModel.SelectedRecordForm     = null;

                ReportViewModel.OfflineStudentID     = 0;
                ReportViewModel.SelectedAssessmentID = 0;
                ReportViewModel.SelectedRecordFormID = 0;

                ReportViewModel.RunReport = false;
            }
            else
            {
                if (ReportViewModel.OfflineStudentID == 0)
                {
                    ReportViewModel.SelectedChild              = null;
                    ReportViewModel.SelectedAssessmentType     = null;
                    ReportViewModel.SelectedRecordForm         = null;
                    ReportViewModel.IsChildRecordButtonEnabled = true;
                    ReportViewModel.IsBatteryTypeButtonEnabled = false;
                    ReportViewModel.IsRecordFormButtonEnabled  = false;
                }
                else
                {
                    ReportViewModel.GetChildRecords();
                    ReportViewModel.SelectedAssessmentType     = null;
                    ReportViewModel.SelectedRecordForm         = null;
                    ReportViewModel.IsBatteryTypeButtonEnabled = false;
                    ReportViewModel.IsRecordFormButtonEnabled  = false;
                }
            }
        }