Student/Base/StudentBasePage.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using CC.Common;
namespace Student
{
/// <summary>
/// 学生基本页
/// </summary>
public class StudentBasePage : BasePage
{
public Model.Student studentInfo = null;
/// <summary>
/// 载入判断
/// </summary>
/// <param name="e"></param>
override protected void OnInit(EventArgs e)
{
studentInfo = GetStudentInfo();
if (studentInfo == null)
{
Response.Redirect("/Login.aspx");
}
}
/// <summary>
/// 获取学生信息
/// </summary>
/// <returns></returns>
private Model.Student GetStudentInfo()
{
Model.Student model = null;
HttpCookie cookie = Cookie.Get("student");
if (cookie == null)
{
StudentUtils.RemoveAllCookie();
return null;
}
else
{
string studentNo = cookie.Values["name"];
string studentPwd = cookie.Values["pwd"];
if (studentNo == "" || studentPwd == "")
{
StudentUtils.RemoveAllCookie();
return null;
}
else
{
model = StudentBLL.GetStudentInfo(studentNo);
if (model == null)
{
StudentUtils.RemoveAllCookie();
return null;
}
else
后面还有 17 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。