public void updatecorsework(corsework item, int index) { corsework a = years[selectedyear].getsubject(selectedsubject).getcoursework(index); a.setduedate(item.getduedate()); a.setmarks(item.getmarks()); a.setname(item.getname()); a.setoverallvalue(item.getoverallvalue()); a.settotalmarks(item.gettotalmarks()); updatecoursework(); }
public corseworkedit(ref corsework it,int index) { InitializeComponent(); i = index; thework = it; textBox1.Text = thework.getname(); numericUpDown1.Value = thework.getoverallvalue(); textBox2.Text = thework.getmarks().ToString(); numericUpDown2.Value = (decimal)thework.gettotalmarks(); dateTimePicker1.Value = thework.getduedate(); }
public void addcoursework(corsework item) { corseworks.Add(item); }
public void locadcoursework(ref StreamReader reader) { int numofcorsework = int.Parse(reader.ReadLine()); for (int i = 0; i != numofcorsework; i++) { corsework a = new corsework(); a.load(ref reader); corseworks.Add(a); } }
private void button13_Click(object sender, EventArgs e) { // add coursework if (selectedsubject != -1) { corsework a = new corsework(); years[selectedyear].getsubject(selectedsubject).addcoursework(a); updatecoursework(); } else MessageBox.Show("please select a subject"); }