예제 #1
0
        public void loadBoxes(ATEscalationsDisplayModel model)
        {
            txtEID.Text          = model.EscalationID;
            txt_Comments.Text    = model.Comments;
            txt_CTRNumber.Text   = model.CTRNumber;
            txt_Description.Text = model.ATEDescription;
            txt_PSNumber.Text    = model.PeopleSoftNumber;
            txt_Qty.Text         = model.Quantity.ToString();
            txt_Resolution.Text  = model.Resolution;
            cbo_MSO.Text         = model.MSO;
            cbo_Status.Text      = model.ATEStatus;
            cbo_Type.Text        = model.ATEType;
            if (model.Product != null)
            {
                FormControlOps.markListBoxes(lst_PartNumber, model.Product);
            }
            dtp_DateReported.Value = model.DateReported;
            dtp_DateResolved.Value = model.ResolvedDate;
            if (model.FELead != null)

            {
                FormControlOps.markListBoxes(lst_FELead, model.FELead);
            }
            displayAttachments();
        }
예제 #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;
            }
        }
예제 #3
0
        private void dgvResults_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            int           selectedRow = dgvResults.CurrentRow.Index;
            CustomerModel customer;

            switch (GV.MODE)
            {
            case Mode.New:
                break;

            case Mode.Edit:
            case Mode.DateRangeReport:
                AssignmentDisplayModel assignment = displayList[selectedRow];
                GV.ASSIGNMENTFORM.Assignment = retrieveList[selectedRow];
                GV.ASSIGNMENTFORM.BringToFront();
                break;

            case Mode.Undo:
                break;

            case Mode.CustomerSearch:
                customer = customerData[selectedRow];
                GV.ASSIGNMENTFORM.FillCustomerData(customer);
                GV.MODE = GV.PreviousMode;
                this.Close();
                break;

            case Mode.CustomerSearchMDI:
                customer = customerData[selectedRow];
                CallingForm.FillBoxes(customer);
                this.Close();
                break;

            // added this LD not sure....
            case Mode.DeleteCustomer:
                customer = customerData[selectedRow];
                CallingForm.FillBoxes(customer);
                this.Close();
                break;

            case Mode.LocationSearch:
                LocationModel location = locationData[selectedRow];
                GV.ASSIGNMENTFORM.FillLocationData(location);
                GV.MODE = GV.PreviousMode;
                this.Close();
                break;

            case Mode.SearchEscalation:
                ATEscalationsDisplayModel escalation = escalations[selectedRow];
                GV.ESCALATIONFORM.loadBoxes(escalation);
                GV.MODE = Mode.EditEscalation;
                break;

            case Mode.LabRequestEdit:
                LabRequestModel labRequest = labRequests[selectedRow];
                GV.LABREQUESTFORM.LabRequest = labRequest;
                break;

            case Mode.None:
                break;

            default:
                break;
            }
            //GV.MAINMENU.BringToFront();
            this.Close();
        }