private void Dgv_pedidos_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Page") { return; } int linha = int.Parse(e.CommandArgument as string); int idPedido = int.Parse(dgv_pedidos.Rows[linha].Cells[0].Text); if (e.CommandName == "btn_aceitar") { int id_estafeta = int.Parse(Session["id_user"].ToString()); Orders.AceitarOrder(id_estafeta, idPedido); AtualizarGrid(); AtualizarPedidoInfo(); } }