//根据按钮属性,进行操作
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Insert" && Page.IsValid)
{
BluePrintDataSource.Insert();
SendUserToLastPage = true;
}
if (e.CommandName == "AddStage")
{
int index = Convert.ToInt32(e.CommandArgument);
DataKey key = this.GridView1.DataKeys[index];
BluePrintID = Convert.ToInt32(key.Value);
FormView1.Visible = true;
Label Label2 = (Label)this.GridView1.Rows[index].Cells[1].FindControl("Label2");
LabelMessage.Text = " - 您现在正在为项目编号为:" + Label2.Text.ToString() + " 添加阶段记录";
}
}
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Insert" && Page.IsValid)
{
BluePrintDataSource.Insert();
SendUserToLastPage = true;
}
if (e.CommandName == "AddStage")
{
int index = Convert.ToInt32(e.CommandArgument);
DataKey key = this.GridView1.DataKeys[index];
BluePrintID = Convert.ToInt32(key.Value);
FormView1.Visible = true;
Label Label2 = (Label)this.GridView1.Rows[index].Cells[1].FindControl("Label2");
LabelMessage.Text = " - 您现在正在为项目编号为:" + Label2.Text.ToString() + " 添加阶段记录";
}
}