Esempio n. 1
0
        private void AddItemProdutosNFCe(int CUPOMELETRONICOID)
        {
            LIS_PRODUTONFCECollection LIS_PRODUTONFCEColl_iTEM = new LIS_PRODUTONFCECollection();

            RowRelatorio.Clear();
            RowRelatorio.Add(new RowsFiltro("CUPOMELETRONICOID", "System.Int32", "=", CUPOMELETRONICOID.ToString()));
            LIS_PRODUTONFCEColl_iTEM = LIS_PRODUTONFCEP.ReadCollectionByParameter(RowRelatorio, "PRODUTONFCEID");

            PRODUTONFCEProvider PRODUTONFCEP = new PRODUTONFCEProvider();
            int itemProduto = 1;

            foreach (LIS_PRODUTONFCEEntity item in LIS_PRODUTONFCEColl_iTEM)
            {
                PRODUTONFCEEntity PRODUTONFCETy = new PRODUTONFCEEntity();
                PRODUTONFCETy      = PRODUTONFCEP.Read(Convert.ToInt32(item.PRODUTONFCEID));
                PRODUTONFCETy.ITEM = itemProduto;
                PRODUTONFCEP.Save(PRODUTONFCETy);
                itemProduto++;
            }
        }
Esempio n. 2
0
 private void btnAlterar_Click(object sender, EventArgs e)
 {
     if (Validacoes())
     {
         try
         {
             PRODUTONFCETy.IDPRODUTO     = Convert.ToInt32(cbProduto.SelectedValue);
             PRODUTONFCETy.QUANTIDADE    = Convert.ToDecimal(txtQuant.Text);
             PRODUTONFCETy.VALORUNITARIO = Convert.ToDecimal(txtvalorunit.Text);
             PRODUTONFCETy.VALORTOTAL    = Convert.ToDecimal(txtVlTotal.Text);
             PRODUTONFCEP.Save(PRODUTONFCETy);
             ExibirDadosCupom(CUPOMELETRONICOID);
             MessageBox.Show(ConfigMessage.Default.MsgSave);
         }
         catch (Exception ex)
         {
             MessageBox.Show(ConfigMessage.Default.MsgSaveErro);
             MessageBox.Show("Erro técnico: " + ex.Message);
         }
     }
 }
Esempio n. 3
0
        private void GravaProduto()
        {
            try
            {
                if (Validacoes())
                {
                    PRODUTONFCEP.Save(Entity2);
                    txtTotalVenda.Text = TotalCupom(_CUPOMELETRONICOID).ToString("n2");
                    ExibirDadosCupom(_CUPOMELETRONICOID);
                    CUPOMELETRONICOP.Save(Entity);
                    Entity2 = null;

                    if (BmsSoftware.ConfigNFCe.Default.EmitirSomAdicionarProduto == "S")
                    {
                        Beep(1000, 300);
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ConfigMessage.Default.MsgSaveErro);
                MessageBox.Show("Erro técnico: " + ex.Message);
            }
        }