WEB/Demo.aspx.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using Model;
using System.Data;
using BLL;

namespace WEB
{
    public partial class Demo : System.Web.UI.Page
    {
        TeacherBll teacherBll = new TeacherBll();
        StuBll stuBll = new StuBll();

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnLogion_Click(object sender, EventArgs e)
        {
            //string name = this.txtName.Text;
            //string pwd = this.txtPwd.Text;
            //if (FormsAuthentication.Authenticate(name, pwd))
            //{
            //    FormsAuthentication.RedirectFromLoginPage(name, false);
            //}
            //else
            //{
            //    ClientScript.RegisterClientScriptBlock(this.GetType(), "demo", "alert('用户名或密码错误,请重新输入!!');", true);
            //}

        }

        protected void submit_Click(object sender, ImageClickEventArgs e)
        {
            //验证教师登录
           Teacher t = new Teacher();
           t.teaName = this.UserName.Text;
           t.teaPwd = this.Password.Text;
           List<Model.Teacher> result = teacherBll.TeacherLogions(t.teaName, t.teaPwd);
           StuInfo s = new StuInfo();
           s.stuName = this.UserName.Text;
           s.stuPwd = this.Password.Text;
           List<Model.StuInfo> stuInfo = stuBll.StudentLogions(s.stuName, s.stuPwd);
           foreach (var i in result)
           {
               t.teaId = i.teaId;
           }

           foreach (var a in stuInfo)
           {
               s.stuId = a.stuId;
           }

           int stuId = s.stuId;
后面还有 31 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。