示例#1
0
 public int AddStu(Stusent stu)
 {
     if (amount > 50)
     {
         MessageBox.Show("the array is full");
         return(0);
     }
     student[amount] = stu;
     amount++;
     return(1);
 }
示例#2
0
 public int AddStu(Stusent stu)
 {
     if (amount > 50)
     {
         MessageBox.Show("the array is full");
         return 0;
     }
     student[amount] = stu;
     amount++;
     return 1;
 }
示例#3
0
        private void buttonAdd_Click(object sender, EventArgs e)
        { 
            //String Id, Name, Class;
            //float  chinese, math, english;
            //float all;
            Stusent student=new Stusent();
            student.id = Convert.ToString(textBoxID.Text);
            student.name = Convert.ToString(textBoxName.Text);
            student.Class = Convert.ToString(textBoxClass.Text);

            student.chinese = Convert.ToSingle(textBoxChinese.Text);
            student.math = Convert.ToSingle(textBoxMath.Text);
            student.english = Convert.ToSingle(textBoxEnglish.Text);

            student.all = student.chinese + student.english + student.math;
            int i = studentlist.AddStu(student);
            labelAllpoint.Text = Convert.ToString(i);

          }
示例#4
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            //String Id, Name, Class;
            //float  chinese, math, english;
            //float all;
            Stusent student = new Stusent();

            student.id    = Convert.ToString(textBoxID.Text);
            student.name  = Convert.ToString(textBoxName.Text);
            student.Class = Convert.ToString(textBoxClass.Text);

            student.chinese = Convert.ToSingle(textBoxChinese.Text);
            student.math    = Convert.ToSingle(textBoxMath.Text);
            student.english = Convert.ToSingle(textBoxEnglish.Text);

            student.all = student.chinese + student.english + student.math;
            int i = studentlist.AddStu(student);

            labelAllpoint.Text = Convert.ToString(i);
        }