Esempio n. 1
0
        public override void RefreshSecondaryData()
        {
            ModuloList modulos = ModuloList.GetList(false);

            Library.Instruction.HComboBoxSourceList _combo_modulos = new Library.Instruction.HComboBoxSourceList(modulos);
            Datos_Modulos.DataSource = _combo_modulos;
            PgMng.Grow(string.Empty, "_combo_modulos");

            InstructorList instructores = InstructorList.GetList(false);

            Library.Instruction.HComboBoxSourceList _combo_instructores = new Library.Instruction.HComboBoxSourceList(instructores);
            Datos_Instructores.DataSource = _combo_instructores;
            PgMng.Grow(string.Empty, "_combo_instructores");

            PromocionList promociones = PromocionList.GetList(false);

            Library.Instruction.HComboBoxSourceList _combo_promociones = new Library.Instruction.HComboBoxSourceList(promociones);
            ComboBoxSource combo = new ComboBoxSource(-1, "No especificado");

            _combo_promociones.Add(combo);
            Datos_Promociones.DataSource = _combo_promociones;
            PgMng.Grow(string.Empty, "_combo_promociones");

            _lista_preguntas = PreguntaList.GetPreguntasModulo(Entity.OidModulo);
            PgMng.Grow(string.Empty, "Preguntas del Módulo");
            //_submodulos = SubmoduloList.GetList(false);
            //_temas = TemaList.GetList(false);
        }
Esempio n. 2
0
        public async Task InitCourses()
        {
            TotalStudents = await courseService.GetTotalStudentsFromInstructorsCourses <int>(User.UserID);

            TotalCourses = await courseService.GetTotalInstructorsCourses <int>(User.UserID);

            TotalRating = await courseService.GetAverageInstructorsCoursesRating <float>(User.UserID);

            try
            {
                CourseSearchRequest request = new CourseSearchRequest()
                {
                    UserID = User.UserID
                };
                InstructorList.Clear();
                var courses = await courseService.Get <List <MCourse> >(request);

                foreach (var course in courses)
                {
                    if (courses.Count > 0)
                    {
                        InstructorList.Add(new CourseVM(course));
                    }
                }
            }
            catch (Exception)
            {
            }
        }
Esempio n. 3
0
        public override void RefreshSecondaryData()
        {
            ModuloList modulos = ModuloList.GetList(false);

            Library.Instruction.HComboBoxSourceList _combo_modulos = new Library.Instruction.HComboBoxSourceList(modulos);
            Datos_Modulos.DataSource = _combo_modulos;
            PgMng.Grow(string.Empty, "_combo_modulos");

            InstructorList instructores = InstructorList.GetList(false);

            Library.Instruction.HComboBoxSourceList _combo_instructores = new Library.Instruction.HComboBoxSourceList(instructores);
            Datos_Instructores.DataSource = _combo_instructores;
            PgMng.Grow(string.Empty, "_combo_instructores");

            PromocionList promociones = PromocionList.GetList(false);

            Library.Instruction.HComboBoxSourceList _combo_promociones = new Library.Instruction.HComboBoxSourceList(promociones);
            ComboBoxSource combo = new ComboBoxSource(-1, "No especificado");

            _combo_promociones.Add(combo);
            Datos_Promociones.DataSource = _combo_promociones;
            PgMng.Grow(string.Empty, "_combo_promociones");

            //_respuestas = RespuestaList.GetList();
        }
Esempio n. 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["User"] != null && Session["Account"].ToString() == "Instructor")
     {
         /*
          * check if the user session exist and Account session value is Instructor
          */
         string         inId        = Session["User"].ToString();      // get the user id from the session user
         Instructor     instructor  = new Instructor(inId);            // declare and instantiate new instructor object
         InstructorList instructors = new InstructorList();            //declare and instantiate new InstructorList object
         instructors.Populate(instructor);                             // Populate the  object
         name.Text = instructor.FirstName + " " + instructor.LastName; // assign the first and last name to the name lable
     }
     else if (Session["User"] != null && Session["Account"].ToString() != "Instructor")
     {
         /*
          * else if the user session exist but the account session value is not student show error message
          */
         Response.Write("Error You are not allowed to be here");
         Response.End();
     }
     else
     {
         /*
          * else show error message
          */
         Response.Write("Error please log in before trying to Access this page..!");
         Response.End();
     }
 }
Esempio n. 5
0
    public bool CheckNpc()
    {
        if (InstructorNpcId <= 0 || TraineeNpcId <= 0)
        {
            return(false);
        }
        CSPersonnel instructorP = m_MgCreator.GetNpc(InstructorNpcId);

        if (instructorP == null)
        {
            return(false);
        }
        if (instructorP.Occupation != CSConst.potTrainer)
        {
            InstructorList.Remove(instructorP.ID);
            instructorP.trainerType = ETrainerType.none;
            InstructorNpcId         = -1;
            return(false);
        }
        CSPersonnel traineeP = m_MgCreator.GetNpc(TraineeNpcId);

        if (traineeP == null)
        {
            return(false);
        }
        if (traineeP.Occupation != CSConst.potTrainer)
        {
            TraineeList.Remove(traineeP.ID);
            traineeP.trainerType = ETrainerType.none;
            TraineeNpcId         = -1;
            return(false);
        }
        return(true);
    }
Esempio n. 6
0
    public override void RemoveWorker(CSPersonnel npc)
    {
        base.RemoveWorker(npc);
        if (InstructorNpcId == npc.ID)
        {
            if (m_Counter != null)
            {
                StopCounter();
            }
            TraineeNpcId = -1;
        }

        if (TraineeNpcId == npc.ID)
        {
            if (m_Counter != null)
            {
                StopCounter();
            }
            TraineeNpcId = -1;
        }
        InstructorList.Remove(npc.ID);
        TraineeList.Remove(npc.ID);

        UpdateUI();
    }
Esempio n. 7
0
    public bool AddTrainee(CSPersonnel p)
    {
        if (TraineeList.Contains(p.ID))
        {
            return(true);
        }
        if (TraineeList.Count >= MAX_TRAINEE_NUM)
        {
            return(false);
        }
        if (InstructorNpcId == p.ID)
        {
            if (m_Counter != null)
            {
                StopCounter();
            }
            InstructorNpcId = -1;
        }
        InstructorList.Remove(p.ID);
        TraineeList.Add(p.ID);
        p.trainerType = ETrainerType.Trainee;

        UpdateUI();
        return(true);
    }
Esempio n. 8
0
    public bool AddInstructor(CSPersonnel p)
    {
        if (InstructorList.Contains(p.ID))
        {
            return(true);
        }
        if (InstructorList.Count >= MAX_INSTRUCTOR_NUM)
        {
            return(false);
        }
        if (TraineeNpcId == p.ID)
        {
            if (m_Counter != null)
            {
                StopCounter();
            }
            TraineeNpcId = -1;
        }
        TraineeList.Remove(p.ID);
        InstructorList.Add(p.ID);
        p.trainerType = ETrainerType.Instructor;

        UpdateUI();
        return(true);
    }
Esempio n. 9
0
        /// <summary>
        /// Gets a list of Instructors
        /// </summary>
        /// <returns>List of Instructors</returns>
        public static InstructorList GetItem()
        {
            InstructorList myInstructorList = null;

            using (SqlConnection myConnection = new SqlConnection(AppSettings.ConnectionString))
            {
                SqlCommand myCommand = new SqlCommand("spSelectInstructorList", myConnection);
                myCommand.CommandType = CommandType.StoredProcedure;
                myConnection.Open();
                using (SqlDataReader myDataReader = myCommand.ExecuteReader())
                {
                    if (myDataReader.HasRows)
                    {
                        myInstructorList = new InstructorList();
                        while (myDataReader.Read())
                        {
                            myInstructorList.Add(FillRecord(myDataReader));
                        }
                    }
                    myDataReader.Close();
                }
                myConnection.Close();
            }
            return(myInstructorList);
        }
 public InstructorSelectForm(Form parent, InstructorList list)
     : base(true, parent, list)
 {
     InitializeComponent();
     _view_mode   = molView.Select;
     DialogResult = DialogResult.Cancel;
 }
Esempio n. 11
0
        //public override void PrintObject()
        //{
        //    IncidenciaReportMng reportMng = new IncidenciaReportMng(AppContext.ActiveSchema);
        //    ReportViewer.SetReport(reportMng.GetReport(EntityInfo);
        //    ReportViewer.ShowDialog();
        //}

        #endregion

        #region Buttons

        private void Selecionar_B_Click(object sender, EventArgs e)
        {
            if (TipoAgente_CB.Text == string.Empty)
            {
                return;
            }
            ETipoAgente tipo = (ETipoAgente)Enum.Parse(typeof(ETipoAgente), TipoAgente_CB.Text);

            switch (tipo)
            {
            case ETipoAgente.Alumno:
                AlumnoSelectForm form = new AlumnoSelectForm(this);
                form.ShowDialog();
                if (form.DialogResult == DialogResult.OK)
                {
                    Entity.OidAgente = ((AlumnoInfo)form.Selected).Oid;
                    Entity.Agente    = ((AlumnoInfo)form.Selected).Nombre + " " + ((AlumnoInfo)form.Selected).Apellidos;
                }
                break;


            case ETipoAgente.Instructor:
                InstructorList       instructores = InstructorList.GetList(false);
                InstructorSelectForm form2        = new InstructorSelectForm(this, instructores);
                form2.ShowDialog();
                if (form2.DialogResult == DialogResult.OK)
                {
                    Entity.OidAgente = ((InstructorInfo)form2.Selected).Oid;
                    Entity.Agente    = ((InstructorInfo)form2.Selected).Nombre + " " + ((InstructorInfo)form2.Selected).Apellidos;
                }
                break;
            }
        }
Esempio n. 12
0
 //Responsible of filling necessary fields for the adding process
 private void AddInstructor_Load(object sender, EventArgs e)
 {
     instructorList = new InstructorList();
     //Fills the ID text box with the now to be added instructor ID (Last Instructor ID in the table + 1)
     textBoxID.Text = (instructorList.GetMaxID() + 1).ToString();
     //Fills the date text box with the current Time and Date
     textBoxHdate.Text = DateTime.Now.ToString();
 }
Esempio n. 13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     /*
      * instantiate classes when the page loads
      */
     students    = new StudentList();
     instructors = new InstructorList();
 }
Esempio n. 14
0
 //Populate the combo box of the instructor IDs and instantiantes objects to use
 private void DeleteInstructor_Load(object sender, EventArgs e)
 {
     instructorList     = new InstructorList();
     scheduleList       = new ScheduleList();
     sectionStudentList = new SectionStudentList();
     sectionList        = new SectionList();
     PopulateInstructors();
 }
        protected override bool DoFilter()
        {
            if (_lista == null)
            {
                MessageBox.Show(Resources.Messages.NO_RESULTS);
                return(false);
            }

            FCriteria criteria = null;

            foreach (Control ctl in this.Campos_Groupbox.Controls)
            {
                if (((System.Windows.Forms.RadioButton)ctl).Checked)
                {
                    switch (ctl.Name)
                    {
                    case "Nombre_RB":
                    {
                        criteria = new FCriteria <string>("Nombre", Valor_TB.Text);
                        break;
                    }

                    case "ID_RB":
                    {
                        criteria = new FCriteria <string>("Id", Valor_TB.Text);
                        break;
                    }

                    case "Alias_RB":
                    {
                        criteria = new FCriteria <string>("Alias", Valor_TB.Text);
                        break;
                    }
                    }
                }
            }

            // Consulta en la bd
            InstructorList lista = null;

            lista = InstructorList.GetList(_lista.GetSubList(criteria));

            Datos.DataSource = lista;

            if (lista.Count == 0)
            {
                MessageBox.Show(Resources.Messages.NO_RESULTS);
                return(false);
            }

            Datos.MoveFirst();

            _filtered_list = lista;

            return(true);
        }
Esempio n. 16
0
        protected new SortedBindingList <InstructorInfo> Localize(FilterItem item)
        {
            SortedBindingList <InstructorInfo> list = null;
            InstructorList sourceList = null;

            switch (FilterType)
            {
            case IFilterType.None:
                if (List == null)
                {
                    MessageBox.Show(Face.Resources.Messages.NO_RESULTS);
                    return(null);
                }
                sourceList = List;
                break;

            case IFilterType.Filter:
                if (FilteredList == null)
                {
                    MessageBox.Show(Face.Resources.Messages.NO_RESULTS);
                    return(null);
                }
                sourceList = FilteredList;
                break;

            default:
                sourceList = List;
                break;
            }

            if (item.FilterProperty == IFilterProperty.All)
            {
                FCriteria criteria = GetCriteria(string.Empty, item.Value, null, item.Operation);
                list = sourceList.GetSortedSubList(criteria, _properties_list);
            }
            else
            {
                FCriteria criteria = GetCriteria(item.Column, item.Value, null, item.Operation);
                list = sourceList.GetSortedSubList(criteria, _properties_list);
            }

            if (list.Count == 0)
            {
                MessageBox.Show(Face.Resources.Messages.NO_RESULTS);
                return(sourceList.GetSortedList());
            }

            DatosSearch.DataSource = list;
            DatosSearch.MoveFirst();

            AddFilterLabel(item);

            return(list);
        }
Esempio n. 17
0
        private void Instructor_BT_Click(object sender, EventArgs e)
        {
            InstructorList       instructores = InstructorList.GetList(false);
            InstructorSelectForm form         = new InstructorSelectForm(this, instructores);

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                InstructorInfo instructor = form.Selected as InstructorInfo;
                _entity.OidProfesor = instructor.Oid;
                _entity.Instructor  = instructor.Alias;
                Instructor_TB.Text  = instructor.Alias;
            }
        }
Esempio n. 18
0
        public InstructorMngForm(bool isModal, Form parent, InstructorList list)
            : base(isModal, parent, list)
        {
            InitializeComponent();
            SetView(molView.Normal);

            // Parche para poder abrir el formulario en modo diseño y no perder la configuracion de columnas
            DatosLocal_BS    = Datos;
            Tabla.DataSource = DatosLocal_BS;

            TablaBase         = Tabla;
            base.SortProperty = Codigo.DataPropertyName;
        }
Esempio n. 19
0
    public bool CheckInstructorId(int instructorId)
    {
        CSPersonnel instructor = m_MgCreator.GetNpc(instructorId);

        if (instructor == null || instructor.m_Occupation != CSConst.potTrainer)
        {
            return(false);
        }
        if (!InstructorList.Contains(instructorId))
        {
            return(false);
        }
        return(true);
    }
Esempio n. 20
0
        public override void RefreshSecondaryData()
        {
            _instructores = InstructorList.GetList(false);
            PgMng.Grow();

            _modulos = ModuloList.GetSortedList("Codigo", ListSortDirection.Ascending);
            PgMng.Grow();

            _submodulos = SubmoduloList.GetSortedList("CodigoOrden", ListSortDirection.Ascending);
            PgMng.Grow();

            _promociones = PromocionList.GetSortedList("Numero", ListSortDirection.Ascending);
            PgMng.Grow();
        }
        internal static InstructorList DataTableToTitleList(DataTable Dt)
        {
            InstructorList instructors = new InstructorList();

            try
            {
                foreach (DataRow item in Dt.Rows)
                {
                    instructors.Add(DataRowToTitle(item));
                }
            }
            catch
            {
            }
            return(instructors);
        }
Esempio n. 22
0
        /// <summary>
        /// Asigna los valores del grid que no están asociados a propiedades
        /// </summary>
        protected override void SetUnlinkedGridValues(string gridName)
        {
            switch (gridName)
            {
            case "Cuestiones_Grid":
            {
                foreach (DataGridViewRow row in Cuestiones_Grid.Rows)
                {
                    if (_tipo_auditoria == null)
                    {
                        _tipo_auditoria = _tipos_auditorias.GetItem(Entity.OidTipoAuditoria);
                    }
                    if (_tipo_auditoria != null)
                    {
                        CuestionAuditoria cuestion = (CuestionAuditoria)row.DataBoundItem;
                        if (cuestion != null)
                        {
                            CuestionInfo info = _tipo_auditoria.Cuestiones.GetItem(cuestion.OidCuestion);
                            if (info != null)
                            {
                                row.Cells["Cuestion"].Value = info.Texto;
                                row.Cells["Numero"].Value   = info.Numero;
                            }
                        }
                    }
                }
            } break;

            case "Historia_Grid":
            {
                InstructorList instructores = InstructorList.GetList(false);
                foreach (DataGridViewRow row in Historia_Grid.Rows)
                {
                    HistoriaAuditoria item = (HistoriaAuditoria)row.DataBoundItem;
                    if (item.Empleado == string.Empty)
                    {
                        InstructorInfo instructor = instructores.GetItem(item.OidEmpleado);
                        if (instructor != null)
                        {
                            row.Cells["Empleado"].Value = instructor.Nombre;
                        }
                    }
                }
            }
            break;
            }
        }
Esempio n. 23
0
        public override void UpdateList()
        {
            switch (_current_action)
            {
            case molAction.Add:
                if (_entity == null)
                {
                    return;
                }
                List.AddItem(_entity.GetInfo(false));
                if (FilterType == IFilterType.Filter)
                {
                    InstructorList listA = InstructorList.GetList(_filter_results);
                    listA.AddItem(_entity.GetInfo(false));
                    _filter_results = listA.GetSortedList();
                }
                break;

            case molAction.Edit:
            case molAction.Lock:
            case molAction.Unlock:
                if (_entity == null)
                {
                    return;
                }
                ActiveItem.CopyFrom(_entity);
                break;

            case molAction.Delete:
                if (ActiveItem == null)
                {
                    return;
                }
                List.RemoveItem(ActiveOID);
                if (FilterType == IFilterType.Filter)
                {
                    InstructorList listD = InstructorList.GetList(_filter_results);
                    listD.RemoveItem(ActiveOID);
                    _filter_results = listD.GetSortedList();
                }
                break;
            }

            _entity = null;
            RefreshSources();
        }
Esempio n. 24
0
        /// <summary>
        /// Toma la lista de bancos de la base de datos y rellena la tabla.
        /// </summary>
        protected override void RefreshMainData()
        {
            PgMng.Grow(string.Empty, "Instructor");

            _selected_oid = ActiveOID;

            switch (DataType)
            {
            case EntityMngFormTypeData.Default:
                List = InstructorList.GetList(false);
                break;

            case EntityMngFormTypeData.ByParameter:
                _sorted_list = List.GetSortedList();
                break;
            }
            PgMng.Grow(string.Empty, "Lista de Instructors");
        }
Esempio n. 25
0
    public bool CheckInstructorAndTraineeId(int instructorId, int traineeId)
    {
        CSPersonnel instructorNpc = m_MgCreator.GetNpc(instructorId);
        CSPersonnel traineeNpc    = m_MgCreator.GetNpc(traineeId);

        if (instructorNpc == null || traineeNpc == null)
        {
            return(false);
        }
        if (instructorNpc.m_Occupation != CSConst.potTrainer || traineeNpc.m_Occupation != CSConst.potTrainer)
        {
            return(false);
        }
        if (!InstructorList.Contains(instructorId) || !TraineeList.Contains(traineeId))
        {
            return(false);
        }
        return(true);
    }
Esempio n. 26
0
        //Instantiates all objects to be used and adds the table names to the tables combobox
        private void TotalHours_Load(object sender, EventArgs e)
        {
            scheduleList = new ScheduleList();

            locationList = new LocationList();
            locationList.Populate();
            sectionList = new SectionList();
            sectionList.Populate();
            instructorList = new InstructorList();
            instructorList.Populate();
            courseList = new CourseList();
            courseList.Populate();
            studentList = new StudentList();
            studentList.Populate();

            //Adds the tables of wanted data to be selected from in an Array
            String[] tables = { "Location", "Section", "Instructor", "Course", "Student", "All" };
            //Make above array the datasource of the tables combobox
            comboBoxBy.DataSource = tables;
        }
        public ActionResult Index(int?id, int?courseId)
        {
            var viewModel = new InstructorList();

            viewModel.Instructors = instructorRepository.GetInstructors();

            if (id != null)
            {
                ViewBag.InstructorId = id.Value;
                viewModel.Courses    = viewModel.Instructors.Single(i => i.Id == id.Value).Courses;
            }

            if (courseId != null)
            {
                ViewBag.CourseId      = courseId.Value;
                viewModel.Enrollments = viewModel.Courses.Single(x => x.Id == courseId).Enrollments;
            }

            return(View(viewModel));
        }
        protected void DoRefresh()
        {
            try
            {
                PgMng.Reset(8, 1, Resources.Messages.LOADING_DATA, this);

                for (int i = 1; i < 3; i++)
                {
                    _practicas[i] = ClasePracticaList.GetDisponiblesList(Entity.OidPlan, Entity.OidPromocion, Entity.Oid, i);
                }
                PgMng.Grow();

                _teoricas = ClaseTeoricaList.GetDisponiblesList(Entity.OidPlan, Entity.OidPromocion, Entity.Oid);
                PgMng.Grow();

                _extras = ClaseExtraList.GetDisponiblesList(Entity.OidPromocion, Entity.Oid);
                PgMng.Grow();

                profesores_encargados.GetEncargados(Entity.OidPlan, Entity.OidPromocion);
                PgMng.Grow();

                _combo_clases           = Submodulo.GetComboClases(_teoricas, ClasePracticaList.Merge(_practicas[1], _practicas[2]), _extras);
                Datos_Clases.DataSource = _combo_clases;
                PgMng.Grow();

                _instructores_asignados = Sesion.CargaSesionesProfesores(Entity.FechaInicial, Entity.OidPromocion);
                PgMng.Grow();

                _profesores = InstructorList.GetInstructoresHorariosList(EntityInfo.OidPromocion, EntityInfo.FechaInicial, EntityInfo.FechaFinal);
                PgMng.Grow();
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                PgMng.FillUp();
            }
        }
Esempio n. 29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["User"] != null && Session["Account"].ToString() == "Student")
            {
                /*
                 * check if the user session exist and Account session value is student
                 */

                /*
                 * instantiate classes when the page loads
                 */
                sectionsList       = new SectionList();
                taughtList         = new TaughtCourseList();
                locationList       = new LocationList();
                courseList         = new CourseList();
                scheduleList       = new ScheduleList();
                sectionStudentList = new SectionStudentList();
                studentList        = new StudentList();
                scheduleList.Populate();           // populate the sechuleList
                instructorList = new InstructorList();
                GenerateGridData();                // call GenerateGridData method to fill the gridview element with data
            }
            else if (Session["User"] != null && Session["Account"].ToString() != "Student")
            {
                /*
                 * else if the user session exist but the account session value is not student show error message
                 */
                Response.Write("Error You are not allowed to be here");
                Response.End();
            }
            else
            {
                /*
                 * else show error message
                 */
                Response.Write("Error please log in before trying to Access this page..!");
                Response.End();
            }
        }
Esempio n. 30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["User"] != null && Session["Account"].ToString() == "Student")
            {
                /*
                 * check if the user session exist and Account session value is student
                 */

                /*
                 * instantiate classes when the page loads
                 */
                sectionList        = new SectionList();
                sectionStudentList = new SectionStudentList();
                studentList        = new StudentList();
                taughtCoursesList  = new TaughtCourseList();
                courseList         = new CourseList();
                instructorList     = new InstructorList();
                string studentID = Session["User"].ToString();     //declare , get the id of the student from the session and assign it to variable
                sectionStudentList.Filter("StudentID", studentID); // filter the section student list using the studentID
                GenerateGridData();                                //call GenerateGridData method to add data to the gridView
            }
            else if (Session["User"] != null && Session["Account"].ToString() != "Student")
            {
                /*
                 * else if the user session exist but the account session value is not student show error message
                 */
                Response.Write("Error You are not allowed to be here");
                Response.End();
            }
            else
            {
                /*
                 * else show error message
                 */
                Response.Write("Error please log in before trying to Access this page..!");
                Response.End();
            }
        }
Esempio n. 31
0
 /// <summary>
 /// Gets a list of Instructors
 /// </summary>
 /// <returns>List of Instructors</returns>
 public static InstructorList GetItem()
 {
     InstructorList myInstructorList = null;
     using (SqlConnection myConnection = new SqlConnection(AppSettings.ConnectionString))
     {
         SqlCommand myCommand = new SqlCommand("spSelectInstructorList", myConnection);
         myCommand.CommandType = CommandType.StoredProcedure;
         myConnection.Open();
         using (SqlDataReader myDataReader = myCommand.ExecuteReader())
         {
             if (myDataReader.HasRows)
             {
                 myInstructorList = new InstructorList();
                 while (myDataReader.Read())
                 {
                     myInstructorList.Add(FillRecord(myDataReader));
                 }
             }
             myDataReader.Close();
         }
         myConnection.Close();
     }
     return myInstructorList;
 }