39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace Mtxfw.shop
|
|
{
|
|
public partial class news : System.Web.UI.Page
|
|
{
|
|
public String strTitle = "公司新闻";
|
|
public Mtxfw.DAL.Article daoArt = new Mtxfw.DAL.Article();
|
|
public Mtxfw.Utility.Config config = new Mtxfw.Utility.Config();
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
Data_Bind();
|
|
}
|
|
}
|
|
protected void Data_Bind()
|
|
{
|
|
int t = 0, ParentID=9;
|
|
if (!String.IsNullOrEmpty(Request.QueryString["t"]))
|
|
{
|
|
t = int.Parse(Request.QueryString["t"]);
|
|
}
|
|
if (t == 1)
|
|
{
|
|
ParentID = 11;
|
|
strTitle = "行业新闻";
|
|
}
|
|
MyPager.PageSize = 20;
|
|
MyPager.RecordCount = daoArt.GetCount("ParentID=" + ParentID);
|
|
Mtxfw.Utility.Tools.ToBind(Repeater1, daoArt.GetPager(MyPager, "", "ParentID=" + ParentID + " Order by AddTime desc"));
|
|
|
|
}
|
|
}
|
|
} |