コード例 #1
0
    protected void GridView2_OnRowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName == "Remove")
        {
            int dep_id = Convert.ToInt16(e.CommandArgument);
            input1.Inactive_Department(dep_id);
        }

        if (e.CommandName == "Active")
        {
            int dep_id = Convert.ToInt16(e.CommandArgument);
            input1.Activate_Department(dep_id);
        }

        Response.Redirect("~/Admin_Dash_1.aspx");
    }