web/Master/ContentMaster.Master.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using wcf.Model.Query;
using wcf.Biz;
using wcf.Model;
using System.Text;
namespace ExamUI.Master
{
public partial class ContentMaster : System.Web.UI.MasterPage
{
public string PageContent = "<ul>";
public StringBuilder str = new StringBuilder();
protected void Page_Load(object sender, EventArgs e)
{
NewsBiz biz = new NewsBiz();
List<NewsEntity> list = biz.SeachEntity(new NewsQueryEntity());
if (list.Count > 0)
{
for (int i = 1; i < 15; i++)
{
if (i > list.Count)
{
break;
}
else
{
str.Append("<li><a href='../UserPages/NewsInfo.aspx?id=" + list[i - 1].NewsId.ToString() + "'>" + list[i - 1].NewsTitle + "</a></li>");
}
}
}
PageContent += str.ToString() + "</ul>";
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("../UserPages/RegistePage.aspx");
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
if (UserName.Text == "" || Password.Text == "")
{
Response.Write("<script>alert('请输完整用户信息!')</script>");
return;
}
UserQueryEntity query = new UserQueryEntity();
query.UserAccount = UserName.Text.Trim();
query.UserPassword = Password.Text.Trim();
UserBiz biz = new UserBiz();
List<UserEntity> list = biz.SeachEntity(query);
if (list.Count > 0)
{
Session["UserName"] = list[0].UserName;
Session["UserId"] = list[0].UserId;
}
后面还有 9 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
