Exemplo n.º 1
0
        public static EstruturaObrigatoriedade getObrigatoriedadeAllFalse()
        {
            EstruturaObrigatoriedade retorno = new EstruturaObrigatoriedade();

            retorno.ID                 = 0;
            retorno.Nome               = false;
            retorno.RG                 = false;
            retorno.CPF                = false;
            retorno.Telefone           = false;
            retorno.TelefoneComercial  = false;
            retorno.Celular            = false;
            retorno.DataNascimento     = false;
            retorno.Email              = false;
            retorno.CEPCliente         = false;
            retorno.EnderecoCliente    = false;
            retorno.NumeroCliente      = false;
            retorno.ComplementoCliente = false;
            retorno.BairroCliente      = false;
            retorno.CidadeCliente      = false;
            retorno.EstadoCliente      = false;
            retorno.NomeEntrega        = false;
            retorno.CPFEntrega         = false;
            retorno.RGEntrega          = false;
            retorno.CEPEntrega         = false;
            retorno.EnderecoEntrega    = false;
            retorno.NumeroEntrega      = false;
            retorno.ComplementoEntrega = false;
            retorno.BairroEntrega      = false;
            retorno.CidadeEntrega      = false;
            retorno.EstadoEntrega      = false;

            return(retorno);
        }
Exemplo n.º 2
0
        public static EstruturaObrigatoriedade getObrigatoriedadeAllTrue()
        {
            EstruturaObrigatoriedade retorno = new EstruturaObrigatoriedade();

            retorno.ID                 = 0;
            retorno.Nome               = true;
            retorno.RG                 = true;
            retorno.CPF                = true;
            retorno.Telefone           = true;
            retorno.TelefoneComercial  = true;
            retorno.Celular            = true;
            retorno.DataNascimento     = true;
            retorno.Email              = true;
            retorno.CEPCliente         = true;
            retorno.EnderecoCliente    = true;
            retorno.NumeroCliente      = true;
            retorno.ComplementoCliente = true;
            retorno.BairroCliente      = true;
            retorno.CidadeCliente      = true;
            retorno.EstadoCliente      = true;

            return(retorno);
        }
Exemplo n.º 3
0
        //Retorna a estrutura preenchida com base nos enumeradores de Evento / Canal - "U" , "F" etc..
        public static EstruturaObrigatoriedade getCamposObrigatoriosPorTipo(string tipoCadastro)
        {
            EstruturaObrigatoriedade retorno = new EstruturaObrigatoriedade();

            retorno.ID                 = 0;
            retorno.Nome               = false;
            retorno.RG                 = false;
            retorno.CPF                = false;
            retorno.Telefone           = false;
            retorno.TelefoneComercial  = false;
            retorno.Celular            = false;
            retorno.DataNascimento     = false;
            retorno.Email              = false;
            retorno.CEPCliente         = false;
            retorno.EnderecoCliente    = false;
            retorno.NumeroCliente      = false;
            retorno.ComplementoCliente = false;
            retorno.BairroCliente      = false;
            retorno.CidadeCliente      = false;
            retorno.EstadoCliente      = false;
            retorno.NomeEntrega        = false;
            retorno.CPFEntrega         = false;
            retorno.RGEntrega          = false;
            retorno.CEPEntrega         = false;
            retorno.EnderecoEntrega    = false;
            retorno.NumeroEntrega      = false;
            retorno.ComplementoEntrega = false;
            retorno.BairroEntrega      = false;
            retorno.CidadeEntrega      = false;
            retorno.EstadoEntrega      = false;
            switch (tipoCadastro)
            {
            case "U":
            {
                retorno.Nome  = true;
                retorno.RG    = true;
                retorno.Email = true;
                break;
            }

            case "E":
            {
                retorno.NomeEntrega     = true;
                retorno.CPFEntrega      = true;
                retorno.RGEntrega       = true;
                retorno.CEPEntrega      = true;
                retorno.EnderecoEntrega = true;
                retorno.NumeroEntrega   = true;
                retorno.BairroEntrega   = true;
                retorno.CidadeEntrega   = true;
                retorno.EstadoEntrega   = true;
                break;
            }

            case "B":
            {
                retorno.Nome = true;
                retorno.RG   = true;
                break;
            }
            }

            return(retorno);
        }
Exemplo n.º 4
0
 public EstruturaObrigatoriedade getObrigatoriedadePorCotaItemID(int cotaItemID, int cotaItemID_APS)
 {
     try
     {
         StringBuilder stbSQL = new StringBuilder();
         stbSQL.Append("SELECT tObrigatoriedade.* FROM tObrigatoriedade (NOLOCK) ");
         stbSQL.Append("INNER JOIN tCotaItem (NOLOCK) ON tObrigatoriedade.ID = tCotaItem.ObrigatoriedadeID ");
         stbSQL.Append("WHERE tCotaItem.ID = " + (cotaItemID_APS > 0 ? cotaItemID_APS : cotaItemID));
         bd.Consulta(stbSQL.ToString());
         EstruturaObrigatoriedade retorno = new EstruturaObrigatoriedade();
         if (bd.Consulta().Read())
         {
             retorno.Nome               = bd.LerBoolean("Nome");
             retorno.RG                 = bd.LerBoolean("RG");
             retorno.CPF                = bd.LerBoolean("CPF");
             retorno.Telefone           = bd.LerBoolean("Telefone");
             retorno.TelefoneComercial  = bd.LerBoolean("TelefoneComercial");
             retorno.Celular            = bd.LerBoolean("Celular");
             retorno.DataNascimento     = bd.LerBoolean("DataNascimento");
             retorno.Email              = bd.LerBoolean("Email");
             retorno.CEPCliente         = bd.LerBoolean("CEPCliente");
             retorno.EnderecoCliente    = bd.LerBoolean("EnderecoCliente");
             retorno.NumeroCliente      = bd.LerBoolean("NumeroCliente");
             retorno.ComplementoCliente = bd.LerBoolean("ComplementoCliente");
             retorno.BairroCliente      = bd.LerBoolean("BairroCliente");
             retorno.CidadeCliente      = bd.LerBoolean("CidadeCliente");
             retorno.EstadoCliente      = bd.LerBoolean("EstadoCliente");
             retorno.NomeEntrega        = bd.LerBoolean("NomeEntrega");
             retorno.CPFEntrega         = bd.LerBoolean("CPFEntrega");
             retorno.RGEntrega          = bd.LerBoolean("RGEntrega");
             retorno.CEPEntrega         = bd.LerBoolean("CEPEntrega");
             retorno.EnderecoEntrega    = bd.LerBoolean("EnderecoEntrega");
             retorno.NumeroEntrega      = bd.LerBoolean("NumeroEntrega");
             retorno.ComplementoEntrega = bd.LerBoolean("ComplementoEntrega");
             retorno.BairroEntrega      = bd.LerBoolean("BairroEntrega");
             retorno.CidadeEntrega      = bd.LerBoolean("CidadeEntrega");
             retorno.EstadoEntrega      = bd.LerBoolean("EstadoEntrega");
             retorno.CPFResponsavel     = bd.LerBoolean("CPFResponsavel");
         }
         else
         {
             retorno.Nome               = true;
             retorno.RG                 = true;
             retorno.CPF                = true;
             retorno.Telefone           = false;
             retorno.TelefoneComercial  = false;
             retorno.Celular            = false;
             retorno.DataNascimento     = false;
             retorno.Email              = true;
             retorno.CEPCliente         = false;
             retorno.EnderecoCliente    = false;
             retorno.NumeroCliente      = false;
             retorno.ComplementoCliente = false;
             retorno.BairroCliente      = false;
             retorno.CidadeCliente      = false;
             retorno.EstadoCliente      = false;
             retorno.NomeEntrega        = false;
             retorno.CPFEntrega         = false;
             retorno.RGEntrega          = false;
             retorno.CEPEntrega         = false;
             retorno.EnderecoEntrega    = false;
             retorno.NumeroEntrega      = false;
             retorno.ComplementoEntrega = false;
             retorno.BairroEntrega      = false;
             retorno.CidadeEntrega      = false;
             retorno.EstadoEntrega      = false;
             retorno.CPFResponsavel     = false;
         }
         return(retorno);
     }
     catch (Exception)
     {
         throw;
     }
     finally
     {
         bd.Fechar();
     }
 }
Exemplo n.º 5
0
 public EstruturaObrigatoriedade getInformacoesUC(int id)
 {
     try
     {
         string sql = "SELECT * FROM tObrigatoriedade WHERE ID = " + id;
         bd.Consulta(sql);
         EstruturaObrigatoriedade retorno = new EstruturaObrigatoriedade();
         if (bd.Consulta().Read())
         {
             retorno.Nome               = bd.LerBoolean("Nome");
             retorno.RG                 = bd.LerBoolean("RG");
             retorno.CPF                = bd.LerBoolean("CPF");
             retorno.Telefone           = bd.LerBoolean("Telefone");
             retorno.TelefoneComercial  = bd.LerBoolean("TelefoneComercial");
             retorno.Celular            = bd.LerBoolean("Celular");
             retorno.DataNascimento     = bd.LerBoolean("DataNascimento");
             retorno.Email              = bd.LerBoolean("Email");
             retorno.CEPCliente         = bd.LerBoolean("CEPCliente");
             retorno.EnderecoCliente    = bd.LerBoolean("EnderecoCliente");
             retorno.NumeroCliente      = bd.LerBoolean("NumeroCliente");
             retorno.ComplementoCliente = bd.LerBoolean("ComplementoCliente");
             retorno.BairroCliente      = bd.LerBoolean("BairroCliente");
             retorno.CidadeCliente      = bd.LerBoolean("CidadeCliente");
             retorno.EstadoCliente      = bd.LerBoolean("EstadoCliente");
             retorno.NomeEntrega        = bd.LerBoolean("NomeEntrega");
             retorno.CPFEntrega         = bd.LerBoolean("CPFEntrega");
             retorno.RGEntrega          = bd.LerBoolean("RGEntrega");
             retorno.CEPEntrega         = bd.LerBoolean("CEPEntrega");
             retorno.EnderecoEntrega    = bd.LerBoolean("EnderecoEntrega");
             retorno.NumeroEntrega      = bd.LerBoolean("NumeroEntrega");
             retorno.ComplementoEntrega = bd.LerBoolean("ComplementoEntrega");
             retorno.BairroEntrega      = bd.LerBoolean("BairroEntrega");
             retorno.CidadeEntrega      = bd.LerBoolean("CidadeEntrega");
             retorno.EstadoEntrega      = bd.LerBoolean("EstadoEntrega");
             retorno.CPFResponsavel     = bd.LerBoolean("CPFResponsavel");
         }
         else
         {
             retorno.Nome               = false;
             retorno.RG                 = false;
             retorno.CPF                = false;
             retorno.Telefone           = false;
             retorno.TelefoneComercial  = false;
             retorno.Celular            = false;
             retorno.DataNascimento     = false;
             retorno.Email              = false;
             retorno.CEPCliente         = false;
             retorno.EnderecoCliente    = false;
             retorno.NumeroCliente      = false;
             retorno.ComplementoCliente = false;
             retorno.BairroCliente      = false;
             retorno.CidadeCliente      = false;
             retorno.EstadoCliente      = false;
             retorno.NomeEntrega        = false;
             retorno.CPFEntrega         = false;
             retorno.RGEntrega          = false;
             retorno.CEPEntrega         = false;
             retorno.EnderecoEntrega    = false;
             retorno.NumeroEntrega      = false;
             retorno.ComplementoEntrega = false;
             retorno.BairroEntrega      = false;
             retorno.CidadeEntrega      = false;
             retorno.EstadoEntrega      = false;
             retorno.CPFResponsavel     = false;
         }
         return(retorno);
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         bd.Fechar();
     }
 }