private void ChangeProgress(object sender, DataGridViewCellEventArgs e) { var student = (Student)studentAGV.CurrentRow.DataBoundItem; var form1 = new Form16(student.Id); form1.ShowDialog(); }
private void AdditionalForStudent(object sender, EventArgs e) { if (studentGV.CurrentRow != null) { var student = (Student)studentGV.CurrentRow.DataBoundItem; var form = new Form4(1, student.Id, 1, this); form.ShowDialog(); if (DeccisionIndex == 0) { var form0 = new Form15(student.Id); form0.ShowDialog(); } if (DeccisionIndex == 1) { var form1 = new Form16(student.Id); form1.ShowDialog(); } if (DeccisionIndex == 2) { this.groupAGV.Visible = true; this.studentAGV.Visible = false; this.groupAGV.DataSource = student.Groups.ToList(); } if (DeccisionIndex == 3) { var form3 = new Form14(1, student.Id); form3.ShowDialog(); } if (DeccisionIndex == 4) { var form4 = new Form14(2, student.Id); form4.ShowDialog(); } } else { var form = new Form4(2, 0, 1, this); form.ShowDialog(); var studentService = new StudentService(_unit, _unit); if (DeccisionIndex == 0) { this.studentAGV.Visible = true; var allStudent = studentService.GetAllStudents(); studentAGV.DataSource = allStudent.ToList(); } if (DeccisionIndex == 1) { } } DeccisionIndex = -1; }