예제 #1
0
        public void RowChanged(int row)
        {
            // instructor
            if (security_level == 1)
            {
                if (sub_state == 0) // section
                {
                    current_section = section_view.GetRow(row);

                    if (current_section != null)
                    {
                        main_form.sectionLink.Text = current_section.ToString();
                    }
                    else
                    {
                        main_form.sectionLink.Text = "";
                    }
                }
                else if (sub_state == 2) // assignment
                {
                    current_assign = inst_assign_view.GetRow(row);

                    if (current_assign != null)
                    {
                        main_form.assignLink.Text = current_assign.ToString();
                    }
                    else
                    {
                        main_form.assignLink.Text = "";
                    }
                }

                UpdateState();
            }
        }
예제 #2
0
        public cInstSectionViewRow GetRow(int row)
        {
            if (row < dlist.Count)
            {
                cInstSectionViewRow d = (cInstSectionViewRow)dlist[row];
                return(d);
            }

            return(null);
        }
예제 #3
0
        public void Logout()
        {
            CurrentYear = DateTime.Now.Year;
            CurrentSem  = "Fall";

            current_view    = null;
            current_id      = -1;
            current_login   = null;
            current_section = null;
            current_assign  = null;
            sub_state       = 0;
            UpdateSecurityLevel(-1);
        }
예제 #4
0
        // for row selection
        public int GetIndex(int id)
        {
            for (int i = 0; i < dlist.Count; i++)
            {
                cInstSectionViewRow d = (cInstSectionViewRow)dlist[i];
                if (d != null)
                {
                    if (id == d.ID)
                    {
                        return(i);
                    }
                }
            }

            return(0);
        }
예제 #5
0
        public void RowChanged(int row)
        {
            // instructor
            if (security_level == 1)
            {
                if (sub_state == 0) // section
                {
                    current_section = section_view.GetRow(row);

                    if(current_section != null)
                        main_form.sectionLink.Text = current_section.ToString();
                    else
                        main_form.sectionLink.Text = "";
                }
                else if (sub_state == 2) // assignment
                {
                    current_assign = inst_assign_view.GetRow(row);

                    if (current_assign != null)
                        main_form.assignLink.Text = current_assign.ToString();
                    else
                        main_form.assignLink.Text = "";
                }

                UpdateState();
            }
        }
예제 #6
0
        public void Logout()
        {
            CurrentYear = DateTime.Now.Year;
            CurrentSem = "Fall";

            current_view = null;
            current_id = -1;
            current_login = null;
            current_section = null;
            current_assign = null;
            sub_state = 0;
            UpdateSecurityLevel(-1);
        }