/// <summary>
        /// Retrieves list of technicians that have incidents
        /// </summary>
        /// <returns>Returns list of technicians that have incidents</returns>
        public List <Technician> GetTechniciansWithIncidents()
        {
            List <Technician> myTechList;

            myTechList = TechnicianDB.GetTechniciansWithIncidents();
            return(myTechList);
        }
        /// <summary>
        /// Retrieves list of technicians
        /// </summary>
        /// <returns>Returns list of technicians</returns>
        public List <Technician> GetTechnicianList()
        {
            List <Technician> myTechList;

            myTechList = TechnicianDB.GetTechnicianList();
            return(myTechList);
        }
Exemple #3
0
        private void frmTechnicianIncidents_Load(object sender, EventArgs e)
        {
            TechSupportDB.SetConnectionString(ConfigurationManager.
                                              ConnectionStrings["SportsPro.Properties.Settings.TechSupportConnectionString"].
                                              ConnectionString);

            technicianList          = TechnicianDB.GetTechnicianList();
            nameComboBox.DataSource = technicianList;

            nameComboBox.SelectedIndex = 0;
        }
Exemple #4
0
        private void nameComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            List <Incident> incidentsList;

            technicianBindingSource.Clear();

            if (nameComboBox.SelectedIndex > -1)
            {
                int intTechID = technicianList[nameComboBox.SelectedIndex].TechID;

                Technician technician = TechnicianDB.GetTechnician(intTechID);
                technicianBindingSource.Add(technician);

                incidentsList = IncidentDB.GetOpenTechnicianIncidents(intTechID);
                incidentDataGridView.DataSource = incidentsList;
            }
        }
        /// <summary>
        /// Retrieves specific tech based on its ID passed in
        /// </summary>
        /// <param name="techID">Used to find the correct technician</param>
        /// <returns>Returns technician based on its techID</returns>
        public Technician GetTechnician(int techID)
        {
            Technician technician = TechnicianDB.GetTechnician(techID);

            return(technician);
        }