예제 #1
0
    protected void ibtnDelete_Click(object sender, ImageClickEventArgs e)
    {
        GridViewRow gvRow = (GridViewRow)((ImageButton)sender).NamingContainer;
        Int32       Id    = Convert.ToInt32(gridIncomeCategories.DataKeys[gvRow.RowIndex].Value);
        int         i     = blc.DeleteIncomeCategory(Id);

        if (i > 0)
        {
            ClientScript.RegisterStartupScript(GetType(), "alert", "alert('Expense Deleted');", true);
            loadCategories();
        }
    }