📄 updatesupply.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 updatesupply : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GridViewBind();
}
}
private void GridViewBind()
{
order supplybind = new order();
DataSet ds = supplybind.selectsupply();
this.GridView1.DataSource = ds;
this.GridView1.DataBind();
}
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
GridViewBind();
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
}
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
Label lblname = (Label)GridView1.Rows[e.RowIndex].FindControl("Label1");
TextBox txtLxr = (TextBox)GridView1.Rows[e.RowIndex].Cells[1].FindControl("TextBox1");
TextBox txtpho = (TextBox)GridView1.Rows[e.RowIndex].Cells[2].FindControl("TextBox2");
TextBox txtgdnum = (TextBox)GridView1.Rows[e.RowIndex].Cells[3].FindControl("TextBox3");
TextBox txtfax = (TextBox)GridView1.Rows[e.RowIndex].Cells[4].FindControl("TextBox4");
order update = new order();
update.updatesupply(lblname.Text, txtLxr.Text, txtpho.Text, txtgdnum.Text, txtfax.Text);
GridView1.EditIndex = -1;
GridViewBind();
GridView1.EditIndex = -1;
}
protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
GridView1.EditIndex = -1;
GridViewBind();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -