private void comboBoxSelectSemester_SelectedIndexChanged(object sender, EventArgs e)
        {
            comboBoxSelectCourse.Items.Clear();
            comboBoxSelectCourse.Text = "";
            comboBoxSelectStudent.Items.Clear();
            comboBoxSelectStudent.Text = "";


            buttonUploadQuizMark.Visible        = false;
            buttonUploadTermMark.Visible        = false;
            numericUpDownUploadQuizMark.Visible = false;
            numericUpDownUploadTermMark.Visible = false;
            buttonUploadQuiz.Visible            = false;
            buttonUploadTerm.Visible            = false;

            CourseAssignRepository car   = new CourseAssignRepository();
            List <CourseAssign>    cList = new List <CourseAssign>();

            cList = car.GetAllSections(uId, this.comboBoxSelectSemester.Text);

            for (int i = 0; i < cList.Count; i++)
            {
                this.comboBoxSelectCourse.Items.Add(cList[i].AssignedCourse + " " + cList[i].Section);
            }
        }
        private void comboBoxSelectSemester_SelectedIndexChanged(object sender, EventArgs e)
        {
            comboBoxSelectCourse.Items.Clear();
            comboBoxSelectCourse.Text  = "";
            buttonUploadNotice.Enabled = false;

            CourseAssignRepository car   = new CourseAssignRepository();
            List <CourseAssign>    cList = new List <CourseAssign>();

            cList = car.GetAllSections(uId, this.comboBoxSelectSemester.Text);

            for (int i = 0; i < cList.Count; i++)
            {
                this.comboBoxSelectCourse.Items.Add(cList[i].AssignedCourse + " " + cList[i].Section);
            }
        }
Example #3
0
        private void comboBoxSelectSemester_SelectedIndexChanged(object sender, EventArgs e)
        {
            comboBoxSelectCourse.Items.Clear();
            comboBoxSelectCourse.Text = "";
            dataGridView1.DataSource  = null;
            dataGridView1.Visible     = false;

            CourseAssignRepository car   = new CourseAssignRepository();
            List <CourseAssign>    cList = new List <CourseAssign>();

            cList = car.GetAllSections(uId, this.comboBoxSelectSemester.Text);

            for (int i = 0; i < cList.Count; i++)
            {
                this.comboBoxSelectCourse.Items.Add(cList[i].AssignedCourse + " " + cList[i].Section);
            }
        }
Example #4
0
        private void buttonSelect_Click(object sender, EventArgs e)
        {
            CourseAssignRepository car   = new CourseAssignRepository();
            List <CourseAssign>    cList = new List <CourseAssign>();

            cList = car.GetAllSections(uId, this.comboBoxSemester.Text);

            DataTable table = new DataTable();

            table.Columns.Add(" Course Name ", typeof(string));
            table.Columns.Add(" Section ", typeof(string));

            for (int i = 0; i < cList.Count; i++)
            {
                table.Rows.Add(cList[i].AssignedCourse, cList[i].Section);
            }
            dataGridView1.DataSource = table;
        }
Example #5
0
        public FacultyHome(string userId)
        {
            InitializeComponent();

            uId = userId;

            AccountRepository ar = new AccountRepository();
            Account           ac = ar.GetAccount(userId);

            this.labelName.Text = "Welcome " + ac.Name;

            dataGridView1.Visible = false;

            SemesterRepository sr    = new SemesterRepository();
            List <Semester>    sList = new List <Semester>();

            sList = sr.GetAllSemesters();

            for (int i = 0; i < sList.Count(); i++)
            {
                comboBoxSemester.Items.Add(sList[i].Name);
            }
            this.comboBoxSemester.Text = "Spring 17-18";
            this.Controls.Add(this.comboBoxSemester);

            CourseAssignRepository car   = new CourseAssignRepository();
            List <CourseAssign>    cList = new List <CourseAssign>();

            cList = car.GetAllSections(userId, this.comboBoxSemester.Text);

            DataTable table = new DataTable();

            table.Columns.Add(" Course Name ", typeof(string));
            table.Columns.Add(" Section ", typeof(string));
            table.Columns.Add("Schedule ", typeof(string));

            for (int i = 0; i < cList.Count; i++)
            {
                CourseRepository cr = new CourseRepository();
                table.Rows.Add(cList[i].AssignedCourse, cList[i].Section, cr.GetOnlySchedule(comboBoxSemester.Text, cList[i].AssignedCourse, cList[i].Section));
            }
            dataGridView1.DataSource = table;
            dataGridView1.ReadOnly   = true;
        }
Example #6
0
        public ApproveDrop(string userId)
        {
            InitializeComponent();

            uId = userId;
            AccountRepository ar = new AccountRepository();
            Account           ac = ar.GetAccount(userId);

            labelUserName.Text = "Welcome " + ac.Name;

            CourseAssignRepository car    = new CourseAssignRepository();
            List <CourseAssign>    caList = car.GetAllSections(uId, "Spring 17-18");

            for (int i = 0; i < caList.Count; i++)
            {
                comboBoxSelectCourse.Items.Add(caList[i].AssignedCourse + " " + caList[i].Section);
            }

            buttonApproveDrop.Enabled = false;
        }
Example #7
0
        private void comboBoxSemester_SelectedIndexChanged(object sender, EventArgs e)
        {
            CourseAssignRepository car   = new CourseAssignRepository();
            List <CourseAssign>    cList = new List <CourseAssign>();

            cList = car.GetAllSections(uId, this.comboBoxSemester.Text);

            DataTable table = new DataTable();

            table.Columns.Add(" Course Name ", typeof(string));
            table.Columns.Add(" Section ", typeof(string));
            table.Columns.Add(" Schedule ", typeof(string));

            for (int i = 0; i < cList.Count; i++)
            {
                CourseRepository cr = new CourseRepository();
                table.Rows.Add(cList[i].AssignedCourse, cList[i].Section, cr.GetOnlySchedule(comboBoxSemester.Text, cList[i].AssignedCourse, cList[i].Section));
            }
            dataGridView1.DataSource = table;

            dataGridView1.Visible = true;
        }