public FacultyForm()
 {
     InitializeComponent();
     RegistrationEntities = new RegistrationEntities();
     RegistrationEntities.Students.Load();
     FacultyNameListBox.DataSource    = RegistrationEntities.Faculties.Local.ToBindingList();
     FacultyNameListBox.DisplayMember = nameof(Faculty.FacultyInfo);
 }
 public EnrollmentForm()
 {
     InitializeComponent();
     RegistrationEntities = new RegistrationEntities();
     RegistrationEntities.Enrollments.Load();
     EnrollListBox.DataSource    = RegistrationEntities.Enrollments.Local.ToBindingList();
     EnrollListBox.DisplayMember = nameof(Enrollment.EnrollmentInfo);
 }
 public MajorForm()
 {
     InitializeComponent();
     MajorEntities = new RegistrationEntities();
     MajorEntities.Majors.Load();
     UpdateTable();
     HideComponents();
 }
 public CourseForm()
 {
     InitializeComponent();
     RegistrationEntities = new RegistrationEntities();
     RegistrationEntities.Courses.Load();
     coursesListBox.DataSource    = RegistrationEntities.Courses.Local.ToBindingList();
     coursesListBox.DisplayMember = nameof(Course.CoursesInfo);
 }
Пример #5
0
 public MajorForm()
 {
     InitializeComponent();
     RegistrationEntities = new RegistrationEntities();
     RegistrationEntities.Majors.Load();
     MajorNameListBox.DataSource    = RegistrationEntities.Majors.Local.ToBindingList();
     MajorNameListBox.DisplayMember = nameof(Major.NameAndCollege);
     SetUpCollegeNames();
 }
Пример #6
0
        public FacultyForm()
        {
            InitializeComponent();
            FacultyRegistration = new RegistrationEntities();
            FacultyRegistration.Faculties.Load();


            updateTable();

            MakeHidden();
        }
Пример #7
0
 public CourseForm()
 {
     InitializeComponent();
     RegistrationEntitiesCourse = new RegistrationEntities();
     RegistrationEntitiesCourse.Courses.Load();
     viewListBox.DataSource    = RegistrationEntitiesCourse.Courses.Local.ToBindingList();
     viewListBox.DisplayMember = nameof(Course.CourseDisplay);
     dataGrid.DataSource       = RegistrationEntitiesCourse.Courses.ToList <Course>();
     dataGrid.Visible          = false;
     reset();
 }
Пример #8
0
        public SectionForm()
        {
            InitializeComponent();
            RegistrationEntitiesSection = new RegistrationEntities();
            RegistrationEntitiesSection.Sections.Load();
            viewListBox.DataSource    = RegistrationEntitiesSection.Sections.Local.ToBindingList();
            viewListBox.DisplayMember = nameof(Section.SectionDisplay);
            dataGridView.DataSource   = RegistrationEntitiesSection.Sections.ToList <Section>();

            reset();
        }
 public StudentForm()
 {
     InitializeComponent();
     studentEntities      = new RegistrationEntities();
     crudList.Enabled     = false;
     nameBox.Enabled      = false;
     majorBox.Enabled     = false;
     deleteBox.Enabled    = false;
     submitButton.Enabled = false;
     searchBox.Enabled    = false;
     searchButton.Enabled = false;
 }
Пример #10
0
 public EnrollmentsForm()
 {
     enrollmentEntities = new RegistrationEntities();
     InitializeComponent();
     crudList.Enabled     = false;
     studentBox.Enabled   = false;
     gradeBox.Enabled     = false;
     deleteBox.Enabled    = false;
     submitButton.Enabled = false;
     searchBox.Enabled    = false;
     searchButton.Enabled = false;
 }
 public CourseForm()
 {
     InitializeComponent();
     courseEntities       = new RegistrationEntities();
     crudList.Enabled     = false;
     nameBox.Enabled      = false;
     numberBox.Enabled    = false;
     creditsBox.Enabled   = false;
     deptBox.Enabled      = false;
     deleteBox.Enabled    = false;
     submitButton.Enabled = false;
     searchBox.Enabled    = false;
     searchButton.Enabled = false;
 }
 public SectionForm()
 {
     InitializeComponent();
     sectionEntities      = new RegistrationEntities();
     crudList.Enabled     = false;
     courseBox.Enabled    = false;
     facultyBox.Enabled   = false;
     timeBox.Enabled      = false;
     dayBox.Enabled       = false;
     semesterBox.Enabled  = false;
     deleteBox.Enabled    = false;
     submitButton.Enabled = false;
     searchBox.Enabled    = false;
     searchButton.Enabled = false;
 }
        public StudentForm()
        {
            InitializeComponent();

            studentRegistration = new RegistrationEntities();
            studentRegistration.Students.Load();
            studentRegistration.Majors.Load();

            Majors_List.DataSource    = studentRegistration.Majors.Local.ToBindingList();
            Majors_List.DisplayMember = nameof(Major.TotalName);

            updateMajorList();
            updateTable();
            MakeHidden();
        }
Пример #14
0
        RegistrationEntities RegistrationEntities; //{ get; set; }//this like has all the info from the db and communicates or something idk.
        public Form1()
        {
            InitializeComponent();
            RegistrationEntities = new RegistrationEntities();

            TableSelector.Items.Add("Students");
            TableSelector.Items.Add("Sections");
            TableSelector.Items.Add("Majors");
            TableSelector.Items.Add("Faculty");
            TableSelector.Items.Add("Enrollments");
            TableSelector.Items.Add("Courses");

            TableSelector2.Items.Add("Enrollments by Student");
            TableSelector2.Items.Add("Sections by Semester");
            TableSelector2.Items.Add("Students by Major");
            TableSelector2.Items.Add("Courses by Department");
            TableSelector2.Items.Add("Enrollments by Semester");
            TableSelector2.Items.Add("Section by Faculty Name");
        }
Пример #15
0
        public StudentForm()
        {
            InitializeComponent();
            RegistrationEntities = new RegistrationEntities();
            RegistrationEntities.Students.Load();
            studentsList.DataSource    = RegistrationEntities.Students.Local.ToBindingList();
            studentsList.DisplayMember = nameof(Student.BetterDisplay);
            RegistrationEntities.Majors.Load();
            majorsListBox.DataSource    = RegistrationEntities.Majors.Local.ToBindingList();
            majorsListBox.DisplayMember = nameof(Major.NameAndCollege);


            //updateStudentsList();
            //updateMajorsList();

            var erics = RegistrationEntities.Students.Where(s => s.Name.StartsWith("E")).ToList();

            erics = erics.Where(s => s.Major.College == "CECS").ToList();
            foreach (var eric in erics)
            {
                ericsClassesLabel.Text += $"{eric.Name} - {eric.Major.Name} - {eric.Major.College}{Environment.NewLine}";
            }

            // linq to ojbects without lambda extensions syntax

            /*
             * var query = from Student student in RegistrationEntities.Students
             *          where student.Name == "Eric"
             *          select student;
             *
             * foreach( var result in query )
             * {
             *  result.
             * }
             */

            //RegistrationEntities.Students.Remove()
        }
 public CourseAddForm(RegistrationEntities d)
 {
     InitializeComponent();
     RegistrationEntities = d;
 }
 public MajorForm()
 {
     InitializeComponent();
     MajorEntities     = new RegistrationEntities();
     deleteBox.Enabled = false;
 }
        public StudentAddForm()
        {
            InitializeComponent();

            RegistrationEntities = new RegistrationEntities();
        }
        public StudentAddForm(RegistrationEntities entities)
        {
            InitializeComponent();

            RegistrationEntities = entities;
        }
        public EnrollmentForm()
        {
            InitializeComponent();
            EnrollmentEntities = new RegistrationEntities();
            EnrollmentEntities.Enrollments.Load();
            UpdateTable();
            HideComponents();


            //******************************************* START OF INITILIZATION TEST. PLEASE DELETE BEFORE FINAL TURN IN****************************************************//
            //Section newSection = new Section
            //{
            //    Id = 1,
            //    CourseID = 1,
            //    FacultyID = 1,
            //    Day = "Wednesday",
            //    Time = "9:00AM",
            //    Semester = "Fall"
            //};
            //Section newSection1 = new Section
            //{
            //    Id = 1,
            //    CourseID = 1,
            //    FacultyID = 1,
            //    Day = "Wednesday",
            //    Time = "9:00AM",
            //    Semester = "Summer"
            //};

            //Student newStudent = new Student
            //{
            //    Id = 1,
            //    Name = "Avian",
            //    MajorID = 1
            //};

            //Faculty newFaculty = new Faculty
            //{
            //    Id = 1,
            //    Name = "Eric",
            //    PhoneNumber = "248-880-2020"
            //};

            //Course newCourse = new Course
            //{
            //    Id = 1,
            //    Name = "Intro C#",
            //    Number = "297",
            //    Credits = 4,
            //    Department = "CECS"
            //};

            //EnrollmentEntities.Sections.Add(newSection);
            //EnrollmentEntities.Sections.Add(newSection1);
            //EnrollmentEntities.Students.Add(newStudent);
            //EnrollmentEntities.Faculties.Add(newFaculty);
            //EnrollmentEntities.Courses.Add(newCourse);

            //************************************** END OF INITILIZATION TESTS***********************************//

            EnrollmentEntities.SaveChanges();
        }
 public FacultyAddForm(RegistrationEntities d)
 {
     InitializeComponent();
     RegistrationEntities = d;
 }
 public FacultyForm()
 {
     InitializeComponent();
     facultyEntities   = new RegistrationEntities();
     deleteBox.Enabled = false;
 }
 public Form1()
 {
     InitializeComponent();
     registrationEntities = new RegistrationEntities();
 }
Пример #24
0
 public EnrollmentAddForm(RegistrationEntities d)
 {
     InitializeComponent();
     RegistrationEntities = d;
 }