我 GridViewTranstoCon
在主 gridview 中有一个 gridview GridViewTtransmittals
。现在因为GridViewTranstoCon_RowDeleting
我已经编写了下面的代码,但是它失败了。
protected void GridViewTranstoCon_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
GridView TranstoCon = GridViewTtransmittals.FindControl("GridViewTranstoCon") as GridView;
OnDeleteTtransmittaltocon(Convert.ToInt32(TranstoCon.DataKeys[e.RowIndex].Value));
}
private void OnDeleteTtransmittaltocon(int transmittoconid,int transid)
{
if (DeleteTransmittaltocon != null)
{
DeleteTransmittaltocon(this, new tbltranstoconEventArgs { TransmittoconID = transmittoconid, TransID = transid });
// DeleteTransmittaltocon(this, new tbltranstoconEventArgs { TransmittoconID = transmittoconid });
}
}
我的事件处理程序如下所示,我不知道如何添加另一个参数。
public class tbltransmittalNoEventArgs : EventArgs
{
public int TransID { get; set; }
}
public class tbltranstoconEventArgs : EventArgs
{
public int TransmittoconID { get; set; }
public int TransID { get; set; }
}
public event EventHandler<tbltranstoconEventArgs> DeleteTransmittaltocon;
我能做些什么?