Exemplo n.º 1
0
        private void btnShowReport_Click(object sender, EventArgs e)
        {
            localhost.Service1 ser = new localhost.Service1();
            bool Validstu;
            bool ValidStudent;

            ser.isValidStudent(txtusername.Text, out Validstu, out ValidStudent);
            BindingSource source = new BindingSource();

            if (Validstu)
            {
                source.DataSource = ser.StudentViewReport(txtusername.Text);
                ser.StudentViewReport(txtusername.Text);
                dataGridView1.DataSource = source;
            }
            else
            {
                MessageBox.Show("Invalid Student");
            }
        }