?? js_files.aspx.cs
字號:
?using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class manage_js_JS_Files : Foosun.Web.UI.ManagePage
{
protected void Page_Load(object sender, EventArgs e)
{
this.PageNavigator1.OnPageChange += new PageChangeHandler(PageNavigator1_PageChange);
Response.CacheControl = "no-cache";//設置頁面無緩存
if (Request.Form["Option"] != null && Request.Form["Option"].Equals("RemoveJS") && Request.Form["ID"] != null)
{
Foosun.CMS.NewsJS nj = new Foosun.CMS.NewsJS();
try
{
int id = int.Parse(Request.Form["id"]);
nj.RemoveNews(id);
Response.Write("1%成功移除JS對該新聞的調用!");
}
catch(Exception ex)
{
Response.Write("0%" + ex.Message);
}
Response.End();
return;
}
if (!IsPostBack)
{
if (this.Request.QueryString["JSID"] == null)
PageError("缺少必要的參數!","");
this.HidJsID.Value = int.Parse(Request.QueryString["JSID"]).ToString();
DataListBind(1);
}
}
protected void PageNavigator1_PageChange(object sender, int PageIndex)
{
DataListBind(PageIndex);
}
/// <summary>
/// 列表
/// </summary>
/// <param name="PageIndex"></param>
/// code by chenzhaohui
protected void DataListBind(int PageIndex)
{
int id = int.Parse(this.HidJsID.Value);
int RcdCount = 0, PgCount = 0;
Foosun.CMS.NewsJS nj = new Foosun.CMS.NewsJS();
DataTable tb = nj.GetJSFilePage(PageIndex, PAGESIZE, out RcdCount, out PgCount, id);
this.PageNavigator1.RecordCount = RcdCount;
this.PageNavigator1.PageCount = PgCount;
this.PageNavigator1.PageIndex = PageIndex;
this.RptData.DataSource = tb;
this.RptData.DataBind();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -