public bool Delete() { try { Modelo.AREA us = CommonBC.ModeloWfbs.AREA.First(b => b.ID_AREA == this.id_area); us.OBSOLETA = 1; CommonBC.ModeloWfbs.SaveChanges(); return(true); } catch (Exception ex) { return(false); } }
public bool Update() { try { Modelo.AREA us = CommonBC.ModeloWfbs.AREA.First(b => b.ID_AREA == this.id_area); us.NOMBRE = this.area; us.ID_AREA = this.id_area; us.ABREVIACION = this.abreviacion; us.OBSOLETA = this.obsoleta; CommonBC.ModeloWfbs.SaveChanges(); return(true); } catch (Exception ex) { return(false); } }
public bool Read() { try { Modelo.AREA area = CommonBC.ModeloWfbs.AREA.First(b => b.ID_AREA == this.id_area); this.id_area = Convert.ToInt32(area.ID_AREA); this.area = area.NOMBRE; this.abreviacion = area.ABREVIACION; this.obsoleta = Convert.ToInt32(area.OBSOLETA); return(true); } catch (Exception ex) { return(false); } }