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); }
public LIType Find() { return(Tipo.Find(this, new Endereco(), "IDTipoEndereco", "Nome")); }
public LIType Find() { return(Tipo.Find(this, new Telefone(), "IDTipoTelefone", "Nome")); }
public LIType Find() { return(Tipo.Find(this, new Documento(), "IDTipoDocumento", "Nome")); }
public LIType Find() { return(Tipo.Find(this, new Email(), "IDTipoEmail", "Nome")); }
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; }