예제 #1
0
        public static LIType Find(IType objiTypeValues, IType iType, string namePropertyId, string namePropertyName)
        {
            var tipoTabelaColuna = new TipoTabelaColuna(iType);

            tipoTabelaColuna.Get();
            var tiposCType = new LIType();

            if (tipoTabelaColuna.IDTipoTabelaColuna != null)
            {
                var tipoFind = new Tipo();
                tipoFind.TipoTabelaColuna = tipoTabelaColuna;
                var tipos = tipoFind.Find();
                foreach (var t in tipos)
                {
                    var tipo  = (Tipo)t;
                    var cType = (IType)Activator.CreateInstance(objiTypeValues.GetType());
                    var pTipo = cType.GetType().GetProperty(namePropertyId);
                    var pName = cType.GetType().GetProperty(namePropertyName);
                    pTipo.SetValue(cType, cType.PrepareValueProperty(tipo.IDTipo, pTipo.PropertyType), null);
                    pName.SetValue(cType, cType.PrepareValueProperty(tipo.Nome, pName.PropertyType), null);
                    tiposCType.Add(cType);
                }
            }

            return(tiposCType);
        }
예제 #2
0
 public LIType Find()
 {
     return(Tipo.Find(this, new Endereco(), "IDTipoEndereco", "Nome"));
 }
예제 #3
0
 public LIType Find()
 {
     return(Tipo.Find(this, new Telefone(), "IDTipoTelefone", "Nome"));
 }
예제 #4
0
 public LIType Find()
 {
     return(Tipo.Find(this, new Documento(), "IDTipoDocumento", "Nome"));
 }
예제 #5
0
 public LIType Find()
 {
     return(Tipo.Find(this, new Email(), "IDTipoEmail", "Nome"));
 }
예제 #6
0
        public static LIType Find(IType objiTypeValues, IType iType, string namePropertyId, string namePropertyName)
        {
            var tipoTabelaColuna = new TipoTabelaColuna(iType);
            tipoTabelaColuna.Get();
            var tiposCType = new LIType();
            if (tipoTabelaColuna.IDTipoTabelaColuna != null)
            {
                var tipoFind = new Tipo();
                tipoFind.TipoTabelaColuna = tipoTabelaColuna;
                var tipos = tipoFind.Find();
                foreach (var t in tipos)
                {
                    var tipo = (Tipo)t;
                    var cType = (IType)Activator.CreateInstance(objiTypeValues.GetType());
                    var pTipo = cType.GetType().GetProperty(namePropertyId);
                    var pName = cType.GetType().GetProperty(namePropertyName);
                    pTipo.SetValue(cType, cType.PrepareValueProperty(tipo.IDTipo, pTipo.PropertyType), null);
                    pName.SetValue(cType, cType.PrepareValueProperty(tipo.Nome, pName.PropertyType), null);
                    tiposCType.Add(cType);
                }
            }

            return tiposCType;
        }