private void modifyStudent() { m_InputStudInfo.changeFlag = true; m_InputStudInfo.student = m_CurrentStudent; if (m_InputStudInfo.ShowDialog() == DialogResult.OK) { m_CurrentGroup = m_Faculty.currentData; m_CurrentGroup.sort(); m_OldStudSelect = changeItem(ListBox_List_Students, ref m_MaxExtListStud, m_CurrentStudent.surname); showStudentInformation(m_CurrentStudent); } }
private void changeSelectedStudent() { m_InputStudInfo.faculty = m_Faculty; m_InputStudInfo.currentSelectedGroupIndex = getGroupSelect(); m_InputStudInfo.student = m_CurrentGroup.currentData; m_InputStudInfo.changeFlag = true; if (m_InputStudInfo.ShowDialog() == DialogResult.OK) { m_CurrentGroup.currentData = m_CurrentStudent = m_InputStudInfo.student; // TODO: Remake it! m_CurrentGroup.sort(); //ListBox_List_Students.Items.RemoveAt(getStudentSelect()); int select = changeItem(ListBox_List_Students, ref m_MaxExtListStud, CommonFunctions.getStudentString(m_CurrentStudent)); showStudent(); ListBox_List_Students.SelectedIndex = select; ListBox_List_Students_SelectedIndexChanged(this, null); } }
private void changeSelectedGroup() { m_InputNewName.Text = "Change The Name Of The Group"; m_InputNewName.nameOfTheList = m_CurrentGroup.nameList; m_InputNewName.isEdit = true; if (m_InputNewName.ShowDialog() == DialogResult.OK) { m_CurrentGroup.nameList = m_InputNewName.nameOfTheList; // TODO: Remake it! m_Faculty.sort(); //ListBox_List_Groups.Items.RemoveAt(getGroupSelect()); int select = changeItem(ListBox_List_Groups, ref m_MaxExtListGroup, m_CurrentGroup.nameList); int selectStudent = m_CurrentStudent != null && m_CurrentGroup.findValue(m_CurrentStudent) ? changeItem(ListBox_List_Students, ref m_MaxExtListStud, CommonFunctions.getStudentString(m_CurrentStudent)) : -1; showGroups(); ListBox_List_Groups.SelectedIndex = select; //ListBox_List_Groups_SelectedIndexChanged(this, null); if (selectStudent != -1) { ListBox_List_Students.SelectedIndex = selectStudent; } } }