⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 travelmodify.aspx.cs

📁 登陆界面
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Travel_travelModify : System.Web.UI.Page
{
    DateTime now;
    protected void Page_Load(object sender, EventArgs e)
    {
        now = DateTime.Now;
        
        dataBind();
    }
    void dataBind()
    {
        GridView1.DataSource = new corInfMan.BLL.BLLTravel().travelTable(User.Identity.Name);
        GridView1.DataBind();
    }
    protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
        string dts = ((TextBox)GridView1.Rows[e.RowIndex].Cells[1].FindControl("TextBox1")).Text;
        string dte = ((TextBox)GridView1.Rows[e.RowIndex].Cells[2].FindControl("TextBox2")).Text;
        string money = ((TextBox)GridView1.Rows[e.RowIndex].Cells[3].FindControl("TextBox3")).Text;
        string reason = ((TextBox)GridView1.Rows[e.RowIndex].Cells[5].FindControl("TextBox6")).Text;
        new corInfMan.BLL.BLLTravel().updateTravel(User.Identity.Name, dts, dte, money, reason);
        GridView1.EditIndex = -1;
        dataBind();
    }
    protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
    {
        this.GridView1.EditIndex = Convert.ToInt32(e.NewEditIndex);
        dataBind();
    }
    protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
    {
        this.GridView1.EditIndex = -1;
        dataBind();
    }
    protected void TextBox3_TextChanged(object sender, EventArgs e)
    {

    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -