Esempio n. 1
0
        void listAllCourses()
        {
            Console.WriteLine();
            Console.WriteLine("LISTING ALL COURSES ");
            ICollection <Course> courses = controller.findAllCourses();

            foreach (Course c in courses)
            {
                Console.WriteLine(c.Id + ", " + c.Name + ", " + c.Description);
            }
        }
Esempio n. 2
0
        private void refrescar()
        {
            ICollection <Course> cursos;

            cursos = businessControl.findAllCourses();
            BindingList <object> bindingList = new BindingList <object>();

            foreach (Course c in cursos)
            {
                bindingList.Add(new
                {
                    id_prop          = c.Id,
                    nombre_prop      = c.Name,
                    descripcion_prop = c.Description
                });
            }
            altaCursoEnlace.DataSource = bindingList;
        }
Esempio n. 3
0
        private void refrescar()
        {
            ICollection <Course> courses;

            courses = businessControl.findAllCourses();
            //ICollection<TaughtCourse> = Ta;


            BindingList <object> binding = new BindingList <object>();
            string nom   = "";
            string fecha = "";
            int    id;

            foreach (Course c in courses)
            {
                nom = c.Name;
                foreach (TaughtCourse t in c.TaughtCourses)
                {
                    id    = t.Id;
                    fecha = t.StartDateTime.ToString();
                    if (t.StartDateTime > DateTime.Now)
                    {
                        binding.Add(new
                        {
                            sc_ID          = t.Id,
                            sc_nombre      = c.Name,
                            sc_descripcion = c.Description,
                            sc_fi          = t.StartDateTime
                        });
                    }
                    //  }
                }

                sc_binding.DataSource = binding;
            }
        }
        private void AddCourseForm_Load(object sender, EventArgs e)
        {
            ICollection <Course> courses = businessController.findAllCourses();

            taughtCourseCB.DataSource = courses;
        }