private void ParentStudentsWindow_Load(object sender, EventArgs e) { students = ParentDAL.GetParentStudents(this.ParentID); //bind binging navigator to data grid var bs = new BindingSource(); bs.DataSource = students.DefaultView; bindingNavigator1.BindingSource = bs; this.studentsDataGridView.DataSource = bs; this.toolStripParentID.Text = "Parent ID: " + this.ParentID; }
private void ChildOverallProgress_Load(object sender, EventArgs e) { students = ParentDAL.GetParentStudents(this.ParentID); //populate combo box STUDENTS foreach (DataRow dr in students.Rows) { string studID = dr[0].ToString(); string lastName = dr[1].ToString(); string firstName = dr[2].ToString(); string patronymic = dr[3].ToString(); comboChild.Items.Add( string.Format("{0} {1} {2} {3}", studID, lastName, firstName, patronymic)); } if (comboChild.Items.Count > 0) { comboChild.SelectedItem = comboChild.Items[0]; } else { comboChild.Enabled = false; } }
private void ChildProgressWindow_Load(object sender, EventArgs e) { students = ParentDAL.GetParentStudents(this.ParentID); //populate combo box STUDENTS foreach (DataRow dr in students.Rows) { string studID = dr[0].ToString(); string lastName = dr[1].ToString(); string firstName = dr[2].ToString(); string patronymic = dr[3].ToString(); comboChild.Items.Add( string.Format("{0} {1} {2} {3}", studID, lastName, firstName, patronymic)); } if (comboChild.Items.Count > 0) { comboChild.SelectedItem = comboChild.Items[0]; } else { comboChild.Enabled = false; } //populate combo box SUBJECTS UpdateSubjectsComboBox(); // Set palette. this.chartProgress.Palette = ChartColorPalette.SeaGreen; // Set title. this.chartProgress.Titles.Add("Student progress"); IsLoaded = true; }