public void Eliminar(int id) { try { SISECOOBEntities db = new SISECOOBEntities(); ProgramasPGOs pro = db.ProgramasPGOs.FirstOrDefault(i => i.ProgramaPGOID == id); db.ProgramasPGOs.DeleteObject(pro); db.SaveChanges(); } catch (Exception e) { throw e; } }
public void Editar() { try { SISECOOBEntities db = new SISECOOBEntities(); ProgramasPGOs pro = db.ProgramasPGOs.FirstOrDefault(i => i.ProgramaPGOID == this.ProgramaPGOID); pro.ProgramaPGO = ProgramaPGO; db.SaveChanges(); } catch (Exception e) { throw e; } }