Exemplo n.º 1
0
    protected void onDelete(object source, CommandEventArgs e)
    {
        HiddenField hdnTPId = (gvMatching.FindControl("hdnHireInvId") as HiddenField);

        string[] arg    = e.CommandArgument.ToString().Split(',');
        int?     ItemID = UDFLib.ConvertIntegerToNull(arg[0]);

        objCP.DEL_Billing_Item(ItemID, GetSessionUserID());
        // BindItems(HideMatched);
    }
    protected void lbtnDelete_Click(object sender, EventArgs e)
    {
        ImageButton ibtnDelete = (ImageButton)sender;
        GridViewRow row        = (GridViewRow)ibtnDelete.NamingContainer;

        Billing_Item_Id = Convert.ToInt32(gvBillingItems.DataKeys[row.RowIndex].Value);
        objCP.DEL_Billing_Item(Billing_Item_Id, GetSessionUserID());
        gvBillingItems.SelectedIndex = row.RowIndex;
        ViewState["ItemId"]          = Billing_Item_Id;
        BindItems();
    }