示例#1
0
        private void VincularDados()
        {
            Funcoes.Binding(ref txtCodigo, _fornecedor, "Cod_For");
            Funcoes.Binding(ref txtNome, _fornecedor, "Nome");
            Funcoes.Binding(ref txtFantasia, _fornecedor, "Fantasia");
            Funcoes.Binding(ref txtEndereco, _fornecedor, "Endereco");
            Funcoes.Binding(ref txtNumero, _fornecedor, "Numero");
            Funcoes.Binding(ref txtComplemento, _fornecedor, "Complemento");
            Funcoes.Binding(ref txtBairro, _fornecedor, "Bairro");
            Funcoes.BindingMask(ref txtCep, _fornecedor, "Cep");
            Funcoes.Binding(ref txtInscEstadual, _fornecedor, "Insc_Estadual");
            Funcoes.Binding(ref txtTelefone, _fornecedor, "Fone");
            Funcoes.Binding(ref txtFax, _fornecedor, "Fax");
            Funcoes.Binding(ref txtEmail, _fornecedor, "Email");
            Funcoes.Binding(ref txtObservacao, _fornecedor, "Obs");
            Funcoes.Binding(ref txtNumeroBanco, _fornecedor, "Num_Banco");
            Funcoes.Binding(ref txtNomeBanco, _fornecedor, "Nome_Banco");
            Funcoes.Binding(ref txtNroAgencia, _fornecedor, "Num_Agencia");
            Funcoes.Binding(ref txtNroConta, _fornecedor, "Num_Conta");
            Funcoes.Binding(ref txtNomeTitular, _fornecedor, "Nome_Titular");
            Funcoes.Binding(ref txtNomeDepositante, _fornecedor, "Nome_Despositante");

            Funcoes.Binding(ref txtUsuarioAlterou, _fornecedor, "Usu_Alt");
            Funcoes.Binding(ref txtUsuarioCadastrou, _fornecedor, "Usu_Inc");
        }
示例#2
0
 private void VincularDados()
 {
     Funcoes.Binding(ref txtCodigo, _grupo, "Cod_Grupo");
     Funcoes.Binding(ref txtDescricao, _grupo, "Desc_Grupo");
     Funcoes.Binding(ref txtUsuarioAlterou, _grupo, "Usu_Alt");
     Funcoes.Binding(ref txtUsuarioCadastrou, _grupo, "Usu_Inc");
 }
示例#3
0
 private void VincularDados()
 {
     Funcoes.Binding(ref txtCodigo, _vendedor, "Cod_Vendedor");
     Funcoes.Binding(ref txtDescricao, _vendedor, "Nome");
     Funcoes.Binding(ref txtUsuarioAlterou, _vendedor, "Usu_Alt");
     Funcoes.Binding(ref txtUsuarioCadastrou, _vendedor, "Usu_Inc");
 }
示例#4
0
 private void VincularDados()
 {
     Funcoes.Binding(ref txtCodigo, _formaPagto, "Cod_Pagto");
     Funcoes.Binding(ref txtDescricao, _formaPagto, "Desc_Pagto");
     Funcoes.Binding(ref txtSigla, _formaPagto, "Sigla");
     Funcoes.Binding(ref txtUsuarioAlterou, _formaPagto, "Usu_Alt");
     Funcoes.Binding(ref txtUsuarioCadastrou, _formaPagto, "Usu_Inc");
 }
示例#5
0
 private void VincularDados()
 {
     Funcoes.Binding(ref txtCodigo, _unidadeTexto, "Id");
     Funcoes.Binding(ref txtDescricao, _unidadeTexto, "Observacao");
     Funcoes.Binding(ref txtObs2, _unidadeTexto, "Texto");
     Funcoes.Binding(ref txtUsuarioAlterou, _unidadeTexto, "Usu_Alt");
     Funcoes.Binding(ref txtUsuarioCadastrou, _unidadeTexto, "Usu_Inc");
 }
示例#6
0
 private void VinclusarDados()
 {
     Funcoes.Binding(ref txtCodigo, _fornecedorTipoEmpresa, "Id_Tipo");
     Funcoes.Binding(ref txtDescricao, _fornecedorTipoEmpresa, "Desc_Tipo");
     Funcoes.Binding(ref txtSigla, _fornecedorTipoEmpresa, "Sigla");
     Funcoes.Binding(ref txtUsuarioAlterou, _fornecedorTipoEmpresa, "Usu_Alt");
     Funcoes.Binding(ref txtUsuarioCadastrou, _fornecedorTipoEmpresa, "Usu_Inc");
 }
示例#7
0
        private void VincularDados()
        {
            Funcoes.Binding(ref txtCodigo, _produto, "Cod_Produto");
            Funcoes.Binding(ref txtDescricao, _produto, "Desc_Produto");
            Funcoes.Binding(ref txtReferencia, _produto, "Referencia");

            Funcoes.Binding(ref txtUsuarioAlterou, _produto, "Usu_Alt");
            Funcoes.Binding(ref txtUsuarioCadastrou, _produto, "Usu_Inc");
        }
示例#8
0
        private void VincularDados()
        {
            Funcoes.Binding(ref txtEmail, _contato, "Email");
            Funcoes.Binding(ref txtDescricao, _contato, "ContatoTexto");
            Funcoes.Binding(ref txtFax, _contato, "Fax");
            Funcoes.Binding(ref txtTelefone, _contato, "Fone");

            Funcoes.Binding(ref txtUsuarioAlterou, _contato, "Usu_Alt");
            Funcoes.Binding(ref txtUsuarioCadastrou, _contato, "Usu_Inc");
        }
示例#9
0
 private void VincularDados()
 {
     Funcoes.Binding(ref txtCodigo, _contaBanco, "Id_ContaBanco");
     Funcoes.Binding(ref txtNumConta, _contaBanco, "Num_Conta");
     Funcoes.Binding(ref txtAgencia, _contaBanco, "Agencia");
     Funcoes.Binding(ref txtBanco, _contaBanco, "Banco");
     Funcoes.Binding(ref txtCNPJ, _contaBanco, "CNPJ_CPF");
     //Funcoes.Binding(ref txtUsuarioAlterou, _contaBanco, "Usu_Alt");
     //Funcoes.Binding(ref txtUsuarioCadastrou, _contaBanco, "Usu_Inc");
 }
示例#10
0
        private void VincularDados(bool salvar = false)
        {
            Funcoes.Binding(ref txtCodigo, _estado, "Id_Estado");
            Funcoes.Binding(ref txtNome, _estado, "Desc_Estado");
            Funcoes.Binding(ref txtSigla, _estado, "Sigla");
            //Funcoes.Binding(ref txtICMS.txtValor, _estado, "ICMS");
            Funcoes.Binding(ref txtUsuarioAlterou, _estado, "Usu_Alt");
            Funcoes.Binding(ref txtUsuarioCadastrou, _estado, "Usu_Inc");

            //txtICMS.txtValor.DataBindings.Clear();
            //txtICMS.txtValor.DataBindings.Add("Text", _estado, "ICMS", false, DataSourceUpdateMode.OnPropertyChanged);
            txtICMS.txtValor.Text = _estado.ICMS.ToString("n2"); //Funcoes.FormatStrDecimal("N2", txtICMS.txtValor.Text);
        }
示例#11
0
        private void VincularDados(bool salvar = false)
        {
            Funcoes.Binding(ref txtCodigo, _cidade, "Cod_Cidade");
            Funcoes.Binding(ref txtDescricao, _cidade, "Desc_Cidade");
            Funcoes.BindingMask(ref txtCEP, _cidade, "CEP");
            //Funcoes.Binding(ref txtIdEstado, _cidade, "Id_Estado");
            Funcoes.Binding(ref txtUsuarioAlterou, _cidade, "Usu_Alt");
            Funcoes.Binding(ref txtUsuarioCadastrou, _cidade, "Usu_Inc");



            //txtICMS.txtValor.DataBindings.Clear();
            //txtICMS.txtValor.DataBindings.Add("Text", _cidade, "ICMS", false, DataSourceUpdateMode.OnPropertyChanged);
        }
示例#12
0
        private void VincularDados()
        {
            if (_pedido != null)
            {
                txtData.txtData.Text  = _pedido.Data.ToString();
                UsrCliente.txtId.Text = _pedido.Cod_Cliente.ToString();
                if (_pedido.Cliente != null)
                {
                    UsrCliente.txtNome.Text = _pedido.Cliente.Nome;
                }

                UsrFornecedor.txtId.Text = _pedido.Cod_For.ToString();
                if (_pedido.Fornecedor != null)
                {
                    UsrFornecedor.txtNome.Text = _pedido.Fornecedor.Nome;
                }

                txtPercComissao.txtValor.Text = _pedido.Perc_Comissao.ToString("N4");

                UsrContato.txtId.Text = _pedido.Cod_Contato.ToString();
                if (_pedido.Contato != null)
                {
                    UsrContato.txtNome.Text = _pedido.Contato.Nome;
                }

                UsrVendedor.txtId.Text = _pedido.Cod_Vendedor.ToString();
                if (_pedido.Vendedor != null)
                {
                    UsrVendedor.txtNome.Text = _pedido.Vendedor.Nome;
                }

                txtValorComissao.txtValor.Text = _pedido.Valor_Comissao.ToString("N4");

                UsrUsina.txtId.Text = _pedido.Cod_Usina.ToString();
                if (_pedido.Usina != null)
                {
                    UsrUsina.txtNome.Text = _pedido.Usina.Nome;
                }

                rbAberto.Checked    = (_pedido.Situacao == "A");
                rbEntregue.Checked  = (_pedido.Situacao == "E");
                rbCancelado.Checked = (_pedido.Situacao == "C");
            }
            Funcoes.Binding(ref txtCodigo, _pedido, "Num_Pedido");
            Funcoes.Binding(ref txtUsuarioAlterou, _pedido, "Usu_Alt");
            Funcoes.Binding(ref txtUsuarioCadastrou, _pedido, "Usu_Inc");
        }
示例#13
0
        private void VincularDados(bool salvar = false)
        {
            Funcoes.Binding(ref txtCodigo, _unidade, "Id_Unidade");
            Funcoes.Binding(ref txtDescricao, _unidade, "Desc_Unidade");
            Funcoes.Binding(ref txtSigla, _unidade, "Sigla");
            Funcoes.Binding(ref txtComplemento, _unidade, "Compl_Unidade");
            Funcoes.Binding(ref txtUsuarioAlterou, _unidade, "Usu_Alt");
            Funcoes.Binding(ref txtUsuarioCadastrou, _unidade, "Usu_Inc");

            txtFator.txtValor.Text = _unidade.Fator_Conversao.ToString("n4"); //Funcoes.FormatStrDecimal("N2", txtICMS.txtValor.Text);

            UsrUnidadeTexto.txtId.Text = Funcoes.StrToStrNull(_unidade.Id_Texto.ToString());
            if (_unidade.UnidadeTexto != null)
            {
                UsrUnidadeTexto.txtNome.Text = _unidade.UnidadeTexto.Observacao;
            }
        }
示例#14
0
        private void VincularDados()
        {
            Funcoes.Binding(ref txtCodigo, _transportadora, "Cod_Trans");
            Funcoes.Binding(ref txtNome, _transportadora, "Nome");
            Funcoes.Binding(ref txtEndereco, _transportadora, "Endereco");
            Funcoes.Binding(ref txtInscricao, _transportadora, "Insc_Estadual");
            Funcoes.Binding(ref txtFone1, _transportadora, "Fone1");
            Funcoes.Binding(ref txtFone2, _transportadora, "Fone2");
            Funcoes.Binding(ref txtContato, _transportadora, "Contato");
            Funcoes.Binding(ref txtDDD, _transportadora, "DDD");
            Funcoes.Binding(ref txtUsuarioAlterou, _transportadora, "Usu_Alt");
            Funcoes.Binding(ref txtUsuarioCadastrou, _transportadora, "Usu_Inc");
            Funcoes.Binding(ref txtFax, _transportadora, "Fax");
            Funcoes.Binding(ref txtObservacao, _transportadora, "Obs");
            Funcoes.Binding(ref txtNumBanco, _transportadora, "Num_Banco");
            Funcoes.Binding(ref txtNomBanco, _transportadora, "Nome_Banco");
            Funcoes.Binding(ref txtNroAgencia, _transportadora, "Num_Agencia");
            Funcoes.Binding(ref txtNroConta, _transportadora, "Num_Conta");
            Funcoes.Binding(ref txtNomeTitular, _transportadora, "Nome_Titular");
            Funcoes.Binding(ref txtNomeDepositante, _transportadora, "Nome_Despositante");
            Funcoes.Binding(ref txtEmail, _transportadora, "Email");
            Funcoes.Binding(ref txtANTT, _transportadora, "ANTT");
            Funcoes.Binding(ref txtRenavam, _transportadora, "RENAVAN");
            Funcoes.BindingMask(ref txtCEP, _transportadora, "CEP");

            txtCNPJ.txtValor.DataBindings.Clear();
            txtCNPJ.txtValor.DataBindings.Add("Text", _transportadora, "CNPJ");

            chkImportante.Checked = _transportadora.Destaque == "S";

            txtDataNasc.txtData.Clear();
            if (_transportadora.DataNasc != null)
            {
                txtDataNasc.txtData.Text = _transportadora.DataNasc.ToString();
            }

            txtCPF.txtValor.DataBindings.Clear();
            txtCPF.txtValor.DataBindings.Add("Text", _transportadora, "CPF_TRANSP");

            if (_transportadora.Cod_Cidade != null)
            {
                UsrCidade.txtId.Text = Funcoes.StrToNullStr(_transportadora.Cod_Cidade.Value);
            }
        }
示例#15
0
        private void VincularDados(bool salvar = false)
        {
            txtCNPJ.txtValor.Text = _empresa.CNPJ;
            Funcoes.Binding(ref txtCodigo, _empresa, "Cod_Empresa");
            Funcoes.Binding(ref txtNome, _empresa, "Nome");
            Funcoes.Binding(ref txtVersao, _empresa, "Versao");
            Funcoes.Binding(ref txtEndereco, _empresa, "Endereco");
            Funcoes.Binding(ref txtBairro, _empresa, "Bairro");
            Funcoes.Binding(ref txtNumero, _empresa, "Numero");
            Funcoes.Binding(ref txtCidade, _empresa, "Desc_Cidade");
            Funcoes.BindingMask(ref txtCep, _empresa, "Cep");
            Funcoes.Binding(ref txtEstado, _empresa, "Estado");
            Funcoes.Binding(ref txtFone, _empresa, "Fone");
            Funcoes.Binding(ref txtFax, _empresa, "Fax");
            Funcoes.Binding(ref txtEmail, _empresa, "Email");
            Funcoes.Binding(ref txtInscricao, _empresa, "Insc_Estadual");

            Funcoes.Binding(ref txtUsuarioAlterou, _empresa, "Usu_Alt");
            Funcoes.Binding(ref txtUsuarioCadastrou, _empresa, "Usu_Inc");
        }
示例#16
0
        private void VincularDados()
        {
            Funcoes.Binding(ref txtCodigo, _cliente, "Cod_Cliente");
            Funcoes.Binding(ref txtNome, _cliente, "Nome");
            Funcoes.Binding(ref txtFantasia, _cliente, "Fantasia");
            Funcoes.Binding(ref txtEndereco, _cliente, "Endereco");
            Funcoes.Binding(ref txtNumero, _cliente, "Numero");
            Funcoes.Binding(ref txtComplemento, _cliente, "Complemento");
            Funcoes.Binding(ref txtBairro, _cliente, "Bairro");
            Funcoes.BindingMask(ref txtCep, _cliente, "Cep");
            Funcoes.Binding(ref txtInscEstadual, _cliente, "Insc_Estadual");
            Funcoes.Binding(ref txtRG, _cliente, "RG");
            Funcoes.Binding(ref txtTelefone, _cliente, "Fone");
            Funcoes.Binding(ref txtFax, _cliente, "Fax");
            Funcoes.Binding(ref txtEmail, _cliente, "Email");
            Funcoes.Binding(ref txtObservacao, _cliente, "Obs");


            Funcoes.Binding(ref txtUsuarioAlterou, _cliente, "Usu_Alt");
            Funcoes.Binding(ref txtUsuarioCadastrou, _cliente, "Usu_Inc");
        }
示例#17
0
        private void VincularDados()
        {
            Funcoes.Binding(ref txtCodigo, _motorista, "Cod_Motorista");
            Funcoes.Binding(ref txtNome, _motorista, "Nome");
            Funcoes.Binding(ref txtEndereco, _motorista, "Endereco");
            Funcoes.Binding(ref txtBairro, _motorista, "Bairro");
            Funcoes.BindingMask(ref txtCep, _motorista, "Cep");
            Funcoes.Binding(ref txtFoneCelular, _motorista, "Fone1");
            Funcoes.Binding(ref txtFoneFixo, _motorista, "Fone2");
            Funcoes.Binding(ref txtPlacaVeiculo, _motorista, "Placa");
            Funcoes.Binding(ref txtPlacaReboque1, _motorista, "Placa_Reboque1");
            Funcoes.Binding(ref txtPlacaReboque2, _motorista, "Placa_Reboque2");
            Funcoes.Binding(ref txtPlacaReboque3, _motorista, "Placa_Reboque3");
            Funcoes.Binding(ref txtCnh, _motorista, "CNH");
            Funcoes.Binding(ref txtRenavan, _motorista, "RENAVAN");
            Funcoes.Binding(ref txtObservacao, _motorista, "Obs");
            Funcoes.Binding(ref txtUFTrans, _motorista, "Estado_CPF");

            Funcoes.Binding(ref txtUsuarioAlterou, _motorista, "Usu_Alt");
            Funcoes.Binding(ref txtUsuarioCadastrou, _motorista, "Usu_Inc");
        }
示例#18
0
        private void VincularDados()
        {
            Funcoes.Binding(ref txtDescricao, _conta, "Documento");
            Funcoes.Binding(ref txtUsuarioAlterou, _conta, "Usu_Alt");
            Funcoes.Binding(ref txtUsuarioCadastrou, _conta, "Usu_Inc");
            Funcoes.Binding(ref txtDias, _conta, "Dias");

            txtDataEmissao.txtData.Text = _conta.Data_Emissao.ToString();
            txtDataVencto.txtData.Text  = _conta.Data_Vencto.ToString();
            txtValorPagar.txtValor.Text = _conta.Valor_Pagar.ToString("N2");

            UsrFormaPagto.txtId.Text   = "";
            UsrFormaPagto.txtNome.Text = "";
            if (_conta.Cod_Pagto != null)
            {
                UsrFormaPagto.txtId.Text   = _conta.Cod_Pagto.ToString();
                UsrFormaPagto.txtNome.Text = _conta.FormaPagto.Desc_Pagto;
            }

            rbAberto.Checked           = (_conta.Situacao == "A");
            rbPago.Checked             = (_conta.Situacao == "P");
            txtValorPago.txtValor.Text = _conta.Valor_Pago.ToString("N2");
            txtDataPagto.txtData.Text  = _conta.Data_Pago.ToString();

            UsrContaBanco.txtId.Text   = "";
            UsrContaBanco.txtNome.Text = "";
            if (_conta.Id_ContaBanco != null)
            {
                UsrContaBanco.txtId.Text   = _conta.Id_ContaBanco.ToString();
                UsrContaBanco.txtNome.Text = _conta.ContaBanco.Num_Conta;
            }

            if (_id == 0)
            {
                rbAberto.Checked            = true;
                txtDataEmissao.txtData.Text = DateTime.Now.ToShortDateString();
            }
        }