Пример #1
0
 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();
 }
Пример #2
0
 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();
 }
Пример #3
0
 public void addcoursework(corsework item)
 {
     corseworks.Add(item);
 }
Пример #4
0
 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);
     }
 }
Пример #5
0
 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");
 }