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(); } }
public cInstSectionViewRow GetRow(int row) { if (row < dlist.Count) { cInstSectionViewRow d = (cInstSectionViewRow)dlist[row]; return(d); } return(null); }
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); }
// 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); }
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(); } }