vs2005中gridview的RowCommand事件

具体代码如下
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        
//e.CommandArgument获得命令行的索引
        if (e.CommandName == "SetNotice")
        {
            
if (!demo.methods(Convert.ToInt32(this.GridView1.DataKeys[Convert.ToInt32(e.CommandArgument)].Value),
            userid))
            {
                
base.MessageBox(string.Empty, OpNotice.strErrMsg);
            }
            
else
            {
                
base.MessageBox(string.Empty, "设置成功");
                DataBinds();
            }
        }
    }
posted @ 2006-05-30 13:10  SCADA组态软件(2D,3D)  阅读(3372)  评论(2编辑  收藏  举报