private void button1_Click(object sender, EventArgs e)
        {
            TeacherUploadReport r = new TeacherUploadReport();

            this.Hide();
            r.Show();
        }
Example #2
0
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            var item = dataGridView1.Rows[e.RowIndex].Cells[1].Value;

            localhost.Service1 service = new localhost.Service1();
            bool isvalidsub;
            bool isvalidsubject;

            service.isTeacherValidSubject(comboBox1.Text, out isvalidsubject, out isvalidsub);
            if (isvalidsubject)
            {
                TeacherUploadReport r = new TeacherUploadReport(comboBox1.Text);
                this.Hide();
                r.Show();
            }
            else
            {
                MessageBox.Show("Teacher has not registered this subject, so he has no authority to update any result.");
            }
        }