C#高职计算机导论考试系统设计与实现(15)_毕业论文

毕业论文移动版

毕业论文 > 计算机论文 >

C#高职计算机导论考试系统设计与实现(15)


                    // 记录登陆用户名和登陆类型
                    UserHelper.loginId = txtLoginId.Text;
                    UserHelper.loginType = cboLoginType.Text;

                    switch (cboLoginType.Text )
                    {
                        case "教师":
                            // 如果是教师,转到教师窗体
                            TeacherForm teacherForm = new TeacherForm();
                            teacherForm.Show();
                            this.Visible = false;
                            break;
                        case "学生":
                            // 如果是学生,转到学生窗体
                            StudentForm studentForm = new StudentForm();
                            studentForm.Show();
                            this.Visible = false;
                            break;
                    }
                }                
                else    // 验证合法用户失败,给出提示
                {
                    MessageBox.Show(message,"登陆提示",
                         MessageBoxButtons.OK,MessageBoxIcon.Warning);
                }                (责任编辑:qin)