Пример #1
0
        private void btmatch_Click(object sender, EventArgs e)//第一轮一键匹配
        {
            ad_ServicesBLL bLL = new ad_ServicesBLL();
            DialogResult   dr  = MessageBox.Show(bLL.match(), "提示", MessageBoxButtons.OKCancel);

            if (dr == DialogResult.OK)
            {
                ViewResults cform = new ViewResults(); //实例化一个子窗口
                                                       //设置子窗口不显示为顶级窗口
                cform.TopLevel = false;
                //设置子窗口的样式,没有上面的标题栏
                cform.FormBorderStyle = FormBorderStyle.None;
                //填充
                cform.Dock = DockStyle.Fill;
                //清空控件
                this.Controls.Clear();
                //加入控件
                this.Controls.Add(cform);
                //让窗体显示
                cform.Show();
                //跳转页面
            }
            else
            {
                //
            }
            //获取学生的对象数组
            sx_student[] sx_Students = new sx_student[50];
            sx_Students = Keepinformation.sx_Students;
            //获取教师的对象数组
            sx_teacher[] sx_Teachers = new sx_teacher[20];
            sx_Teachers = Keepinformation.sx_Teachers;
        }