Exemplo n.º 1
0
    protected void grvAdmin_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        string aId   = e.CommandArgument.ToString();
        string aName = e.CommandName.ToLower();

        switch (aName)
        {
        case "user":
            Response.Redirect("~/Admins/editadminaddroles/" + aId + "/Default.aspx");
            break;

        case "_edit":
            Response.Redirect("~/Admins/editadmin/" + aId + "/Default.aspx");
            break;

        case "_delete":
            AdminBSO adminBSO = new AdminBSO();
            adminBSO.DeleteAdmin(Convert.ToInt32(aId));
            ViewAdmin();
            break;
        }
    }