positon_info.aspx.cs
来自「企业网站前台后台源程序,用于大中小型企业网站后台程序开发」· CS 代码 · 共 185 行
CS
185 行
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
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 BLL;
using Socut.Data;
namespace Websystem.admin
{
/// <summary>
/// Positon_info 的摘要说明。
/// </summary>
public class Positon_info : System.Web.UI.Page
{
protected user us=new user();
protected other ot=new other();
protected System.Web.UI.WebControls.DataGrid MyDataGrid;
protected System.Web.UI.WebControls.Label lblPageCount;
protected System.Web.UI.WebControls.Label lblCurrentIndex;
protected System.Web.UI.WebControls.LinkButton btnFirst1;
protected System.Web.UI.WebControls.LinkButton btnPrev1;
protected System.Web.UI.WebControls.LinkButton btnNext1;
protected System.Web.UI.WebControls.LinkButton btnLast1;
protected MagicAjax.UI.Controls.AjaxPanel AjaxPanel1;
// protected positon po=new positon();
private void Page_Load(object sender, System.EventArgs e)
{
other ot = new other();
// if(ot.isDefined("TYPE"))
// this.Label1.Text=Request.QueryString["TYPE"].ToString();
// ot.chk_user();
// btnFirst1.Text = "最首页";
// btnPrev1.Text = "前一页";
// btnNext1.Text = "下一页";
// btnLast1.Text = "最后页";
// if(!this.IsPostBack)
// BindGrid();
//
//
//
// if(ot.isDefined("delid"))
// {
// string[] rowid=Request.Form["delid"].ToString().Split(new char[]{','});
// for(int i=0;i<rowid.Length;i++)
// {
//
// delrow(Convert.ToInt32(rowid[i]));
// }
// Response.Redirect("Positon_info.aspx",true);
//
// }
}
//删除记录
// protected void delrow(int id)
// {
// CData myData=new CData();
//
// string sql="delete from BU_MERCHANDISE where ID="+id;
// myData.GetExecuteNonQuery(sql);
// sql="delete from MESSAGE_again where MESSAGE_id="+id;
// try
// {
// myData.GetExecuteNonQuery(sql);
// }
// catch
// {
//
// }
//
// }
// protected void BindGrid()
// {
// DataSet ds=new DataSet();
// CData myData=new CData();
// string sql = "";
// sql = "select id,MERCHANDISE,THESORTID,BRANDID,MODEL,BEWRITE,EXPONENT,ISOPEN,ISAVAILABILITY,BROWSEDEGREE,inputtime from BU_MERCHANDISE order by id desc";
// ds = myData.GetDataSet(sql, 0, 0, "Document");
// this.MyDataGrid.DataSource = ds.Tables["Document"].DefaultView;
// MyDataGrid.DataBind();
// ShowStats();
//
// }
//
// protected void BindGrid(int flog)
// {
// DataSet ds=new DataSet();
// CData myData=new CData();
// string sql = "";
// if(flog==0)
// sql = "select id,title,inputtime,user_name,user_EMAIL,USER_TEL from MESSAGE where (id NOT IN (Select MESSAGE_id From MESSAGE_again)) order by id desc";
// else
// sql = "select id,title,inputtime,user_name,user_EMAIL,USER_TEL from MESSAGE,MESSAGE_again where id=MESSAGE_id order by id desc";
// ds = myData.GetDataSet(sql, 0, 0, "Document");
// this.MyDataGrid.DataSource = ds.Tables["Document"].DefaultView;
// MyDataGrid.DataBind();
// ShowStats();
//
// }
//
//
// private void ShowStats()
// {
// lblCurrentIndex.Text = "第 " + (MyDataGrid.CurrentPageIndex + 1).ToString() + " 页";
// lblPageCount.Text = "总共 " + MyDataGrid.PageCount.ToString() + " 页";
// }
//
// public void PagerButtonClick(object sender, EventArgs e)
// {
// string arg = ((LinkButton)sender).CommandArgument.ToString();
// switch(arg)
// {
// case "next":
// if (MyDataGrid.CurrentPageIndex < (MyDataGrid.PageCount - 1))
// {
// MyDataGrid.CurrentPageIndex += 1;
// }
// break;
// case "prev":
// if (MyDataGrid.CurrentPageIndex > 0)
// {
// MyDataGrid.CurrentPageIndex -= 1;
// }
// break;
// case "last":
// MyDataGrid.CurrentPageIndex = (MyDataGrid.PageCount - 1);
// break;
// default:
// MyDataGrid.CurrentPageIndex = System.Convert.ToInt32(arg);
// break;
// }
// BindGrid();
// ShowStats();
// }
//
//
// public void MyDataGrid_Page(object sender, DataGridPageChangedEventArgs e)
// {
// int startIndex ;
// startIndex = MyDataGrid.CurrentPageIndex * MyDataGrid.PageSize;
// MyDataGrid.CurrentPageIndex = e.NewPageIndex;
// BindGrid();
// ShowStats();
// }
// private void MyDataGrid_SelectedIndexChanged(object sender, System.EventArgs e)
// {
//
// }
#region Web 窗体设计器生成的代码
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?