public bool Update() { try { Condominio.DALC.CONTACTO consulta = CommonBC.ModeloCondominio.CONTACTO.FirstOrDefault(bib => bib.ID == this.Id); consulta.SOLUCION = this.Solucion; consulta.NOMBREADMIN = this.NombreAdmin; CommonBC.ModeloCondominio.SaveChanges(); return(true); } catch { return(false); } }
public bool Read() { try { Condominio.DALC.CONTACTO consulta = CommonBC.ModeloCondominio.CONTACTO.FirstOrDefault(u => u.ID == this.Id); this.Id = Convert.ToDecimal(consulta.ID); this.Detalle = consulta.DETALLE; this.Solucion = consulta.SOLUCION; this.NombreAdmin = consulta.NOMBREADMIN; this.IdUser = Convert.ToString(consulta.IDUSER); return(true); } catch { return(false); } }