📄 see.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;
using System.Data.SqlClient;
public partial class See : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
HeardConfig();
if (!IsPostBack)
{
PersonInfo.Return_SessionPerson();
if (QueryString.Get_CId != null)
{ IsPage_Bind(); }
else
{ JScript.GoHistory("参数错误", -1); }
}
}
#region 页面初始化必需的内容
public void HeardConfig()
{
Header.Title = "销售订单管理系统-查看付款记录";
HeaderTextInfo.GetHeader(this, null);
}
#endregion
public void IsPage_Bind()
{
string cid = QueryString.Get_CId;
string strsql = "select * from Reckoning where CommodityId=" + cid + "";
SqlConnection strcon = new SqlConnection(ConfigurationManager.ConnectionStrings["SellOrder_ConnectionString"].ConnectionString);
strcon.Open();
SqlDataAdapter sda = new SqlDataAdapter(strsql, strcon);
DataSet ds = new DataSet();
sda.Fill(ds, "search");
GridView1.DataSource = ds.Tables["search"];
GridView1.DataKeyNames = new string[] { "id" };
GridView1.DataBind();
}
//单击翻页
protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView1.PageIndex = e.NewPageIndex;
this.IsPage_Bind();
}
//文字绑定
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[0].Text = (e.Row.DataItemIndex + 2).ToString();
e.Row.Cells[3].Text = Convert.ToString(Convert.ToDateTime(e.Row.Cells[3].Text).ToShortDateString());
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -