Exemplo n.º 1
0
        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;
            }
        }
Exemplo n.º 2
0
        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;
            }
        }