public LIType Find() { return(Tipo.Find(this, new Telefone(), "IDTipoTelefone", "Nome")); }
public void Save() { Tipo.Save(this, new Telefone(), "IDTipoTelefone", "Nome"); }
public void Delete() { Tipo.Delete(this, new Telefone(), "IDTipoTelefone"); }
public void Delete() { Tipo.Delete(this, new Documento(), "IDTipoDocumento"); }
public LIType Find() { return(Tipo.Find(this, new Documento(), "IDTipoDocumento", "Nome")); }
public LIType Find() { return(Tipo.Find(this, new Email(), "IDTipoEmail", "Nome")); }
public void Save() { Tipo.Save(this, new Documento(), "IDTipoDocumento", "Nome"); }
public void Delete() { Tipo.Delete(this, new Email(), "IDTipoEmail"); }
public void Save() { Tipo.Save(this, new Email(), "IDTipoEmail", "Nome"); }
public static void Delete(IType objiTypeValues, IType iType, string namePropertyId) { var pTipo = objiTypeValues.GetType().GetProperty(namePropertyId); if (pTipo.GetValue(objiTypeValues, null) == null) throw new TradeVisionValidationError("IDTipo obrigatório para a ação GET"); var tipoTabelaColuna = new TipoTabelaColuna(iType); tipoTabelaColuna.Get(); if (tipoTabelaColuna.IDTipoTabelaColuna != null) { var tipo = new Tipo(); tipo.TipoTabelaColuna = tipoTabelaColuna; tipo.IDTipo = (int?)pTipo.GetValue(objiTypeValues, null); tipo.Delete(); } }
public static void Save(IType objiTypeValues, IType iType, string namePropertyId, string namePropertyName) { var tipoTabelaColuna = new TipoTabelaColuna(iType); try { tipoTabelaColuna.IsTransaction = true; tipoTabelaColuna.Get(); tipoTabelaColuna.Save(); var tipo = new Tipo(); tipo.Transaction = tipoTabelaColuna.Transaction; tipo.IDTipo = (int?)objiTypeValues.GetType().GetProperty(namePropertyId).GetValue(objiTypeValues, null); tipo.Nome = (string)objiTypeValues.GetType().GetProperty(namePropertyName).GetValue(objiTypeValues, null); tipo.TipoTabelaColuna = tipoTabelaColuna; tipo.Save(); tipoTabelaColuna.Commit(); } catch (Exception err) { tipoTabelaColuna.Rollback(); throw err; } }
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; }