Пример #1
0
        private void OnEdtCodProfissao_Killfocus(object sender, Event e)
        {
            string    sProfissao;
            ArrayList ConsCampo = new ArrayList();

            if (edtCodProfissao.Value.Length > 0)
            {
                sProfissao = RotinasGlobais.Rotinas.ConsultaCampoDesc(ConsCampo,
                                                                      ConsultasSQL.ConsSQL.Profissao('S',
                                                                                                     edtCodProfissao.Value, ""), Resource.STR_PROFNENC);

                if (sProfissao.Length > 0)
                {
                    edtProfissao.Value = sProfissao;
                }
                else
                {
                    edtCodProfissao.Clear();
                    edtCodProfissao.SetFocus();
                }
            }
            else
            {
                edtProfissao.Clear();
            }
        }
Пример #2
0
        private void OnEdtCodPais_Killfocus(object sender, Event e)
        {
            string    sPais;
            ArrayList ConsCampo = new ArrayList();

            if (edtCodPais.Value.Length > 0)
            {
                sPais = RotinasGlobais.Rotinas.ConsultaCampoDesc(ConsCampo,
                                                                 ConsultasSQL.ConsSQL.Pais('S',
                                                                                           edtCodPais.Value, ""), Resource.STR_PAISNENC);
                if (sPais.Length > 0)
                {
                    edtPais.Value = sPais;
                }
                else
                {
                    edtCodPais.Clear();
                    edtCodPais.SetFocus();
                }
            }
            else
            {
                edtPais.Clear();
            }
        }
Пример #3
0
 protected virtual void InformaLimpaDados(bool bInformar)
 {
     if (bInformar)
     {
         Campos             = (ArrayList)Registros[nLinhaRegistro];
         edtCodigo.Value    = Campos[0].ToString();
         edtDescricao.Value = Campos[1].ToString();
     }
     else
     {
         edtCodigo.Clear();
         edtDescricao.Clear();
         edtCodigo.Enabled = true;
         edtCodigo.SetFocus();
     }
 }
Пример #4
0
        private void OnEdtCodEndereco_Killfocus(object sender, Event e)
        {
            string    sLogradouro;
            ArrayList ConsCampo = new ArrayList();

            if (edtCodEndereco.Value.Length > 0)
            {
                sLogradouro = RotinasGlobais.Rotinas.ConsultaCampoDesc(ConsCampo,
                                                                       ConsultasSQL.ConsSQL.Endereco('S',
                                                                                                     edtCodEndereco.Value, "", "", "", "", ""), Resource.STR_ENDNENC);
                if (sLogradouro.Length > 0)
                {
                    edtLogradouro.Value = sLogradouro;
                    edtBairro.Value     = ConsCampo[2].ToString();
                    edtCEP.Value        = ConsCampo[3].ToString();
                    edtCidade.Value     = ConsCampo[4].ToString();
                    edtEstado.Value     = ConsCampo[5].ToString();
                }
                else
                {
                    edtCodEndereco.SetFocus();
                    edtLogradouro.Clear();
                    edtBairro.Clear();
                    edtCEP.Clear();
                    edtCidade.Clear();
                    edtEstado.Clear();
                }
            }
            else
            {
                edtLogradouro.Clear();
                edtBairro.Clear();
                edtCEP.Clear();
                edtCidade.Clear();
                edtEstado.Clear();
            }
        }