private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            localhost.Service1 ser    = new localhost.Service1();
            BindingSource      source = new BindingSource();

            ser.TeacherShowSubject(txtUserName.Text);
            source.DataSource        = ser.TeacherShowSubject(txtUserName.Text);
            dataGridView1.DataSource = source;
        }
        private void btnViewSubject_Click(object sender, EventArgs e)
        {
            localhost.Service1 ser = new localhost.Service1();
            bool          isvalidTeacherResult;
            bool          isValidTeacherResultSpecified;
            BindingSource source = new BindingSource();

            ser.isValidTeacher(txtUserName.Text, out isvalidTeacherResult, out isValidTeacherResultSpecified);
            if (isvalidTeacherResult)
            {
                ser.TeacherShowSubject(txtUserName.Text);
                source.DataSource        = ser.TeacherShowSubject(txtUserName.Text);
                dataGridView1.DataSource = source;
            }
            else
            {
                MessageBox.Show("Invalid Teacher");
            }
        }