예제 #1
0
        private bool ConsultaNF()
        {
            NotaFiscal    objNotafical = new NotaFiscal();
            NotaFiscalDAL dbNotaFiscal = new NotaFiscalDAL();

            objNotafical = dbNotaFiscal.ObterNotaFiscalPorIDOrcamento(Convert.ToInt32(txtCodigo.Text), ref erro);

            if (objNotafical != null)
            {
                return(true);
            }
            return(false);
        }
예제 #2
0
        private void bindOrcamento(Orcamento orcamento)
        {
            NotaFiscal    objNota = new NotaFiscal();
            NotaFiscalDAL dbNota  = new NotaFiscalDAL();

            objNota                   = dbNota.ObterNotaFiscalPorIDOrcamento(orcamento.IdOrcamento, ref erro);
            txtVencimento.Text        = (objNota == null) ? "" : objNota.Vencimento.ToString("dd/MM/yyyy");
            hdIdNF.Value              = (objNota == null) ? "" : objNota.IdNotaFiscal.ToString();
            txtCodigo.Text            = orcamento.IdOrcamento.ToString();
            txtDescricao.Text         = orcamento.Descricao;
            txtValor.Text             = orcamento.Valor.ToString();
            hfValorReal.Value         = orcamento.Valor.ToString();
            txtEmissao.Text           = DateTime.Now.ToString("dd/MM/yyyy");
            txtCodCliente.Text        = orcamento.IdPessoa.ToString();
            txtNomeCliente.Text       = orcamento.NomeCliente;
            ddlDesconto.SelectedIndex = 0;
        }