Beispiel #1
0
        private void FrmInput_InputDataReady(object sender, InputDataReadyEventArgs e)
        {
            string searchTerm             = e.SearchString;
            List <LabRequestModel> models = GlobalConfig.Connection.SearchLabRequests(searchTerm.ToUpper());

            this.Show();
            switch (models.Count)
            {
            case 0:
                MessageBox.Show("No matching records found.");
                break;

            case 1:
                LabRequestModel model = models[0];;
                loadBoxes(model);
                cboMSO.Focus();
                displayAttachments();
                break;

            default:
                frmMultiSelect displayForm = new frmMultiSelect();

                displayForm.LabRequests = models;
                displayForm.Show();
                break;
            }
        }
Beispiel #2
0
        private void InputForm_InputDataReady(object sender, InputDataReadyEventArgs e)
        {
            string searchTerm = e.SearchString;
            List <ATEscalationsModel> escalations = GlobalConfig.Connection.SearchEscalations(searchTerm.ToUpper());

            switch (escalations.Count)
            {
            case 0:
                MessageBox.Show("No matching records found.");
                this.Close();
                break;

            case 1:
                ATEscalationsDisplayModel displayModel = new ATEscalationsDisplayModel(escalations[0]);
                dataLoading = true;
                loadBoxes(displayModel);
                break;

            default:
                frmMultiSelect displayForm = new frmMultiSelect();
                List <ATEscalationsDisplayModel> displayModels = convertToDisplayList(escalations);
                displayForm.Escalations = displayModels;
                displayForm.Show();
                break;
            }
        }
Beispiel #3
0
        private void btnGo_Click(object sender, EventArgs e)
        {
            InputDataReadyEventArgs args = new InputDataReadyEventArgs();

            args.SearchString = txtInput.Text.Trim().ToUpper();
            InputDataReady?.Invoke(this, args);
            this.Close();
        }