private void AddToLabelAllVak() { Vak codeVak = allVakLst[cbAllVak.SelectedIndex]; string code = codeVak.VakCode; lblAllVak.Text = codeVak.ToString(); }
private void btnAddResult_Click(object sender, EventArgs e) { decimal grade = gradeValueNum.Value; Vak codeVak = allVakLst[cbAllVak.SelectedIndex]; currentVakResult = new Result(codeVak, grade); gradeValueNum.Value = 0; }
private void btnResults_Click(object sender, EventArgs e) { Vak codeVak = allVakLst[cbAllVak.SelectedIndex]; Student student = allStudentsLst[lbAllStudents.SelectedIndex]; decimal grade = student.GetGrade(codeVak); lblResult.Text = "Grade for this Vak: " + grade.ToString(); }
internal void AddVakToCB(Vak vak) { cbAllVak.Items.Clear(); allVakLst.Add(vak); foreach (Vak n in allVakLst) { cbAllVak.Items.Add(n.GetVakName); } }
public decimal GetGrade(Vak vak) { foreach (Vak n in allVakList) { if (n == vak) { return(GetGradeVak); } } return(0); }
private void btnAddVak_Click(object sender, EventArgs e) { string name = tbVakName.Text; string code = tbVakCode.Text; int hours = Convert.ToInt32(tbStudyHours.Text); if (name != "VakName" && code != "VakCode" && tbStudyHours.Text != "StudyHours") { newVak = new Vak(name, code, hours); studentForm.AddVakToCB(newVak); tbVakName.Text = "VakName"; tbVakCode.Text = "VakCode"; tbStudyHours.Text = "StudyHours"; } else { MessageBox.Show("Please fill in all textboxes"); } }
public Result(Vak vak, decimal grade) { this.GetGradeVak = grade; this.currentVak = vak; allVakList.Add(currentVak); }
public void AddGrade(Vak vak, decimal grade) { studentResult = new Result(vak, grade); }
public decimal GetGrade(Vak vak) { return(studentCurrentResult.GetGrade(vak)); }