protected void GridPedidosAbertos_RowCommand(object sender, GridViewCommandEventArgs e) { divBoleto.InnerHtml = ""; if (e.CommandArgument == null) { return; } string[] iArgumento = e.CommandArgument.ToString().Split(';'); switch (iArgumento[0]) { case "boleto": divBoleto.InnerHtml = bdp.executaBoleto(Convert.ToInt32(iArgumento[1]), false); break; case "taxa": divBoleto.InnerHtml = bdp.executaBoleto(Convert.ToInt32(iArgumento[1]), true); break; case "aceite": GridPedidosAbertos_SelectedIndexChanged(sender, null); break; } }
private void VinculaNota() { if (txtNrNota.Text != "" && txtSerie.Text != "" && txtdataNota.Text != "") { int retorno = 0; int nr_nota = Convert.ToInt32(txtNrNota.Text); int pedido = Convert.ToInt32(GridPedidosAbertos.SelectedRow.Cells[0].Text); string nr_serie = txtSerie.Text; DateTime dt_nota = DateTime.ParseExact(txtdataNota.Text, "dd/MM/yyyy", null); retorno = bdp.pro_setVinculaNota(pedido, nr_nota, nr_serie, dt_nota); if (retorno > 0) { //lblmensagem.Visible = true; //lblmensagem.Text = "Nota vinculada com sucesso"; Mensagem("Nota vinculada com sucesso"); divBoleto.InnerHtml = bdp.executaBoleto(pedido, false); DivNumeroNota.Visible = true; getPedidosAbertos(); } else { //lblmensagem.Visible = true; //lblmensagem.Text = "Não foi possível executar essa tarefa."; Mensagem("Não foi possível executar essa tarefa."); DivNumeroNota.Visible = true; } } }