Example #1
0
 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;
         }
     }
 }