PersonInfo/BrowNewsList.aspx.cs
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Configuration;
namespace EasyExam.PersonInfo
{
/// <summary>
/// BrowNewsList 的摘要说明。
/// </summary>
public partial class BrowNewsList : System.Web.UI.Page
{
protected int RowNum=0;
string strSql="";
string myUserID="";
string myLoginID="";
PublicFunction ObjFun=new PublicFunction();
int intUserID=0;
#region//*******初始化信息********
protected void Page_Load(object sender, System.EventArgs e)
{
try
{
myUserID=Session["UserID"].ToString();
myLoginID=Session["LoginID"].ToString();
intUserID=Convert.ToInt32(myUserID);
}
catch
{
}
if (myLoginID=="")
{
Response.Redirect("../Login.aspx");
}
strSql="select a.NewsID,a.NewsTitle,a.NewsContent,a.BrowNumber,a.CreateDate,b.LoginID as CreateLoginID from NewsInfo a LEFT OUTER JOIN UserInfo b ON a.CreateUserID=b.UserID where (a.BrowAccount=1 or (a.BrowAccount=2 and Exists(select * from NewsUser c where c.NewsID=a.NewsID and c.UserID="+intUserID+")) or Exists(select * from UserInfo d,DeptInfo e,NewsUser f where d.UserID="+intUserID+" and d.DeptID=e.DeptID and e.DeptID=f.DeptID and f.NewsID=a.NewsID)) order by a.NewsID desc";
if (!IsPostBack)
{
if (DataGridNews.Attributes["SortExpression"] == null)
{
DataGridNews.Attributes["SortExpression"] = "NewsID";
DataGridNews.Attributes["SortDirection"] = "DESC";
}
ShowData(strSql);
}
}
#endregion
#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
后面还有 197 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
